aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/asn1/a_object.c
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2010-03-13 19:22:41 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2010-03-13 19:22:41 +0000
commit6a599222bb564010b80b78eef3f2b6ba6c8db14a (patch)
tree909a7c21b7df72ae8c08b80b468a4dd75b3820be /crypto/openssl/crypto/asn1/a_object.c
parentc5af82e51782b019d13e562a07c17dc19a282de2 (diff)
parentf7a1b4761cf3f798e1b42d703d38221b47ce1eec (diff)
downloadsrc-6a599222bb564010b80b78eef3f2b6ba6c8db14a.tar.gz
src-6a599222bb564010b80b78eef3f2b6ba6c8db14a.zip
Merge OpenSSL 0.9.8m into head.
This also "reverts" some FreeBSD local changes so we should now be back to using entirely stock OpenSSL. The local changes were simple $FreeBSD$ lines additions, which were required in the CVS days, and the patch for FreeBSD-SA-09:15.ssl which has been superseded with OpenSSL 0.9.8m's RFC5746 'TLS renegotiation extension' support. MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=205128
Diffstat (limited to 'crypto/openssl/crypto/asn1/a_object.c')
-rw-r--r--crypto/openssl/crypto/asn1/a_object.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/asn1/a_object.c b/crypto/openssl/crypto/asn1/a_object.c
index dc980421d098..d169f8c14736 100644
--- a/crypto/openssl/crypto/asn1/a_object.c
+++ b/crypto/openssl/crypto/asn1/a_object.c
@@ -291,6 +291,17 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT **a, const unsigned char **pp,
ASN1_OBJECT *ret=NULL;
const unsigned char *p;
int i;
+ /* Sanity check OID encoding: can't have 0x80 in subidentifiers, see:
+ * X.690 8.19.2
+ */
+ for (i = 0, p = *pp + 1; i < len - 1; i++, p++)
+ {
+ if (*p == 0x80)
+ {
+ ASN1err(ASN1_F_C2I_ASN1_OBJECT,ASN1_R_INVALID_OBJECT_ENCODING);
+ return NULL;
+ }
+ }
/* only the ASN1_OBJECTs from the 'table' will have values
* for ->sn or ->ln */