summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/t_pkey.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/asn1/t_pkey.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/asn1/t_pkey.c')
-rw-r--r--src/lib/libcrypto/asn1/t_pkey.c71
1 files changed, 20 insertions, 51 deletions
diff --git a/src/lib/libcrypto/asn1/t_pkey.c b/src/lib/libcrypto/asn1/t_pkey.c
index bc518d59a2..0dc6e30c3d 100644
--- a/src/lib/libcrypto/asn1/t_pkey.c
+++ b/src/lib/libcrypto/asn1/t_pkey.c
@@ -58,35 +58,23 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include "buffer.h" 61#include <openssl/buffer.h>
62#include "bn.h" 62#include <openssl/bn.h>
63#ifndef NO_RSA 63#ifndef NO_RSA
64#include "rsa.h" 64#include <openssl/rsa.h>
65#endif 65#endif
66#ifndef NO_DH 66#ifndef NO_DH
67#include "dh.h" 67#include <openssl/dh.h>
68#endif 68#endif
69#ifndef NO_DSA 69#ifndef NO_DSA
70#include "dsa.h" 70#include <openssl/dsa.h>
71#endif 71#endif
72 72
73/* DHerr(DH_F_DHPARAMS_PRINT,ERR_R_MALLOC_FAILURE); 73static int print(BIO *fp,const char *str,BIGNUM *num,
74 * DSAerr(DSA_F_DSAPARAMS_PRINT,ERR_R_MALLOC_FAILURE);
75 */
76
77#ifndef NOPROTO
78static int print(BIO *fp,char *str,BIGNUM *num,
79 unsigned char *buf,int off); 74 unsigned char *buf,int off);
80#else
81static int print();
82#endif
83
84#ifndef NO_RSA 75#ifndef NO_RSA
85#ifndef NO_FP_API 76#ifndef NO_FP_API
86int RSA_print_fp(fp,x,off) 77int RSA_print_fp(FILE *fp, RSA *x, int off)
87FILE *fp;
88RSA *x;
89int off;
90 { 78 {
91 BIO *b; 79 BIO *b;
92 int ret; 80 int ret;
@@ -103,12 +91,10 @@ int off;
103 } 91 }
104#endif 92#endif
105 93
106int RSA_print(bp,x,off) 94int RSA_print(BIO *bp, RSA *x, int off)
107BIO *bp;
108RSA *x;
109int off;
110 { 95 {
111 char str[128],*s; 96 char str[128];
97 const char *s;
112 unsigned char *m=NULL; 98 unsigned char *m=NULL;
113 int i,ret=0; 99 int i,ret=0;
114 100
@@ -154,10 +140,7 @@ err:
154 140
155#ifndef NO_DSA 141#ifndef NO_DSA
156#ifndef NO_FP_API 142#ifndef NO_FP_API
157int DSA_print_fp(fp,x,off) 143int DSA_print_fp(FILE *fp, DSA *x, int off)
158FILE *fp;
159DSA *x;
160int off;
161 { 144 {
162 BIO *b; 145 BIO *b;
163 int ret; 146 int ret;
@@ -174,10 +157,7 @@ int off;
174 } 157 }
175#endif 158#endif
176 159
177int DSA_print(bp,x,off) 160int DSA_print(BIO *bp, DSA *x, int off)
178BIO *bp;
179DSA *x;
180int off;
181 { 161 {
182 char str[128]; 162 char str[128];
183 unsigned char *m=NULL; 163 unsigned char *m=NULL;
@@ -229,15 +209,12 @@ err:
229 } 209 }
230#endif /* !NO_DSA */ 210#endif /* !NO_DSA */
231 211
232static int print(bp,number,num,buf,off) 212static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
233BIO *bp; 213 int off)
234char *number;
235BIGNUM *num;
236unsigned char *buf;
237int off;
238 { 214 {
239 int n,i; 215 int n,i;
240 char str[128],*neg; 216 char str[128];
217 const char *neg;
241 218
242 if (num == NULL) return(1); 219 if (num == NULL) return(1);
243 neg=(num->neg)?"-":""; 220 neg=(num->neg)?"-":"";
@@ -284,9 +261,7 @@ int off;
284 261
285#ifndef NO_DH 262#ifndef NO_DH
286#ifndef NO_FP_API 263#ifndef NO_FP_API
287int DHparams_print_fp(fp,x) 264int DHparams_print_fp(FILE *fp, DH *x)
288FILE *fp;
289DH *x;
290 { 265 {
291 BIO *b; 266 BIO *b;
292 int ret; 267 int ret;
@@ -303,9 +278,7 @@ DH *x;
303 } 278 }
304#endif 279#endif
305 280
306int DHparams_print(bp,x) 281int DHparams_print(BIO *bp, DH *x)
307BIO *bp;
308DH *x;
309 { 282 {
310 unsigned char *m=NULL; 283 unsigned char *m=NULL;
311 int reason=ERR_R_BUF_LIB,i,ret=0; 284 int reason=ERR_R_BUF_LIB,i,ret=0;
@@ -341,9 +314,7 @@ err:
341 314
342#ifndef NO_DSA 315#ifndef NO_DSA
343#ifndef NO_FP_API 316#ifndef NO_FP_API
344int DSAparams_print_fp(fp,x) 317int DSAparams_print_fp(FILE *fp, DSA *x)
345FILE *fp;
346DSA *x;
347 { 318 {
348 BIO *b; 319 BIO *b;
349 int ret; 320 int ret;
@@ -360,9 +331,7 @@ DSA *x;
360 } 331 }
361#endif 332#endif
362 333
363int DSAparams_print(bp,x) 334int DSAparams_print(BIO *bp, DSA *x)
364BIO *bp;
365DSA *x;
366 { 335 {
367 unsigned char *m=NULL; 336 unsigned char *m=NULL;
368 int reason=ERR_R_BUF_LIB,i,ret=0; 337 int reason=ERR_R_BUF_LIB,i,ret=0;