summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2022-01-14 07:57:18 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2022-01-14 07:57:18 +0000
commit2c9c689464ec9a3c473e1bcdc45379ce09d35ba6 (patch)
tree765756ce61cad6ef51ee1c9b6bc63374b0a801b5
parent00671d80cbacbe9c967de90ec1e9f41f9aee53fb (diff)
Remove ASN1{_const,}_check_infinite_end
Suggested by schwarze ok inoguchi jsing
-rw-r--r--lib/libcrypto/asn1/asn1.h4
-rw-r--r--lib/libcrypto/asn1/asn1_old_lib.c28
2 files changed, 2 insertions, 30 deletions
diff --git a/lib/libcrypto/asn1/asn1.h b/lib/libcrypto/asn1/asn1.h
index e73b3655a00..e850f2b8019 100644
--- a/lib/libcrypto/asn1/asn1.h
+++ b/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1.h,v 1.58 2022/01/14 07:55:29 tb Exp $ */
+/* $OpenBSD: asn1.h,v 1.59 2022/01/14 07:57:17 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -787,8 +787,6 @@ int ASN1_PRINTABLE_type(const unsigned char *s, int max);
/* SPECIALS */
int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
int *pclass, long omax);
-int ASN1_check_infinite_end(unsigned char **p, long len);
-int ASN1_const_check_infinite_end(const unsigned char **p, long len);
void ASN1_put_object(unsigned char **pp, int constructed, int length, int tag,
int xclass);
int ASN1_put_eoc(unsigned char **pp);
diff --git a/lib/libcrypto/asn1/asn1_old_lib.c b/lib/libcrypto/asn1/asn1_old_lib.c
index 958c15b30cd..e41a5ea2575 100644
--- a/lib/libcrypto/asn1/asn1_old_lib.c
+++ b/lib/libcrypto/asn1/asn1_old_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asn1_old_lib.c,v 1.2 2021/12/25 07:04:03 jsing Exp $ */
+/* $OpenBSD: asn1_old_lib.c,v 1.3 2022/01/14 07:57:17 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -67,32 +67,6 @@
static void asn1_put_length(unsigned char **pp, int length);
-static int
-_asn1_check_infinite_end(const unsigned char **p, long len)
-{
- /* If there is 0 or 1 byte left, the length check should pick
- * things up */
- if (len <= 0)
- return (1);
- else if ((len >= 2) && ((*p)[0] == 0) && ((*p)[1] == 0)) {
- (*p) += 2;
- return (1);
- }
- return (0);
-}
-
-int
-ASN1_check_infinite_end(unsigned char **p, long len)
-{
- return _asn1_check_infinite_end((const unsigned char **)p, len);
-}
-
-int
-ASN1_const_check_infinite_end(const unsigned char **p, long len)
-{
- return _asn1_check_infinite_end(p, len);
-}
-
int
ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
int *pclass, long omax)