aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509_vpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509/x509_vpm.c')
-rw-r--r--crypto/x509/x509_vpm.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/x509/x509_vpm.c b/crypto/x509/x509_vpm.c
index 2b06718aec2d..01c5541e2e88 100644
--- a/crypto/x509/x509_vpm.c
+++ b/crypto/x509/x509_vpm.c
@@ -198,8 +198,12 @@ int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest,
int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
const X509_VERIFY_PARAM *from)
{
+ unsigned long save_flags = to->inh_flags;
+ int ret;
to->inh_flags |= X509_VP_FLAG_DEFAULT;
- return X509_VERIFY_PARAM_inherit(to, from);
+ ret = X509_VERIFY_PARAM_inherit(to, from);
+ to->inh_flags = save_flags;
+ return ret;
}
int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name)