Constify RSA_sign() and RSA_verify().

PR: 602
This commit is contained in:
Richard Levitte 2003-05-05 13:55:23 +00:00
parent 8c5e375c8e
commit 0e2f5ec2d2
2 changed files with 4 additions and 4 deletions

View 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 /* The following 2 functions sign and verify a X509_SIG ASN1 object
* inside PKCS#1 padded RSA encryption */ * inside PKCS#1 padded RSA encryption */
int RSA_sign(int type, const unsigned char *m, unsigned int m_length, int RSA_sign(int type, const unsigned char *m, unsigned int m_length,
unsigned char *sigret, unsigned int *siglen, RSA *rsa); unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
int RSA_verify(int type, const unsigned char *m, unsigned int m_length, int RSA_verify(int type, const unsigned char *m, unsigned int m_length,
unsigned char *sigbuf, unsigned int siglen, RSA *rsa); unsigned char *sigbuf, unsigned int siglen, const RSA *rsa);
/* The following 2 function sign and verify a ASN1_OCTET_STRING /* The following 2 function sign and verify a ASN1_OCTET_STRING
* object inside PKCS#1 padded RSA encryption */ * object inside PKCS#1 padded RSA encryption */

View File

@ -67,7 +67,7 @@
#define SSL_SIG_LENGTH 36 #define SSL_SIG_LENGTH 36
int RSA_sign(int type, const unsigned char *m, unsigned int m_len, int RSA_sign(int type, const unsigned char *m, unsigned int m_len,
unsigned char *sigret, unsigned int *siglen, RSA *rsa) unsigned char *sigret, unsigned int *siglen, const RSA *rsa)
{ {
X509_SIG sig; X509_SIG sig;
ASN1_TYPE parameter; 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, int RSA_verify(int dtype, const unsigned char *m, unsigned int m_len,
unsigned char *sigbuf, unsigned int siglen, RSA *rsa) unsigned char *sigbuf, unsigned int siglen, const RSA *rsa)
{ {
int i,ret=0,sigtype; int i,ret=0,sigtype;
unsigned char *p,*s; unsigned char *p,*s;