diff options
author | David Benjamin <davidben@chromium.org> | 2014-10-28 18:36:00 -0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-10-28 22:38:38 +0000 |
commit | b06711ca34a0f11d345bf35e07e1a2d0c068ab9e (patch) | |
tree | 31058ebe7c44670e4c0405f1ffbcc0c80118b7ab | |
parent | e1679761261c45381364fe35701f67de783a527d (diff) | |
download | src-b06711ca34a0f11d345bf35e07e1a2d0c068ab9e.tar.gz |
Move the X509_NAME typedef into x509.h.
X509_NAME is one of the symbols that collide with wincrypt.h. Move it to x509.h
so libraries which only use the pure-crypto portions of BoringSSL without X.509
needn't have to resolve the collision.
Change-Id: I057873498e58fe4a4cf264356f9a58d7a15397b7
Reviewed-on: https://boringssl-review.googlesource.com/2080
Reviewed-by: Adam Langley <agl@google.com>
-rw-r--r-- | crypto/asn1/asn1_locl.h | 22 | ||||
-rw-r--r-- | crypto/x509/x_crl.c | 18 | ||||
-rw-r--r-- | include/openssl/base.h | 1 | ||||
-rw-r--r-- | include/openssl/x509.h | 4 |
4 files changed, 19 insertions, 26 deletions
diff --git a/crypto/asn1/asn1_locl.h b/crypto/asn1/asn1_locl.h index 1444390..ca5f612 100644 --- a/crypto/asn1/asn1_locl.h +++ b/crypto/asn1/asn1_locl.h @@ -71,25 +71,3 @@ struct asn1_pctx_st unsigned long oid_flags; unsigned long str_flags; } /* ASN1_PCTX */; - -/* ASN1 public key method structure */ - - -/* Method to handle CRL access. - * In general a CRL could be very large (several Mb) and can consume large - * amounts of resources if stored in memory by multiple processes. - * This method allows general CRL operations to be redirected to more - * efficient callbacks: for example a CRL entry database. - */ - -#define X509_CRL_METHOD_DYNAMIC 1 - -struct x509_crl_method_st - { - int flags; - int (*crl_init)(X509_CRL *crl); - int (*crl_free)(X509_CRL *crl); - int (*crl_lookup)(X509_CRL *crl, X509_REVOKED **ret, - ASN1_INTEGER *ser, X509_NAME *issuer); - int (*crl_verify)(X509_CRL *crl, EVP_PKEY *pk); - }; diff --git a/crypto/x509/x_crl.c b/crypto/x509/x_crl.c index 21785dc..8e64f76 100644 --- a/crypto/x509/x_crl.c +++ b/crypto/x509/x_crl.c @@ -64,8 +64,24 @@ #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "../asn1/asn1_locl.h" +/* Method to handle CRL access. + * In general a CRL could be very large (several Mb) and can consume large + * amounts of resources if stored in memory by multiple processes. + * This method allows general CRL operations to be redirected to more + * efficient callbacks: for example a CRL entry database. + */ + +#define X509_CRL_METHOD_DYNAMIC 1 +struct x509_crl_method_st + { + int flags; + int (*crl_init)(X509_CRL *crl); + int (*crl_free)(X509_CRL *crl); + int (*crl_lookup)(X509_CRL *crl, X509_REVOKED **ret, + ASN1_INTEGER *ser, X509_NAME *issuer); + int (*crl_verify)(X509_CRL *crl, EVP_PKEY *pk); + }; static int X509_REVOKED_cmp(const X509_REVOKED **a, const X509_REVOKED **b); diff --git a/include/openssl/base.h b/include/openssl/base.h index 52cb1e9..6207c54 100644 --- a/include/openssl/base.h +++ b/include/openssl/base.h @@ -159,7 +159,6 @@ typedef struct X509_POLICY_NODE_st X509_POLICY_NODE; typedef struct X509_POLICY_TREE_st X509_POLICY_TREE; typedef struct X509_algor_st X509_ALGOR; typedef struct X509_crl_st X509_CRL; -typedef struct X509_name_st X509_NAME; typedef struct X509_pubkey_st X509_PUBKEY; typedef struct bignum_ctx BN_CTX; typedef struct bignum_st BIGNUM; diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 398bec7..9766f74 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -143,7 +143,7 @@ DECLARE_STACK_OF(X509_NAME_ENTRY) DECLARE_ASN1_SET_OF(X509_NAME_ENTRY) /* we always keep X509_NAMEs in 2 forms. */ -struct X509_name_st +typedef struct X509_name_st { STACK_OF(X509_NAME_ENTRY) *entries; int modified; /* true if 'bytes' needs to be built */ @@ -155,7 +155,7 @@ struct X509_name_st /* unsigned long hash; Keep the hash around for lookups */ unsigned char *canon_enc; int canon_enclen; - } /* X509_NAME */; + } X509_NAME; DECLARE_STACK_OF(X509_NAME) |