Publish our INT32, UINT32, INT64, UINT64 ASN.1 types and Z variants
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Apr 2017 10:07:48 +0000 (12:07 +0200)
committerRichard Levitte <levitte@openssl.org>
Mon, 10 Apr 2017 10:10:59 +0000 (12:10 +0200)
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/3126)

crypto/asn1/asn1_item_list.h
crypto/asn1/x_int64.c
fuzz/asn1.c
include/internal/asn1t.h [deleted file]
include/openssl/asn1t.h
ssl/ssl_asn1.c
test/asn1_encode_test.c
util/mkdef.pl

index 909ea3e41b5a8a56e54f41352ca7c8eb0f193427..b753d7198b98f9ca3c1b8992e90ce8d22bb3b056 100644 (file)
@@ -160,4 +160,12 @@ static ASN1_ITEM_EXP *asn1_item_list[] = {
     ASN1_ITEM_ref(X509_VAL),
     ASN1_ITEM_ref(X509),
     ASN1_ITEM_ref(ZLONG),
+    ASN1_ITEM_ref(INT32),
+    ASN1_ITEM_ref(UINT32),
+    ASN1_ITEM_ref(ZINT32),
+    ASN1_ITEM_ref(ZUINT32),
+    ASN1_ITEM_ref(INT64),
+    ASN1_ITEM_ref(UINT64),
+    ASN1_ITEM_ref(ZINT64),
+    ASN1_ITEM_ref(ZUINT64),
 };
index d180a3bb3ac08490cbbebaed3df96e81183b3a38..9da692ca6fb5c5583d8e86853b7f07e01294231a 100644 (file)
@@ -9,8 +9,8 @@
 
 #include <stdio.h>
 #include "internal/cryptlib.h"
-#include "internal/asn1t.h"
 #include "internal/numbers.h"
+#include <openssl/asn1t.h>
 #include <openssl/bn.h>
 #include "asn1_locl.h"
 
index f29fde5d4de6c31e5616def766c54a4e8351a1d3..63d26f98042dc40b2c0ece0fe27a1e8b82e33c2b 100644 (file)
@@ -181,6 +181,14 @@ static ASN1_ITEM_EXP *item_type[] = {
     ASN1_ITEM_ref(X509_SIG),
     ASN1_ITEM_ref(X509_VAL),
     ASN1_ITEM_ref(ZLONG),
+    ASN1_ITEM_ref(INT32),
+    ASN1_ITEM_ref(ZINT32),
+    ASN1_ITEM_ref(UINT32),
+    ASN1_ITEM_ref(ZUINT32),
+    ASN1_ITEM_ref(INT64),
+    ASN1_ITEM_ref(ZINT64),
+    ASN1_ITEM_ref(UINT64),
+    ASN1_ITEM_ref(ZUINT64),
     NULL
 };
 
diff --git a/include/internal/asn1t.h b/include/internal/asn1t.h
deleted file mode 100644 (file)
index 32d637d..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
- *
- * Licensed under the OpenSSL license (the "License").  You may not use
- * this file except in compliance with the License.  You can obtain a copy
- * in the file LICENSE in the source distribution or at
- * https://www.openssl.org/source/license.html
- */
-
-#include <openssl/asn1t.h>
-
-DECLARE_ASN1_ITEM(INT32)
-DECLARE_ASN1_ITEM(ZINT32)
-DECLARE_ASN1_ITEM(UINT32)
-DECLARE_ASN1_ITEM(ZUINT32)
-DECLARE_ASN1_ITEM(INT64)
-DECLARE_ASN1_ITEM(ZINT64)
-DECLARE_ASN1_ITEM(UINT64)
-DECLARE_ASN1_ITEM(ZUINT64)
index 59b28cf8de2b0ae207e6cd3412d16d8bf911e196..5d2ed43c22e7950cc9d32b070d8b975787402252 100644 (file)
@@ -901,6 +901,14 @@ DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
 DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
 DECLARE_ASN1_ITEM(CBIGNUM)
 DECLARE_ASN1_ITEM(BIGNUM)
+DECLARE_ASN1_ITEM(INT32)
+DECLARE_ASN1_ITEM(ZINT32)
+DECLARE_ASN1_ITEM(UINT32)
+DECLARE_ASN1_ITEM(ZUINT32)
+DECLARE_ASN1_ITEM(INT64)
+DECLARE_ASN1_ITEM(ZINT64)
+DECLARE_ASN1_ITEM(UINT64)
+DECLARE_ASN1_ITEM(ZUINT64)
 DECLARE_ASN1_ITEM(LONG)
 DECLARE_ASN1_ITEM(ZLONG)
 
index 0802dd4a9ec42a6a7eead581deacce1b299d7812..b4eb98eea6611bd5035d9069f5cdf047e95fb08c 100644 (file)
@@ -37,7 +37,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include "ssl_locl.h"
-#include "internal/asn1t.h"
+#include <openssl/asn1t.h>
 #include <openssl/x509.h>
 
 typedef struct {
index 02455fcba3776d41aa27871b07a80fc5930f3fc8..26eec6272ab1c5552818db1578b5a738879a7932 100644 (file)
@@ -10,7 +10,7 @@
 #include <stdio.h>
 #include <string.h>
 
-#include "internal/asn1t.h"
+#include <openssl/asn1t.h>
 #include "internal/numbers.h"
 #include "test_main.h"
 #include "testutil.h"
index 36b4efe96fb511be2b8e993d08b8e411f7331409..6bc23b1e8ea184cc3c1e81a75d157ce2beff9e55 100755 (executable)
@@ -239,7 +239,6 @@ my $crypto ="include/openssl/crypto.h";
 $crypto.=" include/internal/o_dir.h";
 $crypto.=" include/internal/o_str.h";
 $crypto.=" include/internal/err.h";
-$crypto.=" include/internal/asn1t.h";
 $crypto.=" include/openssl/des.h" ; # unless $no_des;
 $crypto.=" include/openssl/idea.h" ; # unless $no_idea;
 $crypto.=" include/openssl/rc4.h" ; # unless $no_rc4;