Revert the size_t modifications from HEAD that had led to more
[openssl.git] / engines / e_4758cca.c
index 6bab385435972c85fa53d3211bfc2c6e28f38a84..9f6572e677191aa56a657d3f1fb7a8e1a18aafb3 100644 (file)
@@ -92,7 +92,7 @@ static int cca_rsa_priv_dec(int flen, const unsigned char *from,
 static int cca_rsa_sign(int type, const unsigned char *m, unsigned int m_len,
                unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
 static int cca_rsa_verify(int dtype, const unsigned char *m, unsigned int m_len,
-               unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
+       const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
 
 /* utility functions */
 /*-----------------------*/
@@ -482,8 +482,6 @@ static EVP_PKEY *ibm_4758_load_privkey(ENGINE* e, const char* key_id,
 err:
        if (keyToken)
                OPENSSL_free(keyToken);
-       if (rtmp)
-               RSA_free(rtmp);
        return NULL;
        }
 
@@ -558,8 +556,6 @@ static EVP_PKEY *ibm_4758_load_pubkey(ENGINE* e, const char* key_id,
 err:
        if (keyToken)
                OPENSSL_free(keyToken);
-       if (rtmp)
-               RSA_free(rtmp);
        return NULL;
        }
 
@@ -622,7 +618,7 @@ static int cca_rsa_priv_dec(int flen, const unsigned char *from,
 #define SSL_SIG_LEN 36
 
 static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
-               unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)
+       const unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)
        {
        long returnCode;
        long reasonCode;
@@ -731,7 +727,8 @@ static int cca_rsa_verify(int type, const unsigned char *m, unsigned int m_len,
 
        digitalSignatureVerify(&returnCode, &reasonCode, &exitDataLength,
                exitData, &ruleArrayLength, ruleArray, &keyTokenLength,
-               keyToken, &length, hashBuffer, &lsiglen, sigbuf);
+               keyToken, &length, hashBuffer, &lsiglen,
+                                               (unsigned char *)sigbuf);
 
        if (type == NID_sha1 || type == NID_md5)
                {