diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/asn1/x_pkey.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2 openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip |
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/asn1/x_pkey.c')
-rw-r--r-- | src/lib/libcrypto/asn1/x_pkey.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/lib/libcrypto/asn1/x_pkey.c b/src/lib/libcrypto/asn1/x_pkey.c index 1d4d926129..b0057eb212 100644 --- a/src/lib/libcrypto/asn1/x_pkey.c +++ b/src/lib/libcrypto/asn1/x_pkey.c | |||
@@ -58,25 +58,18 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include "evp.h" | 61 | #include <openssl/evp.h> |
62 | #include "objects.h" | 62 | #include <openssl/objects.h> |
63 | #include "asn1_mac.h" | 63 | #include <openssl/asn1_mac.h> |
64 | 64 | #include <openssl/x509.h> | |
65 | /* ASN1err(ASN1_F_D2I_X509_PKEY,ASN1_R_UNSUPPORTED_CIPHER); */ | ||
66 | /* ASN1err(ASN1_F_X509_PKEY_NEW,ASN1_R_IV_TOO_LARGE); */ | ||
67 | 65 | ||
68 | /* need to implement */ | 66 | /* need to implement */ |
69 | int i2d_X509_PKEY(a,pp) | 67 | int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp) |
70 | X509_PKEY *a; | ||
71 | unsigned char **pp; | ||
72 | { | 68 | { |
73 | return(0); | 69 | return(0); |
74 | } | 70 | } |
75 | 71 | ||
76 | X509_PKEY *d2i_X509_PKEY(a,pp,length) | 72 | X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, unsigned char **pp, long length) |
77 | X509_PKEY **a; | ||
78 | unsigned char **pp; | ||
79 | long length; | ||
80 | { | 73 | { |
81 | int i; | 74 | int i; |
82 | M_ASN1_D2I_vars(a,X509_PKEY *,X509_PKEY_new); | 75 | M_ASN1_D2I_vars(a,X509_PKEY *,X509_PKEY_new); |
@@ -91,6 +84,7 @@ long length; | |||
91 | if (ret->cipher.cipher == NULL) | 84 | if (ret->cipher.cipher == NULL) |
92 | { | 85 | { |
93 | c.error=ASN1_R_UNSUPPORTED_CIPHER; | 86 | c.error=ASN1_R_UNSUPPORTED_CIPHER; |
87 | c.line=__LINE__; | ||
94 | goto err; | 88 | goto err; |
95 | } | 89 | } |
96 | if (ret->enc_algor->parameter->type == V_ASN1_OCTET_STRING) | 90 | if (ret->enc_algor->parameter->type == V_ASN1_OCTET_STRING) |
@@ -99,6 +93,7 @@ long length; | |||
99 | if (i > EVP_MAX_IV_LENGTH) | 93 | if (i > EVP_MAX_IV_LENGTH) |
100 | { | 94 | { |
101 | c.error=ASN1_R_IV_TOO_LARGE; | 95 | c.error=ASN1_R_IV_TOO_LARGE; |
96 | c.line=__LINE__; | ||
102 | goto err; | 97 | goto err; |
103 | } | 98 | } |
104 | memcpy(ret->cipher.iv, | 99 | memcpy(ret->cipher.iv, |
@@ -109,9 +104,10 @@ long length; | |||
109 | M_ASN1_D2I_Finish(a,X509_PKEY_free,ASN1_F_D2I_X509_PKEY); | 104 | M_ASN1_D2I_Finish(a,X509_PKEY_free,ASN1_F_D2I_X509_PKEY); |
110 | } | 105 | } |
111 | 106 | ||
112 | X509_PKEY *X509_PKEY_new() | 107 | X509_PKEY *X509_PKEY_new(void) |
113 | { | 108 | { |
114 | X509_PKEY *ret=NULL; | 109 | X509_PKEY *ret=NULL; |
110 | ASN1_CTX c; | ||
115 | 111 | ||
116 | M_ASN1_New_Malloc(ret,X509_PKEY); | 112 | M_ASN1_New_Malloc(ret,X509_PKEY); |
117 | ret->version=0; | 113 | ret->version=0; |
@@ -128,8 +124,7 @@ X509_PKEY *X509_PKEY_new() | |||
128 | M_ASN1_New_Error(ASN1_F_X509_PKEY_NEW); | 124 | M_ASN1_New_Error(ASN1_F_X509_PKEY_NEW); |
129 | } | 125 | } |
130 | 126 | ||
131 | void X509_PKEY_free(x) | 127 | void X509_PKEY_free(X509_PKEY *x) |
132 | X509_PKEY *x; | ||
133 | { | 128 | { |
134 | int i; | 129 | int i; |
135 | 130 | ||