summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa/rsa_saos.c
diff options
context:
space:
mode:
authorbeck <>2002-05-15 02:29:21 +0000
committerbeck <>2002-05-15 02:29:21 +0000
commitb64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch)
treefa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/rsa/rsa_saos.c
parente471e1ea98d673597b182ea85f29e30c97cd08b5 (diff)
downloadopenbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz
openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2
openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_saos.c')
-rw-r--r--src/lib/libcrypto/rsa/rsa_saos.c14
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
66int RSA_sign_ASN1_OCTET_STRING(int type, unsigned char *m, unsigned int m_len, 66int 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
103int RSA_verify_ASN1_OCTET_STRING(int dtype, unsigned char *m, 104int 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;