]> granicus.if.org Git - openssl/commitdiff
DO NOT constify RSA* in RSA_sign() and RSA_verify(), since there are function
authorRichard Levitte <levitte@openssl.org>
Wed, 7 May 2003 11:38:13 +0000 (11:38 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 7 May 2003 11:38:13 +0000 (11:38 +0000)
called downstream that need it to be non-const.  The fact that the RSA_METHOD
functions take the RSA* as a const doesn't matter, it just expresses that
*they* won't touch it.
PR: 602

crypto/rsa/rsa.h
crypto/rsa/rsa_sign.c

index 9cb0dab1d0dd054e8b6a988450c257fd6d59f17b..62fa745f79e37ba5a5ea7559728f40f5f6fb0f2e 100644 (file)
@@ -240,9 +240,9 @@ RSA *d2i_Netscape_RSA(RSA **a, const unsigned char **pp, long length, int (*cb)(
 /* The following 2 functions sign and verify a X509_SIG ASN1 object
  * inside PKCS#1 padded RSA encryption */
 int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
-       unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
+       unsigned char *sigret, unsigned int *siglen, RSA *rsa);
 int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
-       unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
+       unsigned char *sigbuf, unsigned int siglen, RSA *rsa);
 
 /* The following 2 function sign and verify a ASN1_OCTET_STRING
  * object inside PKCS#1 padded RSA encryption */
index fa73859f3a90f55a91261e23d6a05bc32020dc27..8a1e642183c43e82d3a11d27aa05413eddcbb7ea 100644 (file)
@@ -67,7 +67,7 @@
 #define SSL_SIG_LENGTH 36
 
 int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
-            unsigned char *sigret, unsigned int *siglen, const RSA *rsa)
+            unsigned char *sigret, unsigned int *siglen, RSA *rsa)
        {
        X509_SIG sig;
        ASN1_TYPE parameter;
@@ -143,7 +143,7 @@ int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
        }
 
 int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
-            unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)
+            unsigned char *sigbuf, unsigned int siglen, RSA *rsa)
        {
        int i,ret=0,sigtype;
        unsigned char *p,*s;