diff options
author | Rich Salz <rsalz@openssl.org> | 2016-12-13 11:52:22 -0500 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2016-12-13 14:30:21 -0500 |
commit | a47bc28317081fff10250a4d931821f64cfe191d (patch) | |
tree | 4c815cda15356d51019bdc5e964273f7ebfd3269 /crypto/x509 | |
parent | 3dfda1a6363c0cf4efee94754a36c2d86be190c3 (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.h | 2 | ||||
-rw-r--r-- | crypto/x509/x509_vpm.c | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/crypto/x509/x509_lcl.h b/crypto/x509/x509_lcl.h index 0cc38c6443..34e413530a 100644 --- a/crypto/x509/x509_lcl.h +++ b/crypto/x509/x509_lcl.h @@ -18,7 +18,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 386382d2ef..9e1b7c64cd 100644 --- a/crypto/x509/x509_vpm.c +++ b/crypto/x509/x509_vpm.c @@ -289,6 +289,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(¶m->purpose, purpose); |