Changeset 95219 in vbox for trunk/src/libs/openssl-3.0.3/providers/fips
- Timestamp:
- Jun 8, 2022 7:43:44 AM (3 years ago)
- Location:
- trunk/src/libs/openssl-3.0.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.3
- Property svn:mergeinfo
-
old new 14 14 /vendor/openssl/3.0.1:150323-150324 15 15 /vendor/openssl/3.0.2:150728-150729 16 /vendor/openssl/current:147554-150727 16 /vendor/openssl/3.0.3:151497-151729 17 /vendor/openssl/current:147554-151496
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.3/providers/fips/fipsprov.c
r94320 r95219 1 1 /* 2 * Copyright 2019-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2019-2022 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 4 * Licensed under the Apache License 2.0 (the "License"). You may not use … … 23 23 #include "prov/seeding.h" 24 24 #include "self_test.h" 25 #include "internal/core.h" 25 26 26 27 static const char FIPS_DEFAULT_PROPERTIES[] = "provider=fips,fips=yes"; … … 35 36 static OSSL_FUNC_provider_get_params_fn fips_get_params; 36 37 static OSSL_FUNC_provider_query_operation_fn fips_query; 38 39 /* Locale object accessor functions */ 40 #ifdef OPENSSL_SYS_MACOSX 41 # include <xlocale.h> 42 #else 43 # include <locale.h> 44 #endif 45 46 #if defined OPENSSL_SYS_WINDOWS 47 # define locale_t _locale_t 48 # define freelocale _free_locale 49 #endif 50 static locale_t loc; 51 52 static int fips_init_casecmp(void); 53 static void fips_deinit_casecmp(void); 37 54 38 55 #define ALGC(NAMES, FUNC, CHECK) { { NAMES, FIPS_DEFAULT_PROPERTIES, FUNC }, CHECK } … … 487 504 } 488 505 506 void *ossl_c_locale() { 507 return (void *)loc; 508 } 509 510 static int fips_init_casecmp(void) { 511 # ifdef OPENSSL_SYS_WINDOWS 512 loc = _create_locale(LC_COLLATE, "C"); 513 # else 514 loc = newlocale(LC_COLLATE_MASK, "C", (locale_t) 0); 515 # endif 516 return (loc == (locale_t) 0) ? 0 : 1; 517 } 518 519 static void fips_deinit_casecmp(void) { 520 freelocale(loc); 521 } 522 489 523 static void fips_teardown(void *provctx) 490 524 { … … 499 533 * so no need to destroy it here. 500 534 */ 535 fips_deinit_casecmp(); 501 536 ossl_prov_ctx_free(provctx); 502 537 } … … 548 583 memset(&selftest_params, 0, sizeof(selftest_params)); 549 584 585 if (!fips_init_casecmp()) 586 return 0; 550 587 if (!ossl_prov_seeding_from_dispatch(in)) 551 588 return 0; -
trunk/src/libs/openssl-3.0.3/providers/fips/self_test.c
r94320 r95219 1 1 /* 2 * Copyright 2019-202 1The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2019-2022 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 4 * Licensed under the Apache License 2.0 (the "License"). You may not use … … 104 104 return TRUE; 105 105 } 106 107 #elif defined(__GNUC__) 108 # undef DEP_INIT_ATTRIBUTE 109 # undef DEP_FINI_ATTRIBUTE 110 # define DEP_INIT_ATTRIBUTE static __attribute__((constructor)) 111 # define DEP_FINI_ATTRIBUTE static __attribute__((destructor)) 112 106 113 #elif defined(__sun) 107 114 # pragma init(init) … … 125 132 # pragma init "init" 126 133 # pragma fini "cleanup" 127 128 #elif defined(__GNUC__)129 # undef DEP_INIT_ATTRIBUTE130 # undef DEP_FINI_ATTRIBUTE131 # define DEP_INIT_ATTRIBUTE static __attribute__((constructor))132 # define DEP_FINI_ATTRIBUTE static __attribute__((destructor))133 134 134 135 #elif defined(__TANDEM)
Note:
See TracChangeset
for help on using the changeset viewer.