Skip to content

Commit 4951e30

Browse files
authored
Merge pull request #67 from timlegge/sha256
Change the default hash mode to sha256
2 parents 6c1f58d + 5e50ed0 commit 4951e30

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

RSA.xs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ SV* make_rsa_obj(SV* p_proto, EVP_PKEY* p_rsa)
114114

115115
CHECK_NEW(rsa, 1, rsaData);
116116
rsa->rsa = p_rsa;
117+
#ifdef SHA512_DIGEST_LENGTH
118+
rsa->hashMode = NID_sha256;
119+
#else
117120
rsa->hashMode = NID_sha1;
121+
#endif
118122
rsa->padding = RSA_PKCS1_OAEP_PADDING;
119123
return sv_bless(
120124
newRV_noinc(newSViv((IV) rsa)),

0 commit comments

Comments
 (0)