summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509.h
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2002-11-18 23:54:27 +0000
committerRichard Levitte <levitte@openssl.org>2002-11-18 23:54:27 +0000
commit711f1a3c266c9ff42e85553a96f36d744670630c (patch)
treee876471ad71237f4349b82b9e9e2493fc8416e7c /crypto/x509/x509.h
parenta1d85309ee183c97a5ee4f8277f17d87d7786e25 (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/x509/x509.h')
-rw-r--r--crypto/x509/x509.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h
index 39a9c4c0ab..f1ccc0f041 100644
--- a/crypto/x509/x509.h
+++ b/crypto/x509/x509.h
@@ -306,6 +306,11 @@ typedef struct x509_trust_st {
DECLARE_STACK_OF(X509_TRUST)
+typedef struct x509_cert_pair_st {
+ X509 *forward;
+ X509 *reverse;
+} X509_CERT_PAIR;
+
/* standard trust ids */
#define X509_TRUST_DEFAULT -1 /* Only valid in purpose settings */
@@ -920,6 +925,8 @@ DECLARE_ASN1_FUNCTIONS(X509_CINF)
DECLARE_ASN1_FUNCTIONS(X509)
DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
+DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR)
+
int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
int X509_set_ex_data(X509 *r, int idx, void *arg);