diff options
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_saos.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_saos.c b/src/lib/libcrypto/rsa/rsa_saos.c index c77f4381ff..85adacc08f 100644 --- a/src/lib/libcrypto/rsa/rsa_saos.c +++ b/src/lib/libcrypto/rsa/rsa_saos.c | |||
@@ -63,8 +63,9 @@ | |||
63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
65 | 65 | ||
66 | int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, | 66 | int RSA_sign_ASN1_OCTET_STRING(int type, |
67 | unsigned char *sigret, unsigned int *siglen, RSA *rsa) | 67 | const unsigned char *m, unsigned int m_len, |
68 | unsigned char *sigret, unsigned int *siglen, RSA *rsa) | ||
68 | { | 69 | { |
69 | ASN1_OCTET_STRING sig; | 70 | ASN1_OCTET_STRING sig; |
70 | int i,j,ret=1; | 71 | int i,j,ret=1; |
@@ -72,7 +73,7 @@ int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, | |||
72 | 73 | ||
73 | sig.type=V_ASN1_OCTET_STRING; | 74 | sig.type=V_ASN1_OCTET_STRING; |
74 | sig.length=m_len; | 75 | sig.length=m_len; |
75 | sig.data=m; | 76 | sig.data=(unsigned char *)m; |
76 | 77 | ||
77 | i=i2d_ASN1_OCTET_STRING(&sig,NULL); | 78 | i=i2d_ASN1_OCTET_STRING(&sig,NULL); |
78 | j=RSA_size(rsa); | 79 | j=RSA_size(rsa); |
@@ -100,9 +101,10 @@ int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, | |||
100 | return(ret); | 101 | return(ret); |
101 | } | 102 | } |
102 | 103 | ||
103 | int RSA_verify_ASN1_OCTET_STRING(int dtype, unsigned char *m, | 104 | int RSA_verify_ASN1_OCTET_STRING(int dtype, |
104 | unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, | 105 | const unsigned char *m, |
105 | RSA *rsa) | 106 | unsigned int m_len, unsigned char *sigbuf, unsigned int siglen, |
107 | RSA *rsa) | ||
106 | { | 108 | { |
107 | int i,ret=0; | 109 | int i,ret=0; |
108 | unsigned char *p,*s; | 110 | unsigned char *p,*s; |