summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/asn1
diff options
context:
space:
mode:
authornectar <nectar@FreeBSD.org>2002-09-16 21:04:40 +0000
committernectar <nectar@FreeBSD.org>2002-09-16 21:04:40 +0000
commita876cfedd88823d520688032e9bde83b68098a88 (patch)
treedcd3a0c4ed207dd29fc2afc7e76bb2592c51d93a /crypto/heimdal/lib/asn1
parentfece93f6bd7aed95bbd6edfb87765c3fcdbfedd5 (diff)
parent8707f886593c300d83c76654e92ec76bcea9b858 (diff)
downloadFreeBSD-src-a876cfedd88823d520688032e9bde83b68098a88.zip
FreeBSD-src-a876cfedd88823d520688032e9bde83b68098a88.tar.gz
This commit was generated by cvs2svn to compensate for changes in r103423,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'crypto/heimdal/lib/asn1')
-rw-r--r--crypto/heimdal/lib/asn1/der_get.c6
-rw-r--r--crypto/heimdal/lib/asn1/gen.c25
-rw-r--r--crypto/heimdal/lib/asn1/k5.asn15
3 files changed, 24 insertions, 12 deletions
diff --git a/crypto/heimdal/lib/asn1/der_get.c b/crypto/heimdal/lib/asn1/der_get.c
index 5edb43a..429fd66 100644
--- a/crypto/heimdal/lib/asn1/der_get.c
+++ b/crypto/heimdal/lib/asn1/der_get.c
@@ -33,7 +33,7 @@
#include "der_locl.h"
-RCSID("$Id: der_get.c,v 1.32 2002/08/22 19:11:07 assar Exp $");
+RCSID("$Id: der_get.c,v 1.33 2002/09/03 16:21:49 nectar Exp $");
#include <version.h>
@@ -252,6 +252,8 @@ decode_integer (const unsigned char *p, size_t len,
p += l;
len -= l;
ret += l;
+ if (reallen > len)
+ return ASN1_OVERRUN;
e = der_get_int (p, reallen, num, &l);
if (e) return e;
p += l;
@@ -279,6 +281,8 @@ decode_unsigned (const unsigned char *p, size_t len,
p += l;
len -= l;
ret += l;
+ if (reallen > len)
+ return ASN1_OVERRUN;
e = der_get_unsigned (p, reallen, num, &l);
if (e) return e;
p += l;
diff --git a/crypto/heimdal/lib/asn1/gen.c b/crypto/heimdal/lib/asn1/gen.c
index 6d03db6..5b85a48 100644
--- a/crypto/heimdal/lib/asn1/gen.c
+++ b/crypto/heimdal/lib/asn1/gen.c
@@ -33,7 +33,7 @@
#include "gen_locl.h"
-RCSID("$Id: gen.c,v 1.48 2002/08/26 13:27:20 assar Exp $");
+RCSID("$Id: gen.c,v 1.49 2002/09/04 15:06:18 joda Exp $");
FILE *headerfile, *codefile, *logfile;
@@ -102,20 +102,29 @@ init_generate (const char *filename, const char *base)
" void *data;\n"
"} octet_string;\n\n");
fprintf (headerfile,
-#if 0
- "typedef struct general_string {\n"
- " size_t length;\n"
- " char *data;\n"
- "} general_string;\n\n"
-#else
"typedef char *general_string;\n\n"
-#endif
);
fprintf (headerfile,
"typedef struct oid {\n"
" size_t length;\n"
" unsigned *components;\n"
"} oid;\n\n");
+ fputs("#define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \\\n"
+ " do { \\\n"
+ " (BL) = length_##T((S)); \\\n"
+ " (B) = malloc((BL)); \\\n"
+ " if((B) == NULL) { \\\n"
+ " (R) = ENOMEM; \\\n"
+ " } else { \\\n"
+ " (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \\\n"
+ " (S), (L)); \\\n"
+ " if((R) != 0) { \\\n"
+ " free((B)); \\\n"
+ " (B) = NULL; \\\n"
+ " } \\\n"
+ " } \\\n"
+ " } while (0)\n\n",
+ headerfile);
fprintf (headerfile, "#endif\n\n");
logfile = fopen(STEM "_files", "w");
if (logfile == NULL)
diff --git a/crypto/heimdal/lib/asn1/k5.asn1 b/crypto/heimdal/lib/asn1/k5.asn1
index 381aaf6..53436c8 100644
--- a/crypto/heimdal/lib/asn1/k5.asn1
+++ b/crypto/heimdal/lib/asn1/k5.asn1
@@ -1,4 +1,4 @@
--- $Id: k5.asn1,v 1.26 2002/03/18 19:00:43 joda Exp $
+-- $Id: k5.asn1,v 1.27 2002/09/03 17:32:09 joda Exp $
KERBEROS5 DEFINITIONS ::=
BEGIN
@@ -97,8 +97,7 @@ ENCTYPE ::= INTEGER {
ETYPE_DES_CBC_NONE(-0x1000),
ETYPE_DES3_CBC_NONE(-0x1001),
ETYPE_DES_CFB64_NONE(-0x1002),
- ETYPE_DES_PCBC_NONE(-0x1003),
- ETYPE_DES3_CBC_NONE_IVEC(-0x1004)
+ ETYPE_DES_PCBC_NONE(-0x1003)
}
-- this is sugar to make something ASN1 does not have: unsigned
OpenPOWER on IntegriCloud