diff options
author | beck <> | 2000-03-19 11:13:58 +0000 |
---|---|---|
committer | beck <> | 2000-03-19 11:13:58 +0000 |
commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/pkcs7/dec.c | |
parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'src/lib/libcrypto/pkcs7/dec.c')
-rw-r--r-- | src/lib/libcrypto/pkcs7/dec.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/lib/libcrypto/pkcs7/dec.c b/src/lib/libcrypto/pkcs7/dec.c index b3661f28d3..6752ec568a 100644 --- a/src/lib/libcrypto/pkcs7/dec.c +++ b/src/lib/libcrypto/pkcs7/dec.c | |||
@@ -57,6 +57,7 @@ | |||
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include <stdlib.h> | 59 | #include <stdlib.h> |
60 | #include <string.h> | ||
60 | #include <openssl/bio.h> | 61 | #include <openssl/bio.h> |
61 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
62 | #include <openssl/pem.h> | 63 | #include <openssl/pem.h> |
@@ -85,7 +86,7 @@ char *argv[]; | |||
85 | int i,printit=0; | 86 | int i,printit=0; |
86 | STACK_OF(PKCS7_SIGNER_INFO) *sk; | 87 | STACK_OF(PKCS7_SIGNER_INFO) *sk; |
87 | 88 | ||
88 | SSLeay_add_all_algorithms(); | 89 | OpenSSL_add_all_algorithms(); |
89 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | 90 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); |
90 | 91 | ||
91 | data=BIO_new(BIO_s_file()); | 92 | data=BIO_new(BIO_s_file()); |
@@ -121,9 +122,10 @@ char *argv[]; | |||
121 | } | 122 | } |
122 | 123 | ||
123 | if ((in=BIO_new_file(keyfile,"r")) == NULL) goto err; | 124 | if ((in=BIO_new_file(keyfile,"r")) == NULL) goto err; |
124 | if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err; | 125 | if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err; |
125 | BIO_reset(in); | 126 | BIO_reset(in); |
126 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err; | 127 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL) |
128 | goto err; | ||
127 | BIO_free(in); | 129 | BIO_free(in); |
128 | 130 | ||
129 | if (pp == NULL) | 131 | if (pp == NULL) |
@@ -131,7 +133,7 @@ char *argv[]; | |||
131 | 133 | ||
132 | 134 | ||
133 | /* Load the PKCS7 object from a file */ | 135 | /* Load the PKCS7 object from a file */ |
134 | if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL)) == NULL) goto err; | 136 | if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL,NULL)) == NULL) goto err; |
135 | 137 | ||
136 | 138 | ||
137 | 139 | ||
@@ -148,7 +150,7 @@ char *argv[]; | |||
148 | /* We need to process the data */ | 150 | /* We need to process the data */ |
149 | /* We cannot support detached encryption */ | 151 | /* We cannot support detached encryption */ |
150 | p7bio=PKCS7_dataDecode(p7,pkey,detached,x509); | 152 | p7bio=PKCS7_dataDecode(p7,pkey,detached,x509); |
151 | 153 | ||
152 | if (p7bio == NULL) | 154 | if (p7bio == NULL) |
153 | { | 155 | { |
154 | printf("problems decoding\n"); | 156 | printf("problems decoding\n"); |