Skip to content

Commit d3be06f

Browse files
committed
fix: added comment to explain resetting the global provider settings
Signed-off-by: James Chapman <james.chapman@pionix.de>
1 parent e926621 commit d3be06f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/staging/tls/openssl_util.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ pkey_ptr load_private_key(const char* filename, const char* password) {
407407
OpenSSLProvider provider;
408408

409409
if (custom_key) {
410+
// set global provider to custom settings
410411
provider.set_global_mode(OpenSSLProvider::mode_t::custom_provider);
411412
} else {
412413
provider.set_global_mode(OpenSSLProvider::mode_t::default_provider);
@@ -425,6 +426,7 @@ pkey_ptr load_private_key(const char* filename, const char* password) {
425426
}
426427

427428
if (custom_key) {
429+
// reset global provider back to default settings
428430
provider.set_global_mode(OpenSSLProvider::mode_t::default_provider);
429431
}
430432

0 commit comments

Comments
 (0)