Fix last-resort depth 0 check when the chain has multiple certificates
[openssl.git] / crypto / x509 / x509_set.c
index 38ec0dbc54171b217866f88408c5c065a1fd7291..dbd9057f2ac5f42f03386d37b802e4165c3e4c7e 100644 (file)
@@ -176,3 +176,21 @@ X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x)
 {
     return x->cert_info.key;
 }
+
+STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x)
+{
+    return x->cert_info.extensions;
+}
+
+void X509_get0_uids(ASN1_BIT_STRING **piuid, ASN1_BIT_STRING **psuid, X509 *x)
+{
+    if (piuid != NULL)
+        *piuid = x->cert_info.issuerUID;
+    if (psuid != NULL)
+        *psuid = x->cert_info.subjectUID;
+}
+
+X509_ALGOR *X509_get0_tbs_sigalg(X509 *x)
+{
+    return &x->cert_info.signature;
+}