Constify the RSA library.
[openssl.git] / crypto / rsa / rsa_saos.c
index c77f4381ffb11a20c9c29bd8c01419a7438aceb0..85adacc08fdece5ae290e4cf626243fd4349cdf0 100644 (file)
@@ -63,8 +63,9 @@
 #include <openssl/objects.h>
 #include <openssl/x509.h>
 
 #include <openssl/objects.h>
 #include <openssl/x509.h>
 
-int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
-            unsigned char *sigret, unsigned int *siglen, RSA *rsa)
+int RSA_sign_ASN1_OCTET_STRING(int type,
+       const unsigned char *m, unsigned int m_len,
+       unsigned char *sigret, unsigned int *siglen, RSA *rsa)
        {
        ASN1_OCTET_STRING sig;
        int i,j,ret=1;
        {
        ASN1_OCTET_STRING sig;
        int i,j,ret=1;
@@ -72,7 +73,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
 
        sig.type=V_ASN1_OCTET_STRING;
        sig.length=m_len;
 
        sig.type=V_ASN1_OCTET_STRING;
        sig.length=m_len;
-       sig.data=m;
+       sig.data=(unsigned char *)m;
 
        i=i2d_ASN1_OCTET_STRING(&sig,NULL);
        j=RSA_size(rsa);
 
        i=i2d_ASN1_OCTET_STRING(&sig,NULL);
        j=RSA_size(rsa);
@@ -100,9 +101,10 @@ int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len,
        return(ret);
        }
 
        return(ret);
        }
 
-int RSA_verify_ASN1_OCTET_STRING(int dtype, unsigned char *m,
-            unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
-            RSA *rsa)
+int RSA_verify_ASN1_OCTET_STRING(int dtype,
+       const unsigned char *m,
+       unsigned int m_len, unsigned char *sigbuf, unsigned int siglen,
+       RSA *rsa)
        {
        int i,ret=0;
        unsigned char *p,*s;
        {
        int i,ret=0;
        unsigned char *p,*s;