diff options
Diffstat (limited to 'src/lib/libcrypto/pkcs7/sign.c')
-rw-r--r-- | src/lib/libcrypto/pkcs7/sign.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pkcs7/sign.c b/src/lib/libcrypto/pkcs7/sign.c index d5f1154006..22290e192c 100644 --- a/src/lib/libcrypto/pkcs7/sign.c +++ b/src/lib/libcrypto/pkcs7/sign.c | |||
@@ -56,6 +56,7 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | #include <stdio.h> | 58 | #include <stdio.h> |
59 | #include <string.h> | ||
59 | #include <openssl/bio.h> | 60 | #include <openssl/bio.h> |
60 | #include <openssl/x509.h> | 61 | #include <openssl/x509.h> |
61 | #include <openssl/pem.h> | 62 | #include <openssl/pem.h> |
@@ -75,10 +76,18 @@ char *argv[]; | |||
75 | int i; | 76 | int i; |
76 | int nodetach=0; | 77 | int nodetach=0; |
77 | 78 | ||
79 | #ifndef NO_MD2 | ||
78 | EVP_add_digest(EVP_md2()); | 80 | EVP_add_digest(EVP_md2()); |
81 | #endif | ||
82 | #ifndef NO_MD5 | ||
79 | EVP_add_digest(EVP_md5()); | 83 | EVP_add_digest(EVP_md5()); |
84 | #endif | ||
85 | #ifndef NO_SHA1 | ||
80 | EVP_add_digest(EVP_sha1()); | 86 | EVP_add_digest(EVP_sha1()); |
87 | #endif | ||
88 | #ifndef NO_MDC2 | ||
81 | EVP_add_digest(EVP_mdc2()); | 89 | EVP_add_digest(EVP_mdc2()); |
90 | #endif | ||
82 | 91 | ||
83 | data=BIO_new(BIO_s_file()); | 92 | data=BIO_new(BIO_s_file()); |
84 | again: | 93 | again: |
@@ -97,9 +106,9 @@ again: | |||
97 | BIO_set_fp(data,stdin,BIO_NOCLOSE); | 106 | BIO_set_fp(data,stdin,BIO_NOCLOSE); |
98 | 107 | ||
99 | if ((in=BIO_new_file("server.pem","r")) == NULL) goto err; | 108 | if ((in=BIO_new_file("server.pem","r")) == NULL) goto err; |
100 | if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err; | 109 | if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err; |
101 | BIO_reset(in); | 110 | BIO_reset(in); |
102 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err; | 111 | if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL) goto err; |
103 | BIO_free(in); | 112 | BIO_free(in); |
104 | 113 | ||
105 | p7=PKCS7_new(); | 114 | p7=PKCS7_new(); |