diff options
Diffstat (limited to 'src/lib/libssl/src/apps/dsa.c')
-rw-r--r-- | src/lib/libssl/src/apps/dsa.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/lib/libssl/src/apps/dsa.c b/src/lib/libssl/src/apps/dsa.c index fbd85a467a..fedecf2739 100644 --- a/src/lib/libssl/src/apps/dsa.c +++ b/src/lib/libssl/src/apps/dsa.c | |||
@@ -56,17 +56,18 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #ifndef NO_DSA | ||
59 | #include <stdio.h> | 60 | #include <stdio.h> |
60 | #include <stdlib.h> | 61 | #include <stdlib.h> |
61 | #include <string.h> | 62 | #include <string.h> |
62 | #include <time.h> | 63 | #include <time.h> |
63 | #include "apps.h" | 64 | #include "apps.h" |
64 | #include "bio.h" | 65 | #include <openssl/bio.h> |
65 | #include "err.h" | 66 | #include <openssl/err.h> |
66 | #include "dsa.h" | 67 | #include <openssl/dsa.h> |
67 | #include "evp.h" | 68 | #include <openssl/evp.h> |
68 | #include "x509.h" | 69 | #include <openssl/x509.h> |
69 | #include "pem.h" | 70 | #include <openssl/pem.h> |
70 | 71 | ||
71 | #undef PROG | 72 | #undef PROG |
72 | #define PROG dsa_main | 73 | #define PROG dsa_main |
@@ -82,14 +83,12 @@ | |||
82 | * -modulus - print the DSA public key | 83 | * -modulus - print the DSA public key |
83 | */ | 84 | */ |
84 | 85 | ||
85 | int MAIN(argc, argv) | 86 | int MAIN(int argc, char **argv) |
86 | int argc; | ||
87 | char **argv; | ||
88 | { | 87 | { |
89 | int ret=1; | 88 | int ret=1; |
90 | DSA *dsa=NULL; | 89 | DSA *dsa=NULL; |
91 | int i,badops=0; | 90 | int i,badops=0; |
92 | EVP_CIPHER *enc=NULL; | 91 | const EVP_CIPHER *enc=NULL; |
93 | BIO *in=NULL,*out=NULL; | 92 | BIO *in=NULL,*out=NULL; |
94 | int informat,outformat,text=0,noout=0; | 93 | int informat,outformat,text=0,noout=0; |
95 | char *infile,*outfile,*prog; | 94 | char *infile,*outfile,*prog; |
@@ -154,7 +153,7 @@ bad: | |||
154 | BIO_printf(bio_err,"where options are\n"); | 153 | BIO_printf(bio_err,"where options are\n"); |
155 | BIO_printf(bio_err," -inform arg input format - one of DER NET PEM\n"); | 154 | BIO_printf(bio_err," -inform arg input format - one of DER NET PEM\n"); |
156 | BIO_printf(bio_err," -outform arg output format - one of DER NET PEM\n"); | 155 | BIO_printf(bio_err," -outform arg output format - one of DER NET PEM\n"); |
157 | BIO_printf(bio_err," -in arg inout file\n"); | 156 | BIO_printf(bio_err," -in arg input file\n"); |
158 | BIO_printf(bio_err," -out arg output file\n"); | 157 | BIO_printf(bio_err," -out arg output file\n"); |
159 | BIO_printf(bio_err," -des encrypt PEM output with cbc des\n"); | 158 | BIO_printf(bio_err," -des encrypt PEM output with cbc des\n"); |
160 | BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n"); | 159 | BIO_printf(bio_err," -des3 encrypt PEM output with ede cbc des using 168 bit key\n"); |
@@ -192,7 +191,7 @@ bad: | |||
192 | if (informat == FORMAT_ASN1) | 191 | if (informat == FORMAT_ASN1) |
193 | dsa=d2i_DSAPrivateKey_bio(in,NULL); | 192 | dsa=d2i_DSAPrivateKey_bio(in,NULL); |
194 | else if (informat == FORMAT_PEM) | 193 | else if (informat == FORMAT_PEM) |
195 | dsa=PEM_read_bio_DSAPrivateKey(in,NULL,NULL); | 194 | dsa=PEM_read_bio_DSAPrivateKey(in,NULL,NULL,NULL); |
196 | else | 195 | else |
197 | { | 196 | { |
198 | BIO_printf(bio_err,"bad input format specified for key\n"); | 197 | BIO_printf(bio_err,"bad input format specified for key\n"); |
@@ -236,7 +235,7 @@ bad: | |||
236 | if (outformat == FORMAT_ASN1) | 235 | if (outformat == FORMAT_ASN1) |
237 | i=i2d_DSAPrivateKey_bio(out,dsa); | 236 | i=i2d_DSAPrivateKey_bio(out,dsa); |
238 | else if (outformat == FORMAT_PEM) | 237 | else if (outformat == FORMAT_PEM) |
239 | i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,NULL); | 238 | i=PEM_write_bio_DSAPrivateKey(out,dsa,enc,NULL,0,NULL,NULL); |
240 | else { | 239 | else { |
241 | BIO_printf(bio_err,"bad output format specified for outfile\n"); | 240 | BIO_printf(bio_err,"bad output format specified for outfile\n"); |
242 | goto end; | 241 | goto end; |
@@ -254,4 +253,4 @@ end: | |||
254 | if (dsa != NULL) DSA_free(dsa); | 253 | if (dsa != NULL) DSA_free(dsa); |
255 | EXIT(ret); | 254 | EXIT(ret); |
256 | } | 255 | } |
257 | 256 | #endif | |