Two new verify flags functions.
authorDr. Stephen Henson <steve@openssl.org>
Fri, 2 Sep 2005 22:49:54 +0000 (22:49 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Fri, 2 Sep 2005 22:49:54 +0000 (22:49 +0000)
CHANGES
crypto/x509/x509_vfy.h
crypto/x509/x509_vpm.c

diff --git a/CHANGES b/CHANGES
index 52d201b..c41c967 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -37,6 +37,9 @@
 
  Changes between 0.9.8 and 0.9.8a  [XX xxx XXXX]
 
+  *) Add two function to clear and return the verify parameter flags.
+     [Steve Henson]
+
   *) Keep cipherlists sorted in the source instead of sorting them at
      runtime, thus removing the need for a lock.
      [Nils Larsch]
index 85bd640..3f16330 100644 (file)
@@ -478,6 +478,9 @@ int X509_VERIFY_PARAM_set1(X509_VERIFY_PARAM *to,
                                                const X509_VERIFY_PARAM *from);
 int X509_VERIFY_PARAM_set1_name(X509_VERIFY_PARAM *param, const char *name);
 int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags);
+int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param,
+                                                       unsigned long flags);
+unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param);
 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose);
 int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust);
 void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth);
index 087e878..82cff88 100644 (file)
@@ -211,6 +211,17 @@ int X509_VERIFY_PARAM_set_flags(X509_VERIFY_PARAM *param, unsigned long flags)
        return 1;
        }
 
+int X509_VERIFY_PARAM_clear_flags(X509_VERIFY_PARAM *param, unsigned long flags)
+       {
+       param->flags &= ~flags;
+       return 1;
+       }
+
+unsigned long X509_VERIFY_PARAM_get_flags(X509_VERIFY_PARAM *param)
+       {
+       return param->flags;
+       }
+
 int X509_VERIFY_PARAM_set_purpose(X509_VERIFY_PARAM *param, int purpose)
        {
        return X509_PURPOSE_set(&param->purpose, purpose);