From 5e61d533c99cd55fe051014fd68d506da835587f Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Thu, 5 Jan 2017 21:01:49 -0500 Subject: [PATCH] Document support status of the legacy ASN.1 code. Change-Id: Ie0565b8b819b9fd837caf723d035866facc9543c Reviewed-on: https://boringssl-review.googlesource.com/17026 Reviewed-by: Adam Langley Commit-Queue: Adam Langley --- include/openssl/asn1.h | 8 ++++++++ include/openssl/asn1t.h | 14 +++++++------- include/openssl/x509.h | 8 ++++++++ include/openssl/x509_vfy.h | 8 ++++++++ include/openssl/x509v3.h | 9 +++++++++ 5 files changed, 40 insertions(+), 7 deletions(-) diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h index 63e4d9e024..8ee5b0c858 100644 --- a/include/openssl/asn1.h +++ b/include/openssl/asn1.h @@ -71,6 +71,14 @@ extern "C" { #endif + +/* Legacy ASN.1 library. + * + * This header is part of OpenSSL's ASN.1 implementation. It is retained for + * compatibility but otherwise underdocumented and not actively maintained. Use + * the new |CBS| and |CBB| library in instead. */ + + #define V_ASN1_UNIVERSAL 0x00 #define V_ASN1_APPLICATION 0x40 #define V_ASN1_CONTEXT_SPECIFIC 0x80 diff --git a/include/openssl/asn1t.h b/include/openssl/asn1t.h index 03c07fb5f1..ae507ea43e 100644 --- a/include/openssl/asn1t.h +++ b/include/openssl/asn1t.h @@ -60,18 +60,18 @@ #include #include -#ifdef OPENSSL_BUILD_SHLIBCRYPTO -# undef OPENSSL_EXTERN -# define OPENSSL_EXTERN OPENSSL_EXPORT -#endif - -/* ASN1 template defines, structures and functions */ - #ifdef __cplusplus extern "C" { #endif +/* Legacy ASN.1 library template definitions. + * + * This header is used to define new types in OpenSSL's ASN.1 implementation. It + * is deprecated and will be unexported from the library. Use the new |CBS| and + * |CBB| library in instead. */ + + /* Macro to obtain ASN1_ADB pointer from a type (only used internally) */ #define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)(iptr)) diff --git a/include/openssl/x509.h b/include/openssl/x509.h index f4160456f4..cc1432d7c7 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -89,6 +89,14 @@ extern "C" { #endif +/* Legacy X.509 library. + * + * This header is part of OpenSSL's X.509 implementation. It is retained for + * compatibility but otherwise underdocumented and not actively maintained. In + * the future, a replacement library will be available. Meanwhile, minimize + * dependencies on this header where possible. */ + + #define X509_FILETYPE_PEM 1 #define X509_FILETYPE_ASN1 2 #define X509_FILETYPE_DEFAULT 3 diff --git a/include/openssl/x509_vfy.h b/include/openssl/x509_vfy.h index 85aa1f92ba..4c365707c5 100644 --- a/include/openssl/x509_vfy.h +++ b/include/openssl/x509_vfy.h @@ -72,6 +72,14 @@ extern "C" { #endif +/* Legacy X.509 library. + * + * This header is part of OpenSSL's X.509 implementation. It is retained for + * compatibility but otherwise underdocumented and not actively maintained. In + * the future, a replacement library will be available. Meanwhile, minimize + * dependencies on this header where possible. */ + + #if 0 /* Outer object */ typedef struct x509_hash_dir_st diff --git a/include/openssl/x509v3.h b/include/openssl/x509v3.h index 243798b3fb..e6e8f0159d 100644 --- a/include/openssl/x509v3.h +++ b/include/openssl/x509v3.h @@ -63,6 +63,15 @@ extern "C" { #endif + +/* Legacy X.509 library. + * + * This header is part of OpenSSL's X.509 implementation. It is retained for + * compatibility but otherwise underdocumented and not actively maintained. In + * the future, a replacement library will be available. Meanwhile, minimize + * dependencies on this header where possible. */ + + /* Forward reference */ struct v3_ext_method; struct v3_ext_ctx;