summaryrefslogtreecommitdiffstats
path: root/crypto/x509v3
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-06-08 11:37:06 -0400
committerRich Salz <rsalz@openssl.org>2016-06-08 11:37:06 -0400
commite417070c9f2162594e8289aed93bd5801e70e60d (patch)
treea156f6cfc17a9455b7e9afd6375ec0c05e79c27d /crypto/x509v3
parent01d0e241dc4184a5a1f222f8eccdad11da12305a (diff)
Add some accessor API's
GH1098: Add X509_get_pathlen() (and a test) GH1097: Add SSL_is_dtls() function. Documented. Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/x509v3')
-rw-r--r--crypto/x509v3/v3_purp.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_purp.c b/crypto/x509v3/v3_purp.c
index b0d40ed84b..92a8b1d86a 100644
--- a/crypto/x509v3/v3_purp.c
+++ b/crypto/x509v3/v3_purp.c
@@ -838,3 +838,12 @@ const ASN1_OCTET_STRING *X509_get0_subject_key_id(X509 *x)
X509_check_purpose(x, -1, -1);
return x->skid;
}
+
+long X509_get_pathlen(X509 *x)
+{
+ /* Called for side effect of caching extensions */
+ if (X509_check_purpose(x, -1, -1) != 1
+ || (x->ex_flags & EXFLAG_BCONS) == 0)
+ return -1;
+ return x->ex_pathlen;
+}