Skip to content

Commit 5e50ed0

Browse files
committed
Change the default hash mode to sha256
sha1 is problematic especially since RedHat disabled it's usage
1 parent bb6cf94 commit 5e50ed0

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)