diff options
author | miod <> | 2015-02-14 15:23:57 +0000 |
---|---|---|
committer | miod <> | 2015-02-14 15:23:57 +0000 |
commit | 50dcf723158de492f1440c6a34fdf06bdc1f16fe (patch) | |
tree | 094ce60cf2e7b1b8f53728f3c1052390bfef6120 /src/lib/libcrypto/asn1/asn1t.h | |
parent | 3831ec92614f93b5873fbec25f33aba2e8b7c2b5 (diff) | |
download | openbsd-50dcf723158de492f1440c6a34fdf06bdc1f16fe.tar.gz openbsd-50dcf723158de492f1440c6a34fdf06bdc1f16fe.tar.bz2 openbsd-50dcf723158de492f1440c6a34fdf06bdc1f16fe.zip |
Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it in
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded
copies of OpenSSL.
ok jsing@
Diffstat (limited to 'src/lib/libcrypto/asn1/asn1t.h')
-rw-r--r-- | src/lib/libcrypto/asn1/asn1t.h | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/src/lib/libcrypto/asn1/asn1t.h b/src/lib/libcrypto/asn1/asn1t.h index 1d96df8148..3d6874d874 100644 --- a/src/lib/libcrypto/asn1/asn1t.h +++ b/src/lib/libcrypto/asn1/asn1t.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn1t.h,v 1.10 2015/02/10 08:05:16 jsing Exp $ */ | 1 | /* $OpenBSD: asn1t.h,v 1.11 2015/02/14 15:23:57 miod 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 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -549,10 +549,6 @@ const char *sname; /* Structure name */ | |||
549 | * The 'funcs' field is used for application | 549 | * The 'funcs' field is used for application |
550 | * specific functions. | 550 | * specific functions. |
551 | * | 551 | * |
552 | * For COMPAT types the funcs field gives a | ||
553 | * set of functions that handle this type, this | ||
554 | * supports the old d2i, i2d convention. | ||
555 | * | ||
556 | * The EXTERN type uses a new style d2i/i2d. | 552 | * The EXTERN type uses a new style d2i/i2d. |
557 | * The new style should be used where possible | 553 | * The new style should be used where possible |
558 | * because it avoids things like the d2i IMPLICIT | 554 | * because it avoids things like the d2i IMPLICIT |
@@ -577,8 +573,6 @@ const char *sname; /* Structure name */ | |||
577 | 573 | ||
578 | #define ASN1_ITYPE_CHOICE 0x2 | 574 | #define ASN1_ITYPE_CHOICE 0x2 |
579 | 575 | ||
580 | #define ASN1_ITYPE_COMPAT 0x3 | ||
581 | |||
582 | #define ASN1_ITYPE_EXTERN 0x4 | 576 | #define ASN1_ITYPE_EXTERN 0x4 |
583 | 577 | ||
584 | #define ASN1_ITYPE_MSTRING 0x5 | 578 | #define ASN1_ITYPE_MSTRING 0x5 |
@@ -621,13 +615,6 @@ typedef int ASN1_primitive_i2c(ASN1_VALUE **pval, unsigned char *cont, int *puty | |||
621 | typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); | 615 | typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len, int utype, char *free_cont, const ASN1_ITEM *it); |
622 | typedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, int indent, const ASN1_PCTX *pctx); | 616 | typedef int ASN1_primitive_print(BIO *out, ASN1_VALUE **pval, const ASN1_ITEM *it, int indent, const ASN1_PCTX *pctx); |
623 | 617 | ||
624 | typedef struct ASN1_COMPAT_FUNCS_st { | ||
625 | ASN1_new_func *asn1_new; | ||
626 | ASN1_free_func *asn1_free; | ||
627 | ASN1_d2i_func *asn1_d2i; | ||
628 | ASN1_i2d_func *asn1_i2d; | ||
629 | } ASN1_COMPAT_FUNCS; | ||
630 | |||
631 | typedef struct ASN1_EXTERN_FUNCS_st { | 618 | typedef struct ASN1_EXTERN_FUNCS_st { |
632 | void *app_data; | 619 | void *app_data; |
633 | ASN1_ex_new_func *asn1_ex_new; | 620 | ASN1_ex_new_func *asn1_ex_new; |
@@ -733,28 +720,6 @@ typedef struct ASN1_STREAM_ARG_st { | |||
733 | ASN1_ITEM_start(itname) \ | 720 | ASN1_ITEM_start(itname) \ |
734 | ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \ | 721 | ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \ |
735 | ASN1_ITEM_end(itname) | 722 | ASN1_ITEM_end(itname) |
736 | |||
737 | /* Macro to implement an ASN1_ITEM in terms of old style funcs */ | ||
738 | |||
739 | #define IMPLEMENT_COMPAT_ASN1(sname) IMPLEMENT_COMPAT_ASN1_type(sname, V_ASN1_SEQUENCE) | ||
740 | |||
741 | #define IMPLEMENT_COMPAT_ASN1_type(sname, tag) \ | ||
742 | static const ASN1_COMPAT_FUNCS sname##_ff = { \ | ||
743 | (ASN1_new_func *)sname##_new, \ | ||
744 | (ASN1_free_func *)sname##_free, \ | ||
745 | (ASN1_d2i_func *)d2i_##sname, \ | ||
746 | (ASN1_i2d_func *)i2d_##sname, \ | ||
747 | }; \ | ||
748 | ASN1_ITEM_start(sname) \ | ||
749 | ASN1_ITYPE_COMPAT, \ | ||
750 | tag, \ | ||
751 | NULL, \ | ||
752 | 0, \ | ||
753 | &sname##_ff, \ | ||
754 | 0, \ | ||
755 | #sname \ | ||
756 | ASN1_ITEM_end(sname) | ||
757 | |||
758 | #define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ | 723 | #define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \ |
759 | ASN1_ITEM_start(sname) \ | 724 | ASN1_ITEM_start(sname) \ |
760 | ASN1_ITYPE_EXTERN, \ | 725 | ASN1_ITYPE_EXTERN, \ |