diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_strnid.c | 33 | ||||
| -rw-r--r-- | src/lib/libcrypto/asn1/ameth_lib.c | 15 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/asn1/a_strnid.c | 33 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/asn1/ameth_lib.c | 15 |
4 files changed, 4 insertions, 92 deletions
diff --git a/src/lib/libcrypto/asn1/a_strnid.c b/src/lib/libcrypto/asn1/a_strnid.c index ec3b160b9f..fb985db27f 100644 --- a/src/lib/libcrypto/asn1/a_strnid.c +++ b/src/lib/libcrypto/asn1/a_strnid.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_strnid.c,v 1.14 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: a_strnid.c,v 1.15 2014/06/22 13:17:08 deraadt 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 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -286,34 +286,3 @@ st_free(ASN1_STRING_TABLE *tbl) | |||
| 286 | 286 | ||
| 287 | 287 | ||
| 288 | IMPLEMENT_STACK_OF(ASN1_STRING_TABLE) | 288 | IMPLEMENT_STACK_OF(ASN1_STRING_TABLE) |
| 289 | |||
| 290 | #ifdef STRING_TABLE_TEST | ||
| 291 | |||
| 292 | main() | ||
| 293 | { | ||
| 294 | ASN1_STRING_TABLE *tmp; | ||
| 295 | int i, last_nid = -1; | ||
| 296 | |||
| 297 | for (tmp = tbl_standard, i = 0; | ||
| 298 | i < sizeof(tbl_standard) / sizeof(ASN1_STRING_TABLE); i++, tmp++) { | ||
| 299 | if (tmp->nid < last_nid) { | ||
| 300 | last_nid = 0; | ||
| 301 | break; | ||
| 302 | } | ||
| 303 | last_nid = tmp->nid; | ||
| 304 | } | ||
| 305 | |||
| 306 | if (last_nid != 0) { | ||
| 307 | printf("Table order OK\n"); | ||
| 308 | exit(0); | ||
| 309 | } | ||
| 310 | |||
| 311 | for (tmp = tbl_standard, i = 0; | ||
| 312 | i < sizeof(tbl_standard) / sizeof(ASN1_STRING_TABLE); i++, tmp++) { | ||
| 313 | printf("Index %d, NID %d, Name=%s\n", i, tmp->nid, | ||
| 314 | OBJ_nid2ln(tmp->nid)); | ||
| 315 | } | ||
| 316 | |||
| 317 | } | ||
| 318 | |||
| 319 | #endif | ||
diff --git a/src/lib/libcrypto/asn1/ameth_lib.c b/src/lib/libcrypto/asn1/ameth_lib.c index d79ea6e5b1..72ed0c4ec3 100644 --- a/src/lib/libcrypto/asn1/ameth_lib.c +++ b/src/lib/libcrypto/asn1/ameth_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ameth_lib.c,v 1.8 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: ameth_lib.c,v 1.9 2014/06/22 13:17:08 deraadt 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 | */ |
| @@ -99,19 +99,6 @@ typedef int sk_cmp_fn_type(const char * const *a, const char * const *b); | |||
| 99 | DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD) | 99 | DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD) |
| 100 | static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL; | 100 | static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL; |
| 101 | 101 | ||
| 102 | #ifdef TEST | ||
| 103 | void | ||
| 104 | main() | ||
| 105 | { | ||
| 106 | int i; | ||
| 107 | for (i = 0; | ||
| 108 | i < sizeof(standard_methods) / sizeof(EVP_PKEY_ASN1_METHOD *); i++) | ||
| 109 | fprintf(stderr, "Number %d id=%d (%s)\n", i, | ||
| 110 | standard_methods[i]->pkey_id, | ||
| 111 | OBJ_nid2sn(standard_methods[i]->pkey_id)); | ||
| 112 | } | ||
| 113 | #endif | ||
| 114 | |||
| 115 | DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_ASN1_METHOD *, | 102 | DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_ASN1_METHOD *, |
| 116 | const EVP_PKEY_ASN1_METHOD *, ameth); | 103 | const EVP_PKEY_ASN1_METHOD *, ameth); |
| 117 | 104 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_strnid.c b/src/lib/libssl/src/crypto/asn1/a_strnid.c index ec3b160b9f..fb985db27f 100644 --- a/src/lib/libssl/src/crypto/asn1/a_strnid.c +++ b/src/lib/libssl/src/crypto/asn1/a_strnid.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_strnid.c,v 1.14 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: a_strnid.c,v 1.15 2014/06/22 13:17:08 deraadt 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 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| @@ -286,34 +286,3 @@ st_free(ASN1_STRING_TABLE *tbl) | |||
| 286 | 286 | ||
| 287 | 287 | ||
| 288 | IMPLEMENT_STACK_OF(ASN1_STRING_TABLE) | 288 | IMPLEMENT_STACK_OF(ASN1_STRING_TABLE) |
| 289 | |||
| 290 | #ifdef STRING_TABLE_TEST | ||
| 291 | |||
| 292 | main() | ||
| 293 | { | ||
| 294 | ASN1_STRING_TABLE *tmp; | ||
| 295 | int i, last_nid = -1; | ||
| 296 | |||
| 297 | for (tmp = tbl_standard, i = 0; | ||
| 298 | i < sizeof(tbl_standard) / sizeof(ASN1_STRING_TABLE); i++, tmp++) { | ||
| 299 | if (tmp->nid < last_nid) { | ||
| 300 | last_nid = 0; | ||
| 301 | break; | ||
| 302 | } | ||
| 303 | last_nid = tmp->nid; | ||
| 304 | } | ||
| 305 | |||
| 306 | if (last_nid != 0) { | ||
| 307 | printf("Table order OK\n"); | ||
| 308 | exit(0); | ||
| 309 | } | ||
| 310 | |||
| 311 | for (tmp = tbl_standard, i = 0; | ||
| 312 | i < sizeof(tbl_standard) / sizeof(ASN1_STRING_TABLE); i++, tmp++) { | ||
| 313 | printf("Index %d, NID %d, Name=%s\n", i, tmp->nid, | ||
| 314 | OBJ_nid2ln(tmp->nid)); | ||
| 315 | } | ||
| 316 | |||
| 317 | } | ||
| 318 | |||
| 319 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/asn1/ameth_lib.c b/src/lib/libssl/src/crypto/asn1/ameth_lib.c index d79ea6e5b1..72ed0c4ec3 100644 --- a/src/lib/libssl/src/crypto/asn1/ameth_lib.c +++ b/src/lib/libssl/src/crypto/asn1/ameth_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ameth_lib.c,v 1.8 2014/06/12 15:49:27 deraadt Exp $ */ | 1 | /* $OpenBSD: ameth_lib.c,v 1.9 2014/06/22 13:17:08 deraadt 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 | */ |
| @@ -99,19 +99,6 @@ typedef int sk_cmp_fn_type(const char * const *a, const char * const *b); | |||
| 99 | DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD) | 99 | DECLARE_STACK_OF(EVP_PKEY_ASN1_METHOD) |
| 100 | static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL; | 100 | static STACK_OF(EVP_PKEY_ASN1_METHOD) *app_methods = NULL; |
| 101 | 101 | ||
| 102 | #ifdef TEST | ||
| 103 | void | ||
| 104 | main() | ||
| 105 | { | ||
| 106 | int i; | ||
| 107 | for (i = 0; | ||
| 108 | i < sizeof(standard_methods) / sizeof(EVP_PKEY_ASN1_METHOD *); i++) | ||
| 109 | fprintf(stderr, "Number %d id=%d (%s)\n", i, | ||
| 110 | standard_methods[i]->pkey_id, | ||
| 111 | OBJ_nid2sn(standard_methods[i]->pkey_id)); | ||
| 112 | } | ||
| 113 | #endif | ||
| 114 | |||
| 115 | DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_ASN1_METHOD *, | 102 | DECLARE_OBJ_BSEARCH_CMP_FN(const EVP_PKEY_ASN1_METHOD *, |
| 116 | const EVP_PKEY_ASN1_METHOD *, ameth); | 103 | const EVP_PKEY_ASN1_METHOD *, ameth); |
| 117 | 104 | ||
