Support for certificate status TLS extension.
[openssl.git] / crypto / asn1 / t_x509a.c
index a18ebb586ce88512cb7b943986a30e2316f7beb7..ffbbfb51f43ef75e50bf84901e07bf7e7192cc96 100644 (file)
@@ -59,7 +59,7 @@
 #include <stdio.h>
 #include "cryptlib.h"
 #include <openssl/evp.h>
-#include <openssl/asn1_mac.h>
+#include <openssl/asn1.h>
 #include <openssl/x509.h>
 
 /* X509_CERT_AUX and string set routines
@@ -77,7 +77,7 @@ int X509_CERT_AUX_print(BIO *out, X509_CERT_AUX *aux, int indent)
                for(i = 0; i < sk_ASN1_OBJECT_num(aux->trust); i++) {
                        if(!first) BIO_puts(out, ", ");
                        else first = 0;
-                       OBJ_obj2txt(oidstr, 80,
+                       OBJ_obj2txt(oidstr, sizeof oidstr,
                                sk_ASN1_OBJECT_value(aux->trust, i), 0);
                        BIO_puts(out, oidstr);
                }
@@ -90,7 +90,7 @@ int X509_CERT_AUX_print(BIO *out, X509_CERT_AUX *aux, int indent)
                for(i = 0; i < sk_ASN1_OBJECT_num(aux->reject); i++) {
                        if(!first) BIO_puts(out, ", ");
                        else first = 0;
-                       OBJ_obj2txt(oidstr, 80,
+                       OBJ_obj2txt(oidstr, sizeof oidstr,
                                sk_ASN1_OBJECT_value(aux->reject, i), 0);
                        BIO_puts(out, oidstr);
                }
@@ -98,5 +98,13 @@ int X509_CERT_AUX_print(BIO *out, X509_CERT_AUX *aux, int indent)
        } else BIO_printf(out, "%*sNo Rejected Uses.\n", indent, "");
        if(aux->alias) BIO_printf(out, "%*sAlias: %s\n", indent, "",
                                                        aux->alias->data);
+       if(aux->keyid) {
+               BIO_printf(out, "%*sKey Id: ", indent, "");
+               for(i = 0; i < aux->keyid->length; i++) 
+                       BIO_printf(out, "%s%02X", 
+                               i ? ":" : "",
+                               aux->keyid->data[i]);
+               BIO_write(out,"\n",1);
+       }
        return 1;
 }