diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_pcia.c | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/src/lib/libcrypto/x509/x509_pcia.c b/src/lib/libcrypto/x509/x509_pcia.c deleted file mode 100644 index ec8d03a86b..0000000000 --- a/src/lib/libcrypto/x509/x509_pcia.c +++ /dev/null | |||
| @@ -1,153 +0,0 @@ | |||
| 1 | /* $OpenBSD: x509_pcia.c,v 1.3 2023/02/16 08:38:17 tb Exp $ */ | ||
| 2 | /* Contributed to the OpenSSL Project 2004 | ||
| 3 | * by Richard Levitte (richard@levitte.org) | ||
| 4 | */ | ||
| 5 | /* Copyright (c) 2004 Kungliga Tekniska Högskolan | ||
| 6 | * (Royal Institute of Technology, Stockholm, Sweden). | ||
| 7 | * All rights reserved. | ||
| 8 | * | ||
| 9 | * Redistribution and use in source and binary forms, with or without | ||
| 10 | * modification, are permitted provided that the following conditions | ||
| 11 | * are met: | ||
| 12 | * | ||
| 13 | * 1. Redistributions of source code must retain the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer. | ||
| 15 | * | ||
| 16 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 17 | * notice, this list of conditions and the following disclaimer in the | ||
| 18 | * documentation and/or other materials provided with the distribution. | ||
| 19 | * | ||
| 20 | * 3. Neither the name of the Institute nor the names of its contributors | ||
| 21 | * may be used to endorse or promote products derived from this software | ||
| 22 | * without specific prior written permission. | ||
| 23 | * | ||
| 24 | * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND | ||
| 25 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE | ||
| 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 34 | * SUCH DAMAGE. | ||
| 35 | */ | ||
| 36 | |||
| 37 | #include <openssl/asn1.h> | ||
| 38 | #include <openssl/asn1t.h> | ||
| 39 | #include <openssl/x509v3.h> | ||
| 40 | |||
| 41 | static const ASN1_TEMPLATE PROXY_POLICY_seq_tt[] = { | ||
| 42 | { | ||
| 43 | .flags = 0, | ||
| 44 | .tag = 0, | ||
| 45 | .offset = offsetof(PROXY_POLICY, policyLanguage), | ||
| 46 | .field_name = "policyLanguage", | ||
| 47 | .item = &ASN1_OBJECT_it, | ||
| 48 | }, | ||
| 49 | { | ||
| 50 | .flags = ASN1_TFLG_OPTIONAL, | ||
| 51 | .tag = 0, | ||
| 52 | .offset = offsetof(PROXY_POLICY, policy), | ||
| 53 | .field_name = "policy", | ||
| 54 | .item = &ASN1_OCTET_STRING_it, | ||
| 55 | }, | ||
| 56 | }; | ||
| 57 | |||
| 58 | const ASN1_ITEM PROXY_POLICY_it = { | ||
| 59 | .itype = ASN1_ITYPE_SEQUENCE, | ||
| 60 | .utype = V_ASN1_SEQUENCE, | ||
| 61 | .templates = PROXY_POLICY_seq_tt, | ||
| 62 | .tcount = sizeof(PROXY_POLICY_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
| 63 | .funcs = NULL, | ||
| 64 | .size = sizeof(PROXY_POLICY), | ||
| 65 | .sname = "PROXY_POLICY", | ||
| 66 | }; | ||
| 67 | |||
| 68 | |||
| 69 | PROXY_POLICY * | ||
| 70 | d2i_PROXY_POLICY(PROXY_POLICY **a, const unsigned char **in, long len) | ||
| 71 | { | ||
| 72 | return (PROXY_POLICY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 73 | &PROXY_POLICY_it); | ||
| 74 | } | ||
| 75 | LCRYPTO_ALIAS(d2i_PROXY_POLICY); | ||
| 76 | |||
| 77 | int | ||
| 78 | i2d_PROXY_POLICY(PROXY_POLICY *a, unsigned char **out) | ||
| 79 | { | ||
| 80 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &PROXY_POLICY_it); | ||
| 81 | } | ||
| 82 | LCRYPTO_ALIAS(i2d_PROXY_POLICY); | ||
| 83 | |||
| 84 | PROXY_POLICY * | ||
| 85 | PROXY_POLICY_new(void) | ||
| 86 | { | ||
| 87 | return (PROXY_POLICY *)ASN1_item_new(&PROXY_POLICY_it); | ||
| 88 | } | ||
| 89 | LCRYPTO_ALIAS(PROXY_POLICY_new); | ||
| 90 | |||
| 91 | void | ||
| 92 | PROXY_POLICY_free(PROXY_POLICY *a) | ||
| 93 | { | ||
| 94 | ASN1_item_free((ASN1_VALUE *)a, &PROXY_POLICY_it); | ||
| 95 | } | ||
| 96 | LCRYPTO_ALIAS(PROXY_POLICY_free); | ||
| 97 | |||
| 98 | static const ASN1_TEMPLATE PROXY_CERT_INFO_EXTENSION_seq_tt[] = { | ||
| 99 | { | ||
| 100 | .flags = ASN1_TFLG_OPTIONAL, | ||
| 101 | .tag = 0, | ||
| 102 | .offset = offsetof(PROXY_CERT_INFO_EXTENSION, pcPathLengthConstraint), | ||
| 103 | .field_name = "pcPathLengthConstraint", | ||
| 104 | .item = &ASN1_INTEGER_it, | ||
| 105 | }, | ||
| 106 | { | ||
| 107 | .flags = 0, | ||
| 108 | .tag = 0, | ||
| 109 | .offset = offsetof(PROXY_CERT_INFO_EXTENSION, proxyPolicy), | ||
| 110 | .field_name = "proxyPolicy", | ||
| 111 | .item = &PROXY_POLICY_it, | ||
| 112 | }, | ||
| 113 | }; | ||
| 114 | |||
| 115 | const ASN1_ITEM PROXY_CERT_INFO_EXTENSION_it = { | ||
| 116 | .itype = ASN1_ITYPE_SEQUENCE, | ||
| 117 | .utype = V_ASN1_SEQUENCE, | ||
| 118 | .templates = PROXY_CERT_INFO_EXTENSION_seq_tt, | ||
| 119 | .tcount = sizeof(PROXY_CERT_INFO_EXTENSION_seq_tt) / sizeof(ASN1_TEMPLATE), | ||
| 120 | .funcs = NULL, | ||
| 121 | .size = sizeof(PROXY_CERT_INFO_EXTENSION), | ||
| 122 | .sname = "PROXY_CERT_INFO_EXTENSION", | ||
| 123 | }; | ||
| 124 | |||
| 125 | |||
| 126 | PROXY_CERT_INFO_EXTENSION * | ||
| 127 | d2i_PROXY_CERT_INFO_EXTENSION(PROXY_CERT_INFO_EXTENSION **a, const unsigned char **in, long len) | ||
| 128 | { | ||
| 129 | return (PROXY_CERT_INFO_EXTENSION *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 130 | &PROXY_CERT_INFO_EXTENSION_it); | ||
| 131 | } | ||
| 132 | LCRYPTO_ALIAS(d2i_PROXY_CERT_INFO_EXTENSION); | ||
| 133 | |||
| 134 | int | ||
| 135 | i2d_PROXY_CERT_INFO_EXTENSION(PROXY_CERT_INFO_EXTENSION *a, unsigned char **out) | ||
| 136 | { | ||
| 137 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &PROXY_CERT_INFO_EXTENSION_it); | ||
| 138 | } | ||
| 139 | LCRYPTO_ALIAS(i2d_PROXY_CERT_INFO_EXTENSION); | ||
| 140 | |||
| 141 | PROXY_CERT_INFO_EXTENSION * | ||
| 142 | PROXY_CERT_INFO_EXTENSION_new(void) | ||
| 143 | { | ||
| 144 | return (PROXY_CERT_INFO_EXTENSION *)ASN1_item_new(&PROXY_CERT_INFO_EXTENSION_it); | ||
| 145 | } | ||
| 146 | LCRYPTO_ALIAS(PROXY_CERT_INFO_EXTENSION_new); | ||
| 147 | |||
| 148 | void | ||
| 149 | PROXY_CERT_INFO_EXTENSION_free(PROXY_CERT_INFO_EXTENSION *a) | ||
| 150 | { | ||
| 151 | ASN1_item_free((ASN1_VALUE *)a, &PROXY_CERT_INFO_EXTENSION_it); | ||
| 152 | } | ||
| 153 | LCRYPTO_ALIAS(PROXY_CERT_INFO_EXTENSION_free); | ||
