mirror of https://github.com/openssl/openssl.git
				
				
				
			Merge 5c337effd9 into 7fb9163586
				
					
				
			This commit is contained in:
		
						commit
						277cdecdb4
					
				|  | @ -452,6 +452,8 @@ my @disablables = ( | ||||||
|     "crypto-mdebug", |     "crypto-mdebug", | ||||||
|     "allocfail-tests", |     "allocfail-tests", | ||||||
|     "ct", |     "ct", | ||||||
|  |     "default-fallback-provider", # Don't make the default provider a fallback | ||||||
|  |     "default-provider",          # Don't include the default provider at all | ||||||
|     "default-thread-pool", |     "default-thread-pool", | ||||||
|     "demos", |     "demos", | ||||||
|     "h3demo", |     "h3demo", | ||||||
|  | @ -720,7 +722,9 @@ my @disable_cascades = ( | ||||||
| 
 | 
 | ||||||
|     "deprecated-3.0"    => [ "engine", "srp" ], |     "deprecated-3.0"    => [ "engine", "srp" ], | ||||||
| 
 | 
 | ||||||
|     "http"              => [ "ocsp" ] |     "http"              => [ "ocsp" ], | ||||||
|  | 
 | ||||||
|  |     "default-provider"  => [ "default-fallback-provider" ], | ||||||
|     ); |     ); | ||||||
| 
 | 
 | ||||||
| # Avoid protocol support holes.  Also disable all versions below N, if version | # Avoid protocol support holes.  Also disable all versions below N, if version | ||||||
|  |  | ||||||
|  | @ -1438,7 +1438,6 @@ void *ossl_provider_ctx(const OSSL_PROVIDER *prov) | ||||||
| static int provider_activate_fallbacks(struct provider_store_st *store) | static int provider_activate_fallbacks(struct provider_store_st *store) | ||||||
| { | { | ||||||
|     int use_fallbacks; |     int use_fallbacks; | ||||||
|     int activated_fallback_count = 0; |  | ||||||
|     int ret = 0; |     int ret = 0; | ||||||
|     const OSSL_PROVIDER_INFO *p; |     const OSSL_PROVIDER_INFO *p; | ||||||
| 
 | 
 | ||||||
|  | @ -1501,13 +1500,11 @@ static int provider_activate_fallbacks(struct provider_store_st *store) | ||||||
|             ossl_provider_free(prov); |             ossl_provider_free(prov); | ||||||
|             goto err; |             goto err; | ||||||
|         } |         } | ||||||
|         activated_fallback_count++; |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     if (activated_fallback_count > 0) { |  | ||||||
|     store->use_fallbacks = 0; |     store->use_fallbacks = 0; | ||||||
|     ret = 1; |     ret = 1; | ||||||
|     } | 
 | ||||||
|  err: |  err: | ||||||
|     CRYPTO_THREAD_unlock(store->lock); |     CRYPTO_THREAD_unlock(store->lock); | ||||||
|     return ret; |     return ret; | ||||||
|  |  | ||||||
|  | @ -10,18 +10,29 @@ | ||||||
| #include <openssl/core.h> | #include <openssl/core.h> | ||||||
| #include "provider_local.h" | #include "provider_local.h" | ||||||
| 
 | 
 | ||||||
|  | #ifndef OPENSSL_NO_DEFAULT_PROVIDER | ||||||
| OSSL_provider_init_fn ossl_default_provider_init; | OSSL_provider_init_fn ossl_default_provider_init; | ||||||
|  | #endif | ||||||
| OSSL_provider_init_fn ossl_base_provider_init; | OSSL_provider_init_fn ossl_base_provider_init; | ||||||
| OSSL_provider_init_fn ossl_null_provider_init; | OSSL_provider_init_fn ossl_null_provider_init; | ||||||
| OSSL_provider_init_fn ossl_fips_intern_provider_init; | OSSL_provider_init_fn ossl_fips_intern_provider_init; | ||||||
| #ifdef STATIC_LEGACY | #ifdef STATIC_LEGACY | ||||||
| OSSL_provider_init_fn ossl_legacy_provider_init; | OSSL_provider_init_fn ossl_legacy_provider_init; | ||||||
| #endif | #endif | ||||||
|  | 
 | ||||||
|  | #ifndef OPENSSL_NO_DEFAULT_FALLBACK_PROVIDER | ||||||
|  | # define DEFAULT_FALLBACK 1 | ||||||
|  | #else | ||||||
|  | # define DEFAULT_FALLBACK 0 | ||||||
|  | #endif | ||||||
|  | 
 | ||||||
| const OSSL_PROVIDER_INFO ossl_predefined_providers[] = { | const OSSL_PROVIDER_INFO ossl_predefined_providers[] = { | ||||||
| #ifdef FIPS_MODULE | #ifdef FIPS_MODULE | ||||||
|     { "fips", NULL, ossl_fips_intern_provider_init, NULL, 1 }, |     { "fips", NULL, ossl_fips_intern_provider_init, NULL, 1 }, | ||||||
| #else | #else | ||||||
|     { "default", NULL, ossl_default_provider_init, NULL, 1 }, | # ifndef OPENSSL_NO_DEFAULT_PROVIDER | ||||||
|  |     { "default", NULL, ossl_default_provider_init, NULL, DEFAULT_FALLBACK }, | ||||||
|  | # endif | ||||||
| # ifdef STATIC_LEGACY | # ifdef STATIC_LEGACY | ||||||
|     { "legacy", NULL, ossl_legacy_provider_init, NULL, 0 }, |     { "legacy", NULL, ossl_legacy_provider_init, NULL, 0 }, | ||||||
| # endif | # endif | ||||||
|  |  | ||||||
|  | @ -75,9 +75,11 @@ DEPEND[$LIBDEFAULT]=$LIBCOMMON | ||||||
| # by using the appropriate libraries as source).  Note that for shared | # by using the appropriate libraries as source).  Note that for shared | ||||||
| # libraries, SOURCEd libraries are considered as if they were specified | # libraries, SOURCEd libraries are considered as if they were specified | ||||||
| # with DEPEND. | # with DEPEND. | ||||||
|  | IF[{- !$disabled{default-provider} -}] | ||||||
|   $DEFAULTGOAL=../libcrypto |   $DEFAULTGOAL=../libcrypto | ||||||
|   SOURCE[$DEFAULTGOAL]=$LIBDEFAULT defltprov.c |   SOURCE[$DEFAULTGOAL]=$LIBDEFAULT defltprov.c | ||||||
|   INCLUDE[$DEFAULTGOAL]=implementations/include |   INCLUDE[$DEFAULTGOAL]=implementations/include | ||||||
|  | ENDIF | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
| # Base provider stuff | # Base provider stuff | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue