diff --git a/CHANGES b/CHANGES index ec9291002b3588e3cc3b3e9fc63d66c78ddfaa60..21bff0eda12ceabb9df39132257268b312ad415a 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,10 @@ Changes between 1.0.1 and 1.1.0 [xx XXX xxxx] + *) Print out deprecated issuer and subject unique ID fields in + certificates. + [Steve Henson] + *) RFC 5878 support. [Emilia Kasper, Adam Langley, Ben Laurie (Google)] diff --git a/crypto/asn1/t_x509.c b/crypto/asn1/t_x509.c index edbb39a02f7a5749e183de368b5bf8f34b4226f1..8eb0b79a9126a6f915d4c30f53a4b0a10dcabff7 100644 --- a/crypto/asn1/t_x509.c +++ b/crypto/asn1/t_x509.c @@ -225,6 +225,24 @@ int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) } } + if(!(cflag & X509_FLAG_NO_IDS)) + { + if (ci->issuerUID) + { + if (BIO_printf(bp,"%8sIssuer Unique ID: ","") <= 0) + goto err; + if (!X509_signature_dump(bp, ci->issuerUID, 12)) + goto err; + } + if (ci->subjectUID) + { + if (BIO_printf(bp,"%8sSubject Unique ID: ","") <= 0) + goto err; + if (!X509_signature_dump(bp, ci->subjectUID, 12)) + goto err; + } + } + if (!(cflag & X509_FLAG_NO_EXTENSIONS)) X509V3_extensions_print(bp, "X509v3 extensions", ci->extensions, cflag, 8); diff --git a/crypto/x509/x509.h b/crypto/x509/x509.h index 092dd7450d3b0aefab4802daea0572ac85c48e52..14ef1d3aad9e59023460a84c9da89b0c4fe25d81 100644 --- a/crypto/x509/x509.h +++ b/crypto/x509/x509.h @@ -372,6 +372,7 @@ typedef struct x509_cert_pair_st { #define X509_FLAG_NO_SIGDUMP (1L << 9) #define X509_FLAG_NO_AUX (1L << 10) #define X509_FLAG_NO_ATTRIBUTES (1L << 11) +#define X509_FLAG_NO_IDS (1L << 12) /* Flags specific to X509_NAME_print_ex() */