Make V_ASN1_APP_CHOOSE work again.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 14 Mar 2000 03:29:57 +0000 (03:29 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 14 Mar 2000 03:29:57 +0000 (03:29 +0000)
CHANGES
crypto/x509/x509name.c

diff --git a/CHANGES b/CHANGES
index 803be2de468ea73db8823e23db2bedd5321fb9ca..a97d3e62e00967d2228964749b135a18cdf3fa13 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
 
  Changes between 0.9.5 and 0.9.5a  [XX XXX 2000]
 
+  *) Fix so V_ASN1_APP_CHOOSE works again: however its use is strongly
+     discouraged.
+     [Steve Henson, pointed out by Brian Korver <briank@cs.stanford.edu>]
+
   *) For easily testing in shell scripts whether some command
      'openssl XXX' exists, the new pseudo-command 'openssl no-XXX'
      returns with exit code 0 iff no command of the given name is available.
index cf2382d42c0f0737d43c1e49dfe6b0feb3d3ada2..4c20e03eced3a6f3565ff8da26aa53ba62e3bce5 100644 (file)
@@ -352,7 +352,7 @@ int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type,
        int i;
 
        if ((ne == NULL) || ((bytes == NULL) && (len != 0))) return(0);
-       if(type & MBSTRING_FLAG
+       if((type > 0) && (type & MBSTRING_FLAG)
                return ASN1_STRING_set_by_NID(&ne->value, bytes,
                                                len, type,
                                        OBJ_obj2nid(ne->object)) ? 1 : 0;