diff options
author | tb <> | 2022-01-14 08:09:18 +0000 |
---|---|---|
committer | tb <> | 2022-01-14 08:09:18 +0000 |
commit | 5d4d6a909f8b3bd3525af1b1ae9d89f9cb5dd883 (patch) | |
tree | cb89d987321951007fe55b30234d64a881628280 /src | |
parent | 0ed71e7fb768c8004e3f4c0bbf0e0d05f959fc28 (diff) | |
download | openbsd-5d4d6a909f8b3bd3525af1b1ae9d89f9cb5dd883.tar.gz openbsd-5d4d6a909f8b3bd3525af1b1ae9d89f9cb5dd883.tar.bz2 openbsd-5d4d6a909f8b3bd3525af1b1ae9d89f9cb5dd883.zip |
Remove ASN1_OBJECT internals from public visibility.
Move the struct declaration to asn1_locl.h and add a forward
declaration to ossl_typ.h. This makes struct visibility in the
asn1 headers match OpenSSL.
ok inoguchi jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1.h | 16 | ||||
-rw-r--r-- | src/lib/libcrypto/asn1/asn1_locl.h | 16 | ||||
-rw-r--r-- | src/lib/libcrypto/ossl_typ.h | 4 |
3 files changed, 19 insertions, 17 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h index e850f2b801..2e854f511e 100644 --- a/src/lib/libcrypto/asn1/asn1.h +++ b/src/lib/libcrypto/asn1/asn1.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn1.h,v 1.59 2022/01/14 07:57:17 tb Exp $ */ | 1 | /* $OpenBSD: asn1.h,v 1.60 2022/01/14 08:09:18 tb Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -162,20 +162,6 @@ DECLARE_STACK_OF(X509_ALGOR) | |||
162 | #define DECLARE_ASN1_SET_OF(type) /* filled in by mkstack.pl */ | 162 | #define DECLARE_ASN1_SET_OF(type) /* filled in by mkstack.pl */ |
163 | #define IMPLEMENT_ASN1_SET_OF(type) /* nothing, no longer needed */ | 163 | #define IMPLEMENT_ASN1_SET_OF(type) /* nothing, no longer needed */ |
164 | 164 | ||
165 | /* These are used internally in the ASN1_OBJECT to keep track of | ||
166 | * whether the names and data need to be free()ed */ | ||
167 | #define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */ | ||
168 | #define ASN1_OBJECT_FLAG_CRITICAL 0x02 /* critical x509v3 object id */ | ||
169 | #define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */ | ||
170 | #define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */ | ||
171 | typedef struct asn1_object_st { | ||
172 | const char *sn, *ln; | ||
173 | int nid; | ||
174 | int length; | ||
175 | const unsigned char *data; /* data remains const after init */ | ||
176 | int flags; /* Should we free this one */ | ||
177 | } ASN1_OBJECT; | ||
178 | |||
179 | #define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */ | 165 | #define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */ |
180 | /* This indicates that the ASN1_STRING is not a real value but just a place | 166 | /* This indicates that the ASN1_STRING is not a real value but just a place |
181 | * holder for the location where indefinite length constructed data should | 167 | * holder for the location where indefinite length constructed data should |
diff --git a/src/lib/libcrypto/asn1/asn1_locl.h b/src/lib/libcrypto/asn1/asn1_locl.h index 76b165e77f..cca92aa686 100644 --- a/src/lib/libcrypto/asn1/asn1_locl.h +++ b/src/lib/libcrypto/asn1/asn1_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn1_locl.h,v 1.17 2022/01/10 12:10:26 tb Exp $ */ | 1 | /* $OpenBSD: asn1_locl.h,v 1.18 2022/01/14 08:09:18 tb Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2006. | 3 | * project 2006. |
4 | */ | 4 | */ |
@@ -65,6 +65,20 @@ __BEGIN_HIDDEN_DECLS | |||
65 | ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t); | 65 | ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t); |
66 | void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t); | 66 | void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t); |
67 | 67 | ||
68 | /* These are used internally in the ASN1_OBJECT to keep track of | ||
69 | * whether the names and data need to be free()ed */ | ||
70 | #define ASN1_OBJECT_FLAG_DYNAMIC 0x01 /* internal use */ | ||
71 | #define ASN1_OBJECT_FLAG_CRITICAL 0x02 /* critical x509v3 object id */ | ||
72 | #define ASN1_OBJECT_FLAG_DYNAMIC_STRINGS 0x04 /* internal use */ | ||
73 | #define ASN1_OBJECT_FLAG_DYNAMIC_DATA 0x08 /* internal use */ | ||
74 | struct asn1_object_st { | ||
75 | const char *sn, *ln; | ||
76 | int nid; | ||
77 | int length; | ||
78 | const unsigned char *data; /* data remains const after init */ | ||
79 | int flags; /* Should we free this one */ | ||
80 | } /* ASN1_OBJECT */; | ||
81 | |||
68 | /* ASN1 print context structure */ | 82 | /* ASN1 print context structure */ |
69 | 83 | ||
70 | struct asn1_pctx_st { | 84 | struct asn1_pctx_st { |
diff --git a/src/lib/libcrypto/ossl_typ.h b/src/lib/libcrypto/ossl_typ.h index 9a1101d387..c4dd11eab2 100644 --- a/src/lib/libcrypto/ossl_typ.h +++ b/src/lib/libcrypto/ossl_typ.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ossl_typ.h,v 1.16 2021/12/12 21:35:46 tb Exp $ */ | 1 | /* $OpenBSD: ossl_typ.h,v 1.17 2022/01/14 08:09:18 tb Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -77,6 +77,8 @@ typedef struct asn1_string_st ASN1_STRING; | |||
77 | typedef int ASN1_BOOLEAN; | 77 | typedef int ASN1_BOOLEAN; |
78 | typedef int ASN1_NULL; | 78 | typedef int ASN1_NULL; |
79 | 79 | ||
80 | typedef struct asn1_object_st ASN1_OBJECT; | ||
81 | |||
80 | typedef struct ASN1_ITEM_st ASN1_ITEM; | 82 | typedef struct ASN1_ITEM_st ASN1_ITEM; |
81 | typedef struct asn1_pctx_st ASN1_PCTX; | 83 | typedef struct asn1_pctx_st ASN1_PCTX; |
82 | 84 | ||