Unsigned vs. signed fixed.
[openssl.git] / engines / e_4758_cca.c
index 203a8a75e6716327e67ed205d1aaa0971237ddfd..68a628229d65b2a7a9c6f8ad3fad800ed68af51d 100644 (file)
@@ -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);
                }