openssl/0012-Fix-SPKAC-data-from-stdin.patch
Sahana Prasad e863fff325 Fix reading SPKAC data from stdin
Fix incorrect OSSL_PKEY_PARAM_MAX_SIZE for ed25519 and ed448
Return 0 after cleanup in OPENSSL_init_crypto()
Cleanup the peer point formats on regotiation
Fix default digest to SHA256

Resolves: rhbz#1958045, rhbz#1952850, rhbz#1961687
Related: rhbz#1958033
Signed-off-by: Sahana Prasad <sahana@redhat.com>
2021-06-04 11:07:23 +02:00

29 lines
1.0 KiB
Diff

diff -up openssl-3.0.0-alpha16/apps/lib/apps.c.spkac openssl-3.0.0-alpha16/apps/lib/apps.c
--- openssl-3.0.0-alpha16/apps/lib/apps.c.spkac 2021-06-04 09:28:48.162316896 +0200
+++ openssl-3.0.0-alpha16/apps/lib/apps.c 2021-06-04 09:32:53.911795489 +0200
@@ -403,14 +403,18 @@ CONF *app_load_config_verbose(const char
CONF *app_load_config_internal(const char *filename, int quiet)
{
- BIO *in = NULL; /* leads to empty config in case filename == "" */
+ BIO *in;
CONF *conf;
- if (*filename != '\0'
- && (in = bio_open_default_(filename, 'r', FORMAT_TEXT, quiet)) == NULL)
- return NULL;
- conf = app_load_config_bio(in, filename);
- BIO_free(in);
+ if (filename == NULL || *filename != '\0') {
+ if ((in = bio_open_default_(filename, 'r', FORMAT_TEXT, quiet)) == NULL)
+ return NULL;
+ conf = app_load_config_bio(in, filename);
+ BIO_free(in);
+ } else {
+ /* Return empty config if filename is empty string. */
+ conf = NCONF_new_ex(app_libctx, NULL);
+ }
return conf;
}