X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=engines%2Fe_4758_cca.c;h=68a628229d65b2a7a9c6f8ad3fad800ed68af51d;hp=203a8a75e6716327e67ed205d1aaa0971237ddfd;hb=4e9023f4d23a13387f490e83dae82e97d7d8a7a0;hpb=5be1264b7e4756a345bce6c1c8bb32f418c8a0aa diff --git a/engines/e_4758_cca.c b/engines/e_4758_cca.c index 203a8a75e6..68a628229d 100644 --- a/engines/e_4758_cca.c +++ b/engines/e_4758_cca.c @@ -182,7 +182,8 @@ static RSA_METHOD ibm_4758_cca_rsa = RSA_FLAG_SIGN_VER, /* flags */ NULL, /* app_data */ cca_rsa_sign, /* rsa_sign */ - cca_rsa_verify /* rsa_verify */ + cca_rsa_verify, /* rsa_verify */ + NULL /* rsa_keygen */ }; #endif @@ -223,6 +224,7 @@ static int bind_helper(ENGINE *e) return 1; } +#ifdef OPENSSL_NO_DYNAMIC_ENGINE static ENGINE *engine_4758_cca(void) { ENGINE *ret = ENGINE_new(); @@ -244,6 +246,7 @@ void ENGINE_load_4758cca(void) ENGINE_free(e_4758); ERR_clear_error(); } +#endif static int ibm_4758_cca_destroy(ENGINE *e) { @@ -715,7 +718,7 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len, if (type == NID_sha1 || type == NID_md5) { - memset(hashBuffer, 0, keyLength+1); + OPENSSL_cleanse(hashBuffer, keyLength+1); OPENSSL_free(hashBuffer); } @@ -838,7 +841,7 @@ static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len, if (type == NID_sha1 || type == NID_md5) { - memset(hashBuffer, 0, keyLength+1); + OPENSSL_cleanse(hashBuffer, keyLength+1); OPENSSL_free(hashBuffer); }