Skip to content

Commit

Permalink
Add forgotten parameter with the cryptoprovider
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Dvorak committed Sep 10, 2016
1 parent 00da47e commit f97fcbe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ public class SignatureUtils {
*/
public byte[] computeECDSASignature(byte[] bytes, PrivateKey masterPrivateKey) throws InvalidKeyException, SignatureException {
try {
Signature ecdsa = Signature.getInstance("SHA256withECDSA");
Signature ecdsa = Signature.getInstance("SHA256withECDSA", PowerAuthConfiguration.INSTANCE.getKeyConvertor().getProviderName());
ecdsa.initSign(masterPrivateKey);
ecdsa.update(bytes);
byte[] signature = ecdsa.sign();
return signature;
} catch (NoSuchAlgorithmException ex) {
} catch (NoSuchAlgorithmException | NoSuchProviderException ex) {
Logger.getLogger(SignatureUtils.class.getName()).log(Level.SEVERE, null, ex);
}
return null;
Expand Down

0 comments on commit f97fcbe

Please sign in to comment.