diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_pkey.c | 42 | ||||
| -rw-r--r-- | src/lib/libcrypto/x509/x509.h | 4 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/asn1/x_pkey.c | 42 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/x509/x509.h | 4 |
4 files changed, 4 insertions, 88 deletions
diff --git a/src/lib/libcrypto/asn1/x_pkey.c b/src/lib/libcrypto/asn1/x_pkey.c index d454afb72b..9523740af7 100644 --- a/src/lib/libcrypto/asn1/x_pkey.c +++ b/src/lib/libcrypto/asn1/x_pkey.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x_pkey.c,v 1.15 2014/07/12 16:03:36 miod Exp $ */ | 1 | /* $OpenBSD: x_pkey.c,v 1.16 2015/04/12 15:15:51 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -65,46 +65,6 @@ | |||
| 65 | #include <openssl/objects.h> | 65 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 66 | #include <openssl/x509.h> |
| 67 | 67 | ||
| 68 | /* need to implement */ | ||
| 69 | int | ||
| 70 | i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp) | ||
| 71 | { | ||
| 72 | return (0); | ||
| 73 | } | ||
| 74 | |||
| 75 | X509_PKEY * | ||
| 76 | d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp, long length) | ||
| 77 | { | ||
| 78 | int i; | ||
| 79 | M_ASN1_D2I_vars(a, X509_PKEY *, X509_PKEY_new); | ||
| 80 | |||
| 81 | M_ASN1_D2I_Init(); | ||
| 82 | M_ASN1_D2I_start_sequence(); | ||
| 83 | M_ASN1_D2I_get_x(X509_ALGOR, ret->enc_algor, d2i_X509_ALGOR); | ||
| 84 | M_ASN1_D2I_get_x(ASN1_OCTET_STRING, ret->enc_pkey, | ||
| 85 | d2i_ASN1_OCTET_STRING); | ||
| 86 | |||
| 87 | ret->cipher.cipher = EVP_get_cipherbyname( | ||
| 88 | OBJ_nid2ln(OBJ_obj2nid(ret->enc_algor->algorithm))); | ||
| 89 | if (ret->cipher.cipher == NULL) { | ||
| 90 | c.error = ASN1_R_UNSUPPORTED_CIPHER; | ||
| 91 | c.line = __LINE__; | ||
| 92 | goto err; | ||
| 93 | } | ||
| 94 | if (ret->enc_algor->parameter->type == V_ASN1_OCTET_STRING) { | ||
| 95 | i = ret->enc_algor->parameter->value.octet_string->length; | ||
| 96 | if (i > EVP_MAX_IV_LENGTH) { | ||
| 97 | c.error = ASN1_R_IV_TOO_LARGE; | ||
| 98 | c.line = __LINE__; | ||
| 99 | goto err; | ||
| 100 | } | ||
| 101 | memcpy(ret->cipher.iv, | ||
| 102 | ret->enc_algor->parameter->value.octet_string->data, i); | ||
| 103 | } else | ||
| 104 | memset(ret->cipher.iv, 0, EVP_MAX_IV_LENGTH); | ||
| 105 | M_ASN1_D2I_Finish(a, X509_PKEY_free, ASN1_F_D2I_X509_PKEY); | ||
| 106 | } | ||
| 107 | |||
| 108 | X509_PKEY * | 68 | X509_PKEY * |
| 109 | X509_PKEY_new(void) | 69 | X509_PKEY_new(void) |
| 110 | { | 70 | { |
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index ec6668d35e..cf00ea5ebe 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509.h,v 1.22 2015/02/11 02:17:59 jsing Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.23 2015/04/12 15:15:51 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -857,8 +857,6 @@ int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x); | |||
| 857 | 857 | ||
| 858 | X509_PKEY * X509_PKEY_new(void ); | 858 | X509_PKEY * X509_PKEY_new(void ); |
| 859 | void X509_PKEY_free(X509_PKEY *a); | 859 | void X509_PKEY_free(X509_PKEY *a); |
| 860 | int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); | ||
| 861 | X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length); | ||
| 862 | 860 | ||
| 863 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) | 861 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) |
| 864 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) | 862 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) |
diff --git a/src/lib/libssl/src/crypto/asn1/x_pkey.c b/src/lib/libssl/src/crypto/asn1/x_pkey.c index d454afb72b..9523740af7 100644 --- a/src/lib/libssl/src/crypto/asn1/x_pkey.c +++ b/src/lib/libssl/src/crypto/asn1/x_pkey.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x_pkey.c,v 1.15 2014/07/12 16:03:36 miod Exp $ */ | 1 | /* $OpenBSD: x_pkey.c,v 1.16 2015/04/12 15:15:51 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -65,46 +65,6 @@ | |||
| 65 | #include <openssl/objects.h> | 65 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 66 | #include <openssl/x509.h> |
| 67 | 67 | ||
| 68 | /* need to implement */ | ||
| 69 | int | ||
| 70 | i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp) | ||
| 71 | { | ||
| 72 | return (0); | ||
| 73 | } | ||
| 74 | |||
| 75 | X509_PKEY * | ||
| 76 | d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp, long length) | ||
| 77 | { | ||
| 78 | int i; | ||
| 79 | M_ASN1_D2I_vars(a, X509_PKEY *, X509_PKEY_new); | ||
| 80 | |||
| 81 | M_ASN1_D2I_Init(); | ||
| 82 | M_ASN1_D2I_start_sequence(); | ||
| 83 | M_ASN1_D2I_get_x(X509_ALGOR, ret->enc_algor, d2i_X509_ALGOR); | ||
| 84 | M_ASN1_D2I_get_x(ASN1_OCTET_STRING, ret->enc_pkey, | ||
| 85 | d2i_ASN1_OCTET_STRING); | ||
| 86 | |||
| 87 | ret->cipher.cipher = EVP_get_cipherbyname( | ||
| 88 | OBJ_nid2ln(OBJ_obj2nid(ret->enc_algor->algorithm))); | ||
| 89 | if (ret->cipher.cipher == NULL) { | ||
| 90 | c.error = ASN1_R_UNSUPPORTED_CIPHER; | ||
| 91 | c.line = __LINE__; | ||
| 92 | goto err; | ||
| 93 | } | ||
| 94 | if (ret->enc_algor->parameter->type == V_ASN1_OCTET_STRING) { | ||
| 95 | i = ret->enc_algor->parameter->value.octet_string->length; | ||
| 96 | if (i > EVP_MAX_IV_LENGTH) { | ||
| 97 | c.error = ASN1_R_IV_TOO_LARGE; | ||
| 98 | c.line = __LINE__; | ||
| 99 | goto err; | ||
| 100 | } | ||
| 101 | memcpy(ret->cipher.iv, | ||
| 102 | ret->enc_algor->parameter->value.octet_string->data, i); | ||
| 103 | } else | ||
| 104 | memset(ret->cipher.iv, 0, EVP_MAX_IV_LENGTH); | ||
| 105 | M_ASN1_D2I_Finish(a, X509_PKEY_free, ASN1_F_D2I_X509_PKEY); | ||
| 106 | } | ||
| 107 | |||
| 108 | X509_PKEY * | 68 | X509_PKEY * |
| 109 | X509_PKEY_new(void) | 69 | X509_PKEY_new(void) |
| 110 | { | 70 | { |
diff --git a/src/lib/libssl/src/crypto/x509/x509.h b/src/lib/libssl/src/crypto/x509/x509.h index ec6668d35e..cf00ea5ebe 100644 --- a/src/lib/libssl/src/crypto/x509/x509.h +++ b/src/lib/libssl/src/crypto/x509/x509.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509.h,v 1.22 2015/02/11 02:17:59 jsing Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.23 2015/04/12 15:15:51 doug Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -857,8 +857,6 @@ int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x); | |||
| 857 | 857 | ||
| 858 | X509_PKEY * X509_PKEY_new(void ); | 858 | X509_PKEY * X509_PKEY_new(void ); |
| 859 | void X509_PKEY_free(X509_PKEY *a); | 859 | void X509_PKEY_free(X509_PKEY *a); |
| 860 | int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); | ||
| 861 | X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length); | ||
| 862 | 860 | ||
| 863 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) | 861 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) |
| 864 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) | 862 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) |
