diff options
author | Richard Levitte <levitte@openssl.org> | 2002-11-18 23:54:27 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-11-18 23:54:27 +0000 |
commit | 711f1a3c266c9ff42e85553a96f36d744670630c (patch) | |
tree | e876471ad71237f4349b82b9e9e2493fc8416e7c /crypto/pem | |
parent | a1d85309ee183c97a5ee4f8277f17d87d7786e25 (diff) |
Add the ASN.1 structures and functions for CertificatePair, which is
defined as follows (according to X.509_4thEditionDraftV6.pdf):
CertificatePair ::= SEQUENCE {
forward [0] Certificate OPTIONAL,
reverse [1] Certificate OPTIONAL,
-- at least one of the pair shall be present -- }
The only thing I'm not sure about is if it's implicit or explicit tags
that I should count on. For now, I'm thinking explicit, but will
gladly stand corrected.
Also implement the PEM functions to read and write certificate pairs,
and defined the PEM tag as "CERTIFICATE PAIR".
This needed to be defined, mostly for the sake of the LDAP attribute
crossCertificatePair, but may prove useful elsewhere as well.
Diffstat (limited to 'crypto/pem')
-rw-r--r-- | crypto/pem/pem.h | 3 | ||||
-rw-r--r-- | crypto/pem/pem_xaux.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h index 5be8d6a957..02dd9f2b67 100644 --- a/crypto/pem/pem.h +++ b/crypto/pem/pem.h @@ -113,6 +113,7 @@ extern "C" { #define PEM_STRING_X509_OLD "X509 CERTIFICATE" #define PEM_STRING_X509 "CERTIFICATE" +#define PEM_STRING_X509_PAIR "CERTIFICATE PAIR" #define PEM_STRING_X509_TRUSTED "TRUSTED CERTIFICATE" #define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST" #define PEM_STRING_X509_REQ "CERTIFICATE REQUEST" @@ -548,6 +549,8 @@ DECLARE_PEM_rw(X509, X509) DECLARE_PEM_rw(X509_AUX, X509) +DECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR) + DECLARE_PEM_rw(X509_REQ, X509_REQ) DECLARE_PEM_write(X509_REQ_NEW, X509_REQ) diff --git a/crypto/pem/pem_xaux.c b/crypto/pem/pem_xaux.c index 2f579b5421..63ce660cf1 100644 --- a/crypto/pem/pem_xaux.c +++ b/crypto/pem/pem_xaux.c @@ -66,3 +66,4 @@ #include <openssl/pem.h> IMPLEMENT_PEM_rw(X509_AUX, X509, PEM_STRING_X509_TRUSTED, X509_AUX) +IMPLEMENT_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR, PEM_STRING_X509_PAIR, X509_CERT_PAIR) |