diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_bytes.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_bytes.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/lib/libcrypto/asn1/a_bytes.c b/src/lib/libcrypto/asn1/a_bytes.c index 3a0c0c7835..bb88660f58 100644 --- a/src/lib/libcrypto/asn1/a_bytes.c +++ b/src/lib/libcrypto/asn1/a_bytes.c | |||
@@ -58,18 +58,7 @@ | |||
58 | 58 | ||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
61 | #include <openssl/asn1_mac.h> | 61 | #include <openssl/asn1.h> |
62 | |||
63 | static unsigned long tag2bit[32]={ | ||
64 | 0, 0, 0, B_ASN1_BIT_STRING, /* tags 0 - 3 */ | ||
65 | B_ASN1_OCTET_STRING, 0, 0, B_ASN1_UNKNOWN,/* tags 4- 7 */ | ||
66 | B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN, B_ASN1_UNKNOWN,/* tags 8-11 */ | ||
67 | B_ASN1_UTF8STRING,B_ASN1_UNKNOWN,B_ASN1_UNKNOWN,B_ASN1_UNKNOWN,/* tags 12-15 */ | ||
68 | 0, 0, B_ASN1_NUMERICSTRING,B_ASN1_PRINTABLESTRING, | ||
69 | B_ASN1_T61STRING,B_ASN1_VIDEOTEXSTRING,B_ASN1_IA5STRING,0, | ||
70 | 0,B_ASN1_GRAPHICSTRING,B_ASN1_ISO64STRING,B_ASN1_GENERALSTRING, | ||
71 | B_ASN1_UNIVERSALSTRING,B_ASN1_UNKNOWN,B_ASN1_BMPSTRING,B_ASN1_UNKNOWN, | ||
72 | }; | ||
73 | 62 | ||
74 | static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c); | 63 | static int asn1_collate_primitive(ASN1_STRING *a, ASN1_CTX *c); |
75 | /* type is a 'bitmap' of acceptable string types. | 64 | /* type is a 'bitmap' of acceptable string types. |
@@ -92,7 +81,7 @@ ASN1_STRING *d2i_ASN1_type_bytes(ASN1_STRING **a, unsigned char **pp, | |||
92 | i=ASN1_R_TAG_VALUE_TOO_HIGH;; | 81 | i=ASN1_R_TAG_VALUE_TOO_HIGH;; |
93 | goto err; | 82 | goto err; |
94 | } | 83 | } |
95 | if (!(tag2bit[tag] & type)) | 84 | if (!(ASN1_tag2bit(tag) & type)) |
96 | { | 85 | { |
97 | i=ASN1_R_WRONG_TYPE; | 86 | i=ASN1_R_WRONG_TYPE; |
98 | goto err; | 87 | goto err; |