aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2000-09-21 21:00:20 +0000
committerRichard Levitte <levitte@openssl.org>2000-09-21 21:00:20 +0000
commit4839df4061fe56f48d1af0b7ebe55a9ad63543ad (patch)
treef83cff7719df3adc470d05b6e2f0d10485540583
parent9cfb6bbd29ba0132102b2c795481ae42a4a446ea (diff)
downloadopenssl-4839df4061fe56f48d1af0b7ebe55a9ad63543ad.tar.gz
Merge from main trunk.
-rw-r--r--CHANGES12
-rw-r--r--STATUS8
-rw-r--r--crypto/asn1/a_type.c14
-rw-r--r--crypto/asn1/asn1.h1
4 files changed, 28 insertions, 7 deletions
diff --git a/CHANGES b/CHANGES
index 786ab5064c..7645d6f5f9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,18 @@
Changes between 0.9.5a and 0.9.6 [xx XXX 2000]
+ *) Fix for a nasty bug in ASN1_TYPE handling. ASN1_TYPE is used for
+ a general "ANY" type, as such it should be able to decode anything
+ including tagged types. However it didn't check the class so it would
+ wrongly interpret tagged types in the same way as their universal
+ counterpart and unknown types were just rejected. Changed so that the
+ tagged and unknown types are handled in the same way as a SEQUENCE:
+ that is the encoding is stored intact. There is also a new type
+ "V_ASN1_OTHER" which is used when the class is not universal, in this
+ case we have no idea what the actual type is so we just lump them all
+ together.
+ [Steve Henson]
+
*) On VMS, stdout may very well lead to a file that is written to
in a record-oriented fashion. That means that every write() will
write a separate record, which will be read separately by the
diff --git a/STATUS b/STATUS
index 8f09037572..7495689ddf 100644
--- a/STATUS
+++ b/STATUS
@@ -1,6 +1,6 @@
OpenSSL STATUS Last modified at
- ______________ $Date: 2000/09/21 20:29:00 $
+ ______________ $Date: 2000/09/21 21:00:19 $
DEVELOPMENT STATE
@@ -108,11 +108,17 @@
libraries. Tests pass as soon as
you make sure advapi32.lib gets
linked in. [FIXED]
+ VC-NT dynamic libs (NT4 SP6, VC6 SP4) - success
VC-WIN32 (W2K Pro SP1, VC6 SP3, PSDK Jul2000)- success
hpux-parisc-gcc (B.10.20, gcc 2.95.2) - success
hpux-parisc-cc (B.10.20, cc A.10.32.30) - success
hpux-parisc-gcc [engine] (B.10.20, gcc 2.95.2)- success
hpux-parisc-cc [engine] (B.10.20, cc A.10.32.30)- success
+ hpux-parisc2-cc (B.11.11) - success
+ hpux64-parisc2-cc (B.11.11) - success
+ Kevin Steves also mentions that "All the new
+ targets look good on my end with hp-ux 11.0."
+ MPE/iX-gcc - success
FreeBSD (2.2.5) - failed
Only having USE_TOD made speed.c issue an
error. [FIXED]
diff --git a/crypto/asn1/a_type.c b/crypto/asn1/a_type.c
index 3620e60e99..cf716027d3 100644
--- a/crypto/asn1/a_type.c
+++ b/crypto/asn1/a_type.c
@@ -123,6 +123,8 @@ int i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **pp)
break;
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
+ case V_ASN1_OTHER:
+ default:
if (a->value.set == NULL)
r=0;
else
@@ -159,6 +161,8 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
inf=ASN1_get_object(&q,&len,&tag,&xclass,length);
if (inf & 0x80) goto err;
+ /* If not universal tag we've no idea what it is */
+ if(xclass != V_ASN1_UNIVERSAL) tag = V_ASN1_OTHER;
ASN1_TYPE_component_free(ret);
@@ -245,6 +249,8 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
break;
case V_ASN1_SET:
case V_ASN1_SEQUENCE:
+ case V_ASN1_OTHER:
+ default:
/* Sets and sequences are left complete */
if ((ret->value.set=ASN1_STRING_new()) == NULL) goto err;
ret->value.set->type=tag;
@@ -252,9 +258,6 @@ ASN1_TYPE *d2i_ASN1_TYPE(ASN1_TYPE **a, unsigned char **pp, long length)
if (!ASN1_STRING_set(ret->value.set,p,(int)len)) goto err;
p+=len;
break;
- default:
- ASN1err(ASN1_F_D2I_ASN1_TYPE,ASN1_R_BAD_TYPE);
- goto err;
}
ret->type=tag;
@@ -333,10 +336,9 @@ static void ASN1_TYPE_component_free(ASN1_TYPE *a)
case V_ASN1_UNIVERSALSTRING:
case V_ASN1_BMPSTRING:
case V_ASN1_UTF8STRING:
- ASN1_STRING_free((ASN1_STRING *)a->value.ptr);
- break;
+ case V_ASN1_OTHER:
default:
- /* MEMORY LEAK */
+ ASN1_STRING_free((ASN1_STRING *)a->value.ptr);
break;
}
a->type=0;
diff --git a/crypto/asn1/asn1.h b/crypto/asn1/asn1.h
index 3346377527..6f956b1963 100644
--- a/crypto/asn1/asn1.h
+++ b/crypto/asn1/asn1.h
@@ -83,6 +83,7 @@ extern "C" {
#define V_ASN1_PRIMATIVE_TAG 0x1f
#define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
+#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
#define V_ASN1_NEG 0x100 /* negative flag */