mkfs.ubifs: remove OPENSSL_no_config()
PATCH 1/1 mkfs.ubifs: remove OPENSSL_no_config()
From: Torben Hohn <[email protected]>
Especially for the pkcs11 engine, a configuration is required because the provider has to be configured.
Its not clear why OPENSSL_no_config() is called.
Remove OPENSSL_no_config() and call OPENSSL_config(NULL) instead.
--- ubifs-utils/mkfs.ubifs/sign.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
ubifs-utils/mkfs.ubifs/sign.c +2 -1
@@ -388,7 +388,8 @@ int init_authentication(void)if (!c->hash_algo_name)return err_msg ("Hash algorithm not given (--hash-algo)" ); -OPENSSL_no_config (); +OPENSSL_config (NULL ); +OpenSSL_add_all_algorithms ();ERR_load_crypto_strings ();
Signature · 6 lines
2.27.0 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 7 lines · On Fri, Jul 24, 2020 at 10:00 AM <[email protected]> wrote:
From: Torben Hohn <[email protected]>
Especially for the pkcs11 engine, a configuration is required because the provider has to be configured.
Its not clear why
OPENSSL_no_config()is called.
My best guess is because on old openssl versions it used to work.
Quoted 2 lines
Remove
OPENSSL_no_config()and callOPENSSL_config(NULL)instead.
David, can you please check whether this change works with all openssl versions we want to support?
Signature · 6 lines
Thanks, //richard ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/
Am 25.07.20 um 10:24 schrieb Richard Weinberger:
Quoted 9 lines · On Fri, Jul 24, 2020 at 10:00 AM <[email protected]> wrote:
Quoted 7 lines
From: Torben Hohn <[email protected]>
Especially for the pkcs11 engine, a configuration is required because the provider has to be configured.
Its not clear why
OPENSSL_no_config()is called.
Quoted 8 lines
My best guess is because on old openssl versions it used to work.
Quoted 2 lines
Remove
OPENSSL_no_config()and callOPENSSL_config(NULL)instead.David, can you please check whether this change works with all openssl versions we want to support?
Are there any news on this?
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 12 lines · Bastian Germann
Am 25.07.20 um 10:24 schrieb Richard Weinberger:
Quoted 11 lines · On Fri, Jul 24, 2020 at 10:00 AM <[email protected]> wrote:
Quoted 7 lines
From: Torben Hohn <[email protected]>
Especially for the pkcs11 engine, a configuration is required because the provider has to be configured.
Its not clear why
OPENSSL_no_config()is called.My best guess is because on old openssl versions it used to work.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Remove
OPENSSL_no_config()and callOPENSSL_config(NULL)instead.David, can you please check whether this change works with all openssl versions we want to support?
Are there any news on this?
Sorry for the delay. I did some research on this in August but being busy at the time eventually forgot about the thread.
The latest changes that I found in the change log dated back to OpenSSL 0.9.7. Walking through the git log for the implementation seems to confirm that.
However, recent man pages say, that the OPENSSL_config functions are deprecated since OpenSSL 1.1.0 and OPENSSL_init_crypto should be used now, so the patch might require an extra #if for newer OpenSSL versions.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Am 25.09.20 um 05:15 schrieb David Oberhollenzer:
Quoted 26 lines · Bastian Germann
Quoted 12 lines
Am 25.07.20 um 10:24 schrieb Richard Weinberger:
Quoted 11 lines · On Fri, Jul 24, 2020 at 10:00 AM <[email protected]> wrote:
Quoted 7 lines
From: Torben Hohn <[email protected]>
Especially for the pkcs11 engine, a configuration is required because the provider has to be configured.
Its not clear why
OPENSSL_no_config()is called.My best guess is because on old openssl versions it used to work.
Quoted 9 lines
Quoted 6 lines
Quoted 2 lines
Remove
OPENSSL_no_config()and callOPENSSL_config(NULL)instead.David, can you please check whether this change works with all openssl versions we want to support?
Are there any news on this?
Sorry for the delay. I did some research on this in August but being busy at the time eventually forgot about the thread.
Quoted 7 lines
The latest changes that I found in the change log dated back to OpenSSL 0.9.7. Walking through the git log for the implementation seems to confirm that.
However, recent man pages say, that the
OPENSSL_configfunctions are deprecated since OpenSSL 1.1.0 andOPENSSL_init_cryptoshould be used now, so the patch might require an extra #if for newer OpenSSL versions.
That would be another patch but does not invalidate this one. mtd-utils also uses other functions which are deprecated in OpenSSL >= 1.1.0:
OPENSSL_no_configOpenSSL_add_all_digestsOpenSSL_add_all_algorithmsEVP_cleanupERR_free_stringsERR_load_crypto_strings
You can yield this list via compiling with -DOPENSSL_API_COMPAT=0x10100000L.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
Quoted 8 lines · Bastian Germann
Quoted 4 lines
However, recent man pages say, that the
OPENSSL_configfunctions are deprecated since OpenSSL 1.1.0 andOPENSSL_init_cryptoshould be used now, so the patch might require an extra #if for newer OpenSSL versions.That would be another patch but does not invalidate this one. mtd-utils also uses other functions which are deprecated in OpenSSL >= 1.1.0:
Quoted 9 lines
OPENSSL_no_configOpenSSL_add_all_digestsOpenSSL_add_all_algorithmsEVP_cleanupERR_free_stringsERR_load_crypto_stringsYou can yield this list via compiling with -DOPENSSL_API_COMPAT=0x10100000L.
I agree. Given that there is a longer list of other things to take care of anyway and since it builds just fine with recent OpenSSL on my end as well, I'll just apply the patch upstream for now.
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/