diff options
| author | beck <> | 2022-11-14 17:48:50 +0000 |
|---|---|---|
| committer | beck <> | 2022-11-14 17:48:50 +0000 |
| commit | 86ef9af254717a5620d93d1ebe06ab2ad9597496 (patch) | |
| tree | c42f727f8848b4a56e738422f26e8b44150174e4 /src/lib/libcrypto/x509/x509_ext.c | |
| parent | ee06865d71aaa04ea842bc01f03382ca41128858 (diff) | |
| download | openbsd-86ef9af254717a5620d93d1ebe06ab2ad9597496.tar.gz openbsd-86ef9af254717a5620d93d1ebe06ab2ad9597496.tar.bz2 openbsd-86ef9af254717a5620d93d1ebe06ab2ad9597496.zip | |
Hide public symbols in libcrypto/x509 .c files
ok tb@
Diffstat (limited to 'src/lib/libcrypto/x509/x509_ext.c')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_ext.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_ext.c b/src/lib/libcrypto/x509/x509_ext.c index 1445951199..95679265c3 100644 --- a/src/lib/libcrypto/x509/x509_ext.c +++ b/src/lib/libcrypto/x509/x509_ext.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_ext.c,v 1.13 2021/11/01 20:53:08 tb Exp $ */ | 1 | /* $OpenBSD: x509_ext.c,v 1.14 2022/11/14 17:48:50 beck 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 | * |
| @@ -72,42 +72,49 @@ X509_CRL_get_ext_count(const X509_CRL *x) | |||
| 72 | { | 72 | { |
| 73 | return (X509v3_get_ext_count(x->crl->extensions)); | 73 | return (X509v3_get_ext_count(x->crl->extensions)); |
| 74 | } | 74 | } |
| 75 | LCRYPTO_ALIAS(X509_CRL_get_ext_count) | ||
| 75 | 76 | ||
| 76 | int | 77 | int |
| 77 | X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos) | 78 | X509_CRL_get_ext_by_NID(const X509_CRL *x, int nid, int lastpos) |
| 78 | { | 79 | { |
| 79 | return (X509v3_get_ext_by_NID(x->crl->extensions, nid, lastpos)); | 80 | return (X509v3_get_ext_by_NID(x->crl->extensions, nid, lastpos)); |
| 80 | } | 81 | } |
| 82 | LCRYPTO_ALIAS(X509_CRL_get_ext_by_NID) | ||
| 81 | 83 | ||
| 82 | int | 84 | int |
| 83 | X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj, int lastpos) | 85 | X509_CRL_get_ext_by_OBJ(const X509_CRL *x, const ASN1_OBJECT *obj, int lastpos) |
| 84 | { | 86 | { |
| 85 | return (X509v3_get_ext_by_OBJ(x->crl->extensions, obj, lastpos)); | 87 | return (X509v3_get_ext_by_OBJ(x->crl->extensions, obj, lastpos)); |
| 86 | } | 88 | } |
| 89 | LCRYPTO_ALIAS(X509_CRL_get_ext_by_OBJ) | ||
| 87 | 90 | ||
| 88 | int | 91 | int |
| 89 | X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos) | 92 | X509_CRL_get_ext_by_critical(const X509_CRL *x, int crit, int lastpos) |
| 90 | { | 93 | { |
| 91 | return (X509v3_get_ext_by_critical(x->crl->extensions, crit, lastpos)); | 94 | return (X509v3_get_ext_by_critical(x->crl->extensions, crit, lastpos)); |
| 92 | } | 95 | } |
| 96 | LCRYPTO_ALIAS(X509_CRL_get_ext_by_critical) | ||
| 93 | 97 | ||
| 94 | X509_EXTENSION * | 98 | X509_EXTENSION * |
| 95 | X509_CRL_get_ext(const X509_CRL *x, int loc) | 99 | X509_CRL_get_ext(const X509_CRL *x, int loc) |
| 96 | { | 100 | { |
| 97 | return (X509v3_get_ext(x->crl->extensions, loc)); | 101 | return (X509v3_get_ext(x->crl->extensions, loc)); |
| 98 | } | 102 | } |
| 103 | LCRYPTO_ALIAS(X509_CRL_get_ext) | ||
| 99 | 104 | ||
| 100 | X509_EXTENSION * | 105 | X509_EXTENSION * |
| 101 | X509_CRL_delete_ext(X509_CRL *x, int loc) | 106 | X509_CRL_delete_ext(X509_CRL *x, int loc) |
| 102 | { | 107 | { |
| 103 | return (X509v3_delete_ext(x->crl->extensions, loc)); | 108 | return (X509v3_delete_ext(x->crl->extensions, loc)); |
| 104 | } | 109 | } |
| 110 | LCRYPTO_ALIAS(X509_CRL_delete_ext) | ||
| 105 | 111 | ||
| 106 | void * | 112 | void * |
| 107 | X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx) | 113 | X509_CRL_get_ext_d2i(const X509_CRL *x, int nid, int *crit, int *idx) |
| 108 | { | 114 | { |
| 109 | return X509V3_get_d2i(x->crl->extensions, nid, crit, idx); | 115 | return X509V3_get_d2i(x->crl->extensions, nid, crit, idx); |
| 110 | } | 116 | } |
| 117 | LCRYPTO_ALIAS(X509_CRL_get_ext_d2i) | ||
| 111 | 118 | ||
| 112 | int | 119 | int |
| 113 | X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, | 120 | X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, |
| @@ -115,30 +122,35 @@ X509_CRL_add1_ext_i2d(X509_CRL *x, int nid, void *value, int crit, | |||
| 115 | { | 122 | { |
| 116 | return X509V3_add1_i2d(&x->crl->extensions, nid, value, crit, flags); | 123 | return X509V3_add1_i2d(&x->crl->extensions, nid, value, crit, flags); |
| 117 | } | 124 | } |
| 125 | LCRYPTO_ALIAS(X509_CRL_add1_ext_i2d) | ||
| 118 | 126 | ||
| 119 | int | 127 | int |
| 120 | X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc) | 128 | X509_CRL_add_ext(X509_CRL *x, X509_EXTENSION *ex, int loc) |
| 121 | { | 129 | { |
| 122 | return (X509v3_add_ext(&(x->crl->extensions), ex, loc) != NULL); | 130 | return (X509v3_add_ext(&(x->crl->extensions), ex, loc) != NULL); |
| 123 | } | 131 | } |
| 132 | LCRYPTO_ALIAS(X509_CRL_add_ext) | ||
| 124 | 133 | ||
| 125 | int | 134 | int |
| 126 | X509_get_ext_count(const X509 *x) | 135 | X509_get_ext_count(const X509 *x) |
| 127 | { | 136 | { |
| 128 | return (X509v3_get_ext_count(x->cert_info->extensions)); | 137 | return (X509v3_get_ext_count(x->cert_info->extensions)); |
| 129 | } | 138 | } |
| 139 | LCRYPTO_ALIAS(X509_get_ext_count) | ||
| 130 | 140 | ||
| 131 | int | 141 | int |
| 132 | X509_get_ext_by_NID(const X509 *x, int nid, int lastpos) | 142 | X509_get_ext_by_NID(const X509 *x, int nid, int lastpos) |
| 133 | { | 143 | { |
| 134 | return (X509v3_get_ext_by_NID(x->cert_info->extensions, nid, lastpos)); | 144 | return (X509v3_get_ext_by_NID(x->cert_info->extensions, nid, lastpos)); |
| 135 | } | 145 | } |
| 146 | LCRYPTO_ALIAS(X509_get_ext_by_NID) | ||
| 136 | 147 | ||
| 137 | int | 148 | int |
| 138 | X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos) | 149 | X509_get_ext_by_OBJ(const X509 *x, const ASN1_OBJECT *obj, int lastpos) |
| 139 | { | 150 | { |
| 140 | return (X509v3_get_ext_by_OBJ(x->cert_info->extensions, obj, lastpos)); | 151 | return (X509v3_get_ext_by_OBJ(x->cert_info->extensions, obj, lastpos)); |
| 141 | } | 152 | } |
| 153 | LCRYPTO_ALIAS(X509_get_ext_by_OBJ) | ||
| 142 | 154 | ||
| 143 | int | 155 | int |
| 144 | X509_get_ext_by_critical(const X509 *x, int crit, int lastpos) | 156 | X509_get_ext_by_critical(const X509 *x, int crit, int lastpos) |
| @@ -146,30 +158,35 @@ X509_get_ext_by_critical(const X509 *x, int crit, int lastpos) | |||
| 146 | return (X509v3_get_ext_by_critical(x->cert_info->extensions, crit, | 158 | return (X509v3_get_ext_by_critical(x->cert_info->extensions, crit, |
| 147 | lastpos)); | 159 | lastpos)); |
| 148 | } | 160 | } |
| 161 | LCRYPTO_ALIAS(X509_get_ext_by_critical) | ||
| 149 | 162 | ||
| 150 | X509_EXTENSION * | 163 | X509_EXTENSION * |
| 151 | X509_get_ext(const X509 *x, int loc) | 164 | X509_get_ext(const X509 *x, int loc) |
| 152 | { | 165 | { |
| 153 | return (X509v3_get_ext(x->cert_info->extensions, loc)); | 166 | return (X509v3_get_ext(x->cert_info->extensions, loc)); |
| 154 | } | 167 | } |
| 168 | LCRYPTO_ALIAS(X509_get_ext) | ||
| 155 | 169 | ||
| 156 | X509_EXTENSION * | 170 | X509_EXTENSION * |
| 157 | X509_delete_ext(X509 *x, int loc) | 171 | X509_delete_ext(X509 *x, int loc) |
| 158 | { | 172 | { |
| 159 | return (X509v3_delete_ext(x->cert_info->extensions, loc)); | 173 | return (X509v3_delete_ext(x->cert_info->extensions, loc)); |
| 160 | } | 174 | } |
| 175 | LCRYPTO_ALIAS(X509_delete_ext) | ||
| 161 | 176 | ||
| 162 | int | 177 | int |
| 163 | X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc) | 178 | X509_add_ext(X509 *x, X509_EXTENSION *ex, int loc) |
| 164 | { | 179 | { |
| 165 | return (X509v3_add_ext(&(x->cert_info->extensions), ex, loc) != NULL); | 180 | return (X509v3_add_ext(&(x->cert_info->extensions), ex, loc) != NULL); |
| 166 | } | 181 | } |
| 182 | LCRYPTO_ALIAS(X509_add_ext) | ||
| 167 | 183 | ||
| 168 | void * | 184 | void * |
| 169 | X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx) | 185 | X509_get_ext_d2i(const X509 *x, int nid, int *crit, int *idx) |
| 170 | { | 186 | { |
| 171 | return X509V3_get_d2i(x->cert_info->extensions, nid, crit, idx); | 187 | return X509V3_get_d2i(x->cert_info->extensions, nid, crit, idx); |
| 172 | } | 188 | } |
| 189 | LCRYPTO_ALIAS(X509_get_ext_d2i) | ||
| 173 | 190 | ||
| 174 | int | 191 | int |
| 175 | X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, unsigned long flags) | 192 | X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, unsigned long flags) |
| @@ -177,18 +194,21 @@ X509_add1_ext_i2d(X509 *x, int nid, void *value, int crit, unsigned long flags) | |||
| 177 | return X509V3_add1_i2d(&x->cert_info->extensions, nid, value, crit, | 194 | return X509V3_add1_i2d(&x->cert_info->extensions, nid, value, crit, |
| 178 | flags); | 195 | flags); |
| 179 | } | 196 | } |
| 197 | LCRYPTO_ALIAS(X509_add1_ext_i2d) | ||
| 180 | 198 | ||
| 181 | int | 199 | int |
| 182 | X509_REVOKED_get_ext_count(const X509_REVOKED *x) | 200 | X509_REVOKED_get_ext_count(const X509_REVOKED *x) |
| 183 | { | 201 | { |
| 184 | return (X509v3_get_ext_count(x->extensions)); | 202 | return (X509v3_get_ext_count(x->extensions)); |
| 185 | } | 203 | } |
| 204 | LCRYPTO_ALIAS(X509_REVOKED_get_ext_count) | ||
| 186 | 205 | ||
| 187 | int | 206 | int |
| 188 | X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos) | 207 | X509_REVOKED_get_ext_by_NID(const X509_REVOKED *x, int nid, int lastpos) |
| 189 | { | 208 | { |
| 190 | return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos)); | 209 | return (X509v3_get_ext_by_NID(x->extensions, nid, lastpos)); |
| 191 | } | 210 | } |
| 211 | LCRYPTO_ALIAS(X509_REVOKED_get_ext_by_NID) | ||
| 192 | 212 | ||
| 193 | int | 213 | int |
| 194 | X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, | 214 | X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, |
| @@ -196,36 +216,42 @@ X509_REVOKED_get_ext_by_OBJ(const X509_REVOKED *x, const ASN1_OBJECT *obj, | |||
| 196 | { | 216 | { |
| 197 | return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos)); | 217 | return (X509v3_get_ext_by_OBJ(x->extensions, obj, lastpos)); |
| 198 | } | 218 | } |
| 219 | LCRYPTO_ALIAS(X509_REVOKED_get_ext_by_OBJ) | ||
| 199 | 220 | ||
| 200 | int | 221 | int |
| 201 | X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos) | 222 | X509_REVOKED_get_ext_by_critical(const X509_REVOKED *x, int crit, int lastpos) |
| 202 | { | 223 | { |
| 203 | return (X509v3_get_ext_by_critical(x->extensions, crit, lastpos)); | 224 | return (X509v3_get_ext_by_critical(x->extensions, crit, lastpos)); |
| 204 | } | 225 | } |
| 226 | LCRYPTO_ALIAS(X509_REVOKED_get_ext_by_critical) | ||
| 205 | 227 | ||
| 206 | X509_EXTENSION * | 228 | X509_EXTENSION * |
| 207 | X509_REVOKED_get_ext(const X509_REVOKED *x, int loc) | 229 | X509_REVOKED_get_ext(const X509_REVOKED *x, int loc) |
| 208 | { | 230 | { |
| 209 | return (X509v3_get_ext(x->extensions, loc)); | 231 | return (X509v3_get_ext(x->extensions, loc)); |
| 210 | } | 232 | } |
| 233 | LCRYPTO_ALIAS(X509_REVOKED_get_ext) | ||
| 211 | 234 | ||
| 212 | X509_EXTENSION * | 235 | X509_EXTENSION * |
| 213 | X509_REVOKED_delete_ext(X509_REVOKED *x, int loc) | 236 | X509_REVOKED_delete_ext(X509_REVOKED *x, int loc) |
| 214 | { | 237 | { |
| 215 | return (X509v3_delete_ext(x->extensions, loc)); | 238 | return (X509v3_delete_ext(x->extensions, loc)); |
| 216 | } | 239 | } |
| 240 | LCRYPTO_ALIAS(X509_REVOKED_delete_ext) | ||
| 217 | 241 | ||
| 218 | int | 242 | int |
| 219 | X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc) | 243 | X509_REVOKED_add_ext(X509_REVOKED *x, X509_EXTENSION *ex, int loc) |
| 220 | { | 244 | { |
| 221 | return (X509v3_add_ext(&(x->extensions), ex, loc) != NULL); | 245 | return (X509v3_add_ext(&(x->extensions), ex, loc) != NULL); |
| 222 | } | 246 | } |
| 247 | LCRYPTO_ALIAS(X509_REVOKED_add_ext) | ||
| 223 | 248 | ||
| 224 | void * | 249 | void * |
| 225 | X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, int *idx) | 250 | X509_REVOKED_get_ext_d2i(const X509_REVOKED *x, int nid, int *crit, int *idx) |
| 226 | { | 251 | { |
| 227 | return X509V3_get_d2i(x->extensions, nid, crit, idx); | 252 | return X509V3_get_d2i(x->extensions, nid, crit, idx); |
| 228 | } | 253 | } |
| 254 | LCRYPTO_ALIAS(X509_REVOKED_get_ext_d2i) | ||
| 229 | 255 | ||
| 230 | int | 256 | int |
| 231 | X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, | 257 | X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, |
| @@ -233,3 +259,4 @@ X509_REVOKED_add1_ext_i2d(X509_REVOKED *x, int nid, void *value, int crit, | |||
| 233 | { | 259 | { |
| 234 | return X509V3_add1_i2d(&x->extensions, nid, value, crit, flags); | 260 | return X509V3_add1_i2d(&x->extensions, nid, value, crit, flags); |
| 235 | } | 261 | } |
| 262 | LCRYPTO_ALIAS(X509_REVOKED_add1_ext_i2d) | ||
