summaryrefslogtreecommitdiff
path: root/lib/libcrypto/asn1/t_pkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/asn1/t_pkey.c')
-rw-r--r--lib/libcrypto/asn1/t_pkey.c71
1 files changed, 20 insertions, 51 deletions
diff --git a/lib/libcrypto/asn1/t_pkey.c b/lib/libcrypto/asn1/t_pkey.c
index bc518d59a26..0dc6e30c3dd 100644
--- a/lib/libcrypto/asn1/t_pkey.c
+++ b/lib/libcrypto/asn1/t_pkey.c
@@ -58,35 +58,23 @@
#include <stdio.h>
#include "cryptlib.h"
-#include "buffer.h"
-#include "bn.h"
+#include <openssl/buffer.h>
+#include <openssl/bn.h>
#ifndef NO_RSA
-#include "rsa.h"
+#include <openssl/rsa.h>
#endif
#ifndef NO_DH
-#include "dh.h"
+#include <openssl/dh.h>
#endif
#ifndef NO_DSA
-#include "dsa.h"
+#include <openssl/dsa.h>
#endif
-/* DHerr(DH_F_DHPARAMS_PRINT,ERR_R_MALLOC_FAILURE);
- * DSAerr(DSA_F_DSAPARAMS_PRINT,ERR_R_MALLOC_FAILURE);
- */
-
-#ifndef NOPROTO
-static int print(BIO *fp,char *str,BIGNUM *num,
+static int print(BIO *fp,const char *str,BIGNUM *num,
unsigned char *buf,int off);
-#else
-static int print();
-#endif
-
#ifndef NO_RSA
#ifndef NO_FP_API
-int RSA_print_fp(fp,x,off)
-FILE *fp;
-RSA *x;
-int off;
+int RSA_print_fp(FILE *fp, RSA *x, int off)
{
BIO *b;
int ret;
@@ -103,12 +91,10 @@ int off;
}
#endif
-int RSA_print(bp,x,off)
-BIO *bp;
-RSA *x;
-int off;
+int RSA_print(BIO *bp, RSA *x, int off)
{
- char str[128],*s;
+ char str[128];
+ const char *s;
unsigned char *m=NULL;
int i,ret=0;
@@ -154,10 +140,7 @@ err:
#ifndef NO_DSA
#ifndef NO_FP_API
-int DSA_print_fp(fp,x,off)
-FILE *fp;
-DSA *x;
-int off;
+int DSA_print_fp(FILE *fp, DSA *x, int off)
{
BIO *b;
int ret;
@@ -174,10 +157,7 @@ int off;
}
#endif
-int DSA_print(bp,x,off)
-BIO *bp;
-DSA *x;
-int off;
+int DSA_print(BIO *bp, DSA *x, int off)
{
char str[128];
unsigned char *m=NULL;
@@ -229,15 +209,12 @@ err:
}
#endif /* !NO_DSA */
-static int print(bp,number,num,buf,off)
-BIO *bp;
-char *number;
-BIGNUM *num;
-unsigned char *buf;
-int off;
+static int print(BIO *bp, const char *number, BIGNUM *num, unsigned char *buf,
+ int off)
{
int n,i;
- char str[128],*neg;
+ char str[128];
+ const char *neg;
if (num == NULL) return(1);
neg=(num->neg)?"-":"";
@@ -284,9 +261,7 @@ int off;
#ifndef NO_DH
#ifndef NO_FP_API
-int DHparams_print_fp(fp,x)
-FILE *fp;
-DH *x;
+int DHparams_print_fp(FILE *fp, DH *x)
{
BIO *b;
int ret;
@@ -303,9 +278,7 @@ DH *x;
}
#endif
-int DHparams_print(bp,x)
-BIO *bp;
-DH *x;
+int DHparams_print(BIO *bp, DH *x)
{
unsigned char *m=NULL;
int reason=ERR_R_BUF_LIB,i,ret=0;
@@ -341,9 +314,7 @@ err:
#ifndef NO_DSA
#ifndef NO_FP_API
-int DSAparams_print_fp(fp,x)
-FILE *fp;
-DSA *x;
+int DSAparams_print_fp(FILE *fp, DSA *x)
{
BIO *b;
int ret;
@@ -360,9 +331,7 @@ DSA *x;
}
#endif
-int DSAparams_print(bp,x)
-BIO *bp;
-DSA *x;
+int DSAparams_print(BIO *bp, DSA *x)
{
unsigned char *m=NULL;
int reason=ERR_R_BUF_LIB,i,ret=0;