Skip to content

Commit 9db621a

Browse files
committed
pkcs7: remove unnecessary const cast
PKCS7_encrypt() and PKCS7_SIGNER_INFO_set() take const EVP_CIPHER and EVP_MD at least since OpenSSL 0.9.7.
1 parent 938a1e6 commit 9db621a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/openssl/ossl_pkcs7.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ ossl_pkcs7_s_encrypt(int argc, VALUE *argv, VALUE klass)
325325
BIO_free(in);
326326
rb_jump_tag(status);
327327
}
328-
if(!(p7 = PKCS7_encrypt(x509s, in, (EVP_CIPHER*)ciph, flg))){
328+
if (!(p7 = PKCS7_encrypt(x509s, in, ciph, flg))) {
329329
BIO_free(in);
330330
sk_X509_pop_free(x509s, X509_free);
331331
ossl_raise(ePKCS7Error, NULL);
@@ -947,7 +947,7 @@ ossl_pkcs7si_initialize(VALUE self, VALUE cert, VALUE key, VALUE digest)
947947
x509 = GetX509CertPtr(cert); /* NO NEED TO DUP */
948948
md = ossl_evp_get_digestbyname(digest);
949949
GetPKCS7si(self, p7si);
950-
if (!(PKCS7_SIGNER_INFO_set(p7si, x509, pkey, (EVP_MD*)md))) {
950+
if (!(PKCS7_SIGNER_INFO_set(p7si, x509, pkey, md))) {
951951
ossl_raise(ePKCS7Error, NULL);
952952
}
953953

0 commit comments

Comments
 (0)