aboutsummaryrefslogtreecommitdiff
path: root/crypto/x509/x_pkey.c
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2014-11-02 17:10:27 -0500
committerAdam Langley <agl@google.com>2014-11-10 22:28:23 +0000
commitb044020f84803dca2878b84e314b4f74f13d4c80 (patch)
tree480d78046179c3559b538baa3545243065c348b1 /crypto/x509/x_pkey.c
parent9ed9dae18e54fd50e5fb0a290f1d279fe0f02078 (diff)
downloadboringssl-b044020f84803dca2878b84e314b4f74f13d4c80.zip
boringssl-b044020f84803dca2878b84e314b4f74f13d4c80.tar.gz
boringssl-b044020f84803dca2878b84e314b4f74f13d4c80.tar.bz2
Remove i2d_X509_PKEY and d2i_X509_PKEY.
One of them was never implemented upstream or downstream. The other no longer works in BoringSSL. They're not used within BoringSSL (this still compiles), even in X509_INFO, and do not appear to be used by consumers. If they were, we would like to know via a compile failure. This removes the last consumer within BoringSSL of the ASN.1 parsing macros. Change-Id: Ifb72b1fcd0a4f7b3e6b081486f8638110872334b Reviewed-on: https://boringssl-review.googlesource.com/2203 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/x509/x_pkey.c')
-rw-r--r--crypto/x509/x_pkey.c48
1 files changed, 0 insertions, 48 deletions
diff --git a/crypto/x509/x_pkey.c b/crypto/x509/x_pkey.c
index 5e5ec3d..9fc9e3d 100644
--- a/crypto/x509/x_pkey.c
+++ b/crypto/x509/x_pkey.c
@@ -57,58 +57,10 @@
#include <openssl/x509.h>
#include <openssl/asn1.h>
-#include <openssl/asn1_mac.h>
#include <openssl/mem.h>
#include <openssl/err.h>
-OPENSSL_DECLARE_ERROR_FUNCTION(X509, d2i_X509_PKEY);
-
-/* need to implement */
-int i2d_X509_PKEY(X509_PKEY *a, unsigned char **pp)
- {
- return(0);
- }
-
-X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp, long length)
- {
- int i;
- M_ASN1_D2I_vars(a,X509_PKEY *,X509_PKEY_new);
-
- M_ASN1_D2I_Init();
- M_ASN1_D2I_start_sequence();
- M_ASN1_D2I_get_x(X509_ALGOR,ret->enc_algor,d2i_X509_ALGOR);
- M_ASN1_D2I_get_x(ASN1_OCTET_STRING,ret->enc_pkey,d2i_ASN1_OCTET_STRING);
-
- ret->cipher.cipher=NULL;
-
- /* TODO(fork): fix */
- /*ret->cipher.cipher=EVP_get_cipherbyname(
- OBJ_nid2ln(OBJ_obj2nid(ret->enc_algor->algorithm)));*/
-
- if (ret->cipher.cipher == NULL)
- {
- c.error=ASN1_R_UNSUPPORTED_CIPHER;
- c.line=__LINE__;
- goto err;
- }
- if (ret->enc_algor->parameter->type == V_ASN1_OCTET_STRING)
- {
- i=ret->enc_algor->parameter->value.octet_string->length;
- if (i > EVP_MAX_IV_LENGTH)
- {
- c.error=ASN1_R_IV_TOO_LARGE;
- c.line=__LINE__;
- goto err;
- }
- memcpy(ret->cipher.iv,
- ret->enc_algor->parameter->value.octet_string->data,i);
- }
- else
- memset(ret->cipher.iv,0,EVP_MAX_IV_LENGTH);
- M_ASN1_D2I_Finish(a,X509_PKEY_free,X509_F_d2i_X509_PKEY);
- }
-
X509_PKEY *X509_PKEY_new(void)
{
X509_PKEY *ret = OPENSSL_malloc(sizeof(X509_PKEY));