summaryrefslogtreecommitdiffstats
path: root/crypto/x509
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2016-12-13 11:52:22 -0500
committerRich Salz <rsalz@openssl.org>2016-12-13 14:20:14 -0500
commit6212179e39d5b59092b21d31b45203e6d3aacdaa (patch)
treed8095d8e8bfe45c108f2f01c3387cb5b869a0bac /crypto/x509
parenta7aadf8b878501b512127200443041bba8361bbf (diff)
Add X509_VERIFY_PARAM inheritance flag set/get
Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2079)
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_lcl.h2
-rw-r--r--crypto/x509/x509_vpm.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/crypto/x509/x509_lcl.h b/crypto/x509/x509_lcl.h
index 9b22974f4d..40bd102f70 100644
--- a/crypto/x509/x509_lcl.h
+++ b/crypto/x509/x509_lcl.h
@@ -16,7 +16,7 @@
struct X509_VERIFY_PARAM_st {
char *name;
time_t check_time; /* Time to use */
- unsigned long inh_flags; /* Inheritance flags */
+ uint32_t inh_flags; /* Inheritance flags */
unsigned long flags; /* Various verify flags */
int purpose; /* purpose to check untrusted certificates */
int trust; /* trust setting to check */
diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c
index 05c785217a..245b3fadba 100644
--- a/crypto/x509/x509_vpm.c
+++ b/crypto/x509/x509_vpm.c
@@ -306,6 +306,17 @@ unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param)
return param->flags;
}
+uint32_t X509_VERIFY_PARAM_get_inh_flags(const X509_VERIFY_PARAM *param)
+{
+ return param->inh_flags;
+}
+
+int X509_VERIFY_PARAM_set_inh_flags(X509_VERIFY_PARAM *param, uint32_t flags)
+{
+ param->inh_flags = flags;
+ return 1;
+}
+
int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose)
{
return X509_PURPOSE_set(&param->purpose, purpose);