summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-04-05 12:07:48 +0200
committerRichard Levitte <levitte@openssl.org>2017-04-10 12:10:59 +0200
commit64f11ee88883af8995d2991307ff3fb560a96fa6 (patch)
tree0a9428a7b4b854190d4a17feab30f2c3cfbef25f
parentce57ac431964f7692af674fd124103d6fe07af2e (diff)
Publish our INT32, UINT32, INT64, UINT64 ASN.1 types and Z variants
Reviewed-by: Matt Caswell <matt@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/3126)
-rw-r--r--crypto/asn1/asn1_item_list.h8
-rw-r--r--crypto/asn1/x_int64.c2
-rw-r--r--fuzz/asn1.c8
-rw-r--r--include/internal/asn1t.h19
-rw-r--r--include/openssl/asn1t.h8
-rw-r--r--ssl/ssl_asn1.c2
-rw-r--r--test/asn1_encode_test.c2
-rwxr-xr-xutil/mkdef.pl1
8 files changed, 27 insertions, 23 deletions
diff --git a/crypto/asn1/asn1_item_list.h b/crypto/asn1/asn1_item_list.h
index 909ea3e41b..b753d7198b 100644
--- a/crypto/asn1/asn1_item_list.h
+++ b/crypto/asn1/asn1_item_list.h
@@ -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),
};
diff --git a/crypto/asn1/x_int64.c b/crypto/asn1/x_int64.c
index d180a3bb3a..9da692ca6f 100644
--- a/crypto/asn1/x_int64.c
+++ b/crypto/asn1/x_int64.c
@@ -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"
diff --git a/fuzz/asn1.c b/fuzz/asn1.c
index f29fde5d4d..63d26f9804 100644
--- a/fuzz/asn1.c
+++ b/fuzz/asn1.c
@@ -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
index 32d637df79..0000000000
--- a/include/internal/asn1t.h
+++ /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)
diff --git a/include/openssl/asn1t.h b/include/openssl/asn1t.h
index 59b28cf8de..5d2ed43c22 100644
--- a/include/openssl/asn1t.h
+++ b/include/openssl/asn1t.h
@@ -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)
diff --git a/ssl/ssl_asn1.c b/ssl/ssl_asn1.c
index 0802dd4a9e..b4eb98eea6 100644
--- a/ssl/ssl_asn1.c
+++ b/ssl/ssl_asn1.c
@@ -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 {
diff --git a/test/asn1_encode_test.c b/test/asn1_encode_test.c
index 02455fcba3..26eec6272a 100644
--- a/test/asn1_encode_test.c
+++ b/test/asn1_encode_test.c
@@ -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"
diff --git a/util/mkdef.pl b/util/mkdef.pl
index 36b4efe96f..6bc23b1e8e 100755
--- a/util/mkdef.pl
+++ b/util/mkdef.pl
@@ -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;