* [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
@ 2022-08-28 6:18 Dhanuka Warusadura
2022-08-29 12:15 ` Jarkko Sakkinen
0 siblings, 1 reply; 7+ messages in thread
From: Dhanuka Warusadura @ 2022-08-28 6:18 UTC (permalink / raw)
To: jarkko, dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
Cc: Dhanuka Warusadura
These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
Since OpenSSL 3.0" warning.
Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
---
tools/testing/selftests/sgx/sigstruct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
index 50c5ab1aa6fa..671d9b58e274 100644
--- a/tools/testing/selftests/sgx/sigstruct.c
+++ b/tools/testing/selftests/sgx/sigstruct.c
@@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
break;
had_errors = true;
- err = ERR_get_error_line(&filename, &line);
+ err = ERR_peek_last_error_line(&filename, &line);
ERR_error_string_n(err, str, sizeof(str));
fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
}
--
2.37.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
2022-08-28 6:18 [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line Dhanuka Warusadura
@ 2022-08-29 12:15 ` Jarkko Sakkinen
2022-08-30 2:52 ` Jarkko Sakkinen
0 siblings, 1 reply; 7+ messages in thread
From: Jarkko Sakkinen @ 2022-08-29 12:15 UTC (permalink / raw)
To: Dhanuka Warusadura
Cc: dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
> These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
> Since OpenSSL 3.0" warning.
>
> Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
> ---
> tools/testing/selftests/sgx/sigstruct.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
> index 50c5ab1aa6fa..671d9b58e274 100644
> --- a/tools/testing/selftests/sgx/sigstruct.c
> +++ b/tools/testing/selftests/sgx/sigstruct.c
> @@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
> break;
>
> had_errors = true;
> - err = ERR_get_error_line(&filename, &line);
> + err = ERR_peek_last_error_line(&filename, &line);
> ERR_error_string_n(err, str, sizeof(str));
> fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
> }
> --
> 2.37.2
>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
2022-08-29 12:15 ` Jarkko Sakkinen
@ 2022-08-30 2:52 ` Jarkko Sakkinen
2022-08-30 11:18 ` Dhanuka
0 siblings, 1 reply; 7+ messages in thread
From: Jarkko Sakkinen @ 2022-08-30 2:52 UTC (permalink / raw)
To: Dhanuka Warusadura
Cc: dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
On Mon, Aug 29, 2022 at 03:15:30PM +0300, Jarkko Sakkinen wrote:
> On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
> > These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
> > Since OpenSSL 3.0" warning.
> >
> > Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
> > ---
> > tools/testing/selftests/sgx/sigstruct.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
> > index 50c5ab1aa6fa..671d9b58e274 100644
> > --- a/tools/testing/selftests/sgx/sigstruct.c
> > +++ b/tools/testing/selftests/sgx/sigstruct.c
> > @@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
> > break;
> >
> > had_errors = true;
> > - err = ERR_get_error_line(&filename, &line);
> > + err = ERR_peek_last_error_line(&filename, &line);
> > ERR_error_string_n(err, str, sizeof(str));
> > fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
> > }
> > --
> > 2.37.2
> >
>
> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Actually NAK.
This fix is not complete:
sigstruct.c: In function ‘get_modulus’:
sigstruct.c:151:9: error: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
151 | RSA_get0_key(key, &n, NULL, NULL);
| ^~~~~~~~~~~~
In file included from /usr/include/openssl/x509.h:36,
from /usr/include/openssl/pem.h:23,
from sigstruct.c:16:
/usr/include/openssl/rsa.h:217:28: note: declared here
217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
| ^~~~~~~~~~~~
sigstruct.c: In function ‘gen_sign_key’:
sigstruct.c:168:9: error: ‘PEM_read_bio_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declaration
]
168 | key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL);
| ^~~
/usr/include/openssl/pem.h:447:1: note: declared here
447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
| ^~~~~~~~~~~~~~~~~~~~~~
sigstruct.c: In function ‘encl_measure’:
sigstruct.c:364:9: error: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
364 | if (!RSA_sign(NID_sha256, digest, SHA256_DIGEST_LENGTH,
| ^~
/usr/include/openssl/rsa.h:348:27: note: declared here
348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
| ^~~~~~~~
sigstruct.c:377:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
377 | RSA_free(key);
| ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
| ^~~~~~~~
sigstruct.c:382:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
382 | RSA_free(key);
| ^~~~~~~~
/usr/include/openssl/rsa.h:293:28: note: declared here
293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
| ^~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:39: /home/jarkko/work/linux-sgx/tools/testing/selftests/sgx/sigstruct.o] Error 1
BR, Jarkko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
2022-08-30 2:52 ` Jarkko Sakkinen
@ 2022-08-30 11:18 ` Dhanuka
2022-08-31 1:06 ` Jarkko Sakkinen
0 siblings, 1 reply; 7+ messages in thread
From: Dhanuka @ 2022-08-30 11:18 UTC (permalink / raw)
To: Jarkko Sakkinen
Cc: dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
On 8/30/22 02:52, Jarkko Sakkinen wrote:
> On Mon, Aug 29, 2022 at 03:15:30PM +0300, Jarkko Sakkinen wrote:
>> On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
>>> These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
>>> Since OpenSSL 3.0" warning.
>>>
>>> Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
>>> ---
>>> tools/testing/selftests/sgx/sigstruct.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
>>> index 50c5ab1aa6fa..671d9b58e274 100644
>>> --- a/tools/testing/selftests/sgx/sigstruct.c
>>> +++ b/tools/testing/selftests/sgx/sigstruct.c
>>> @@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
>>> break;
>>>
>>> had_errors = true;
>>> - err = ERR_get_error_line(&filename, &line);
>>> + err = ERR_peek_last_error_line(&filename, &line);
>>> ERR_error_string_n(err, str, sizeof(str));
>>> fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
>>> }
>>> --
>>> 2.37.2
>>>
>> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> Actually NAK.
>
> This fix is not complete:
>
> sigstruct.c: In function ‘get_modulus’:
> sigstruct.c:151:9: error: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> 151 | RSA_get0_key(key, &n, NULL, NULL);
> | ^~~~~~~~~~~~
> In file included from /usr/include/openssl/x509.h:36,
> from /usr/include/openssl/pem.h:23,
> from sigstruct.c:16:
> /usr/include/openssl/rsa.h:217:28: note: declared here
> 217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
> | ^~~~~~~~~~~~
> sigstruct.c: In function ‘gen_sign_key’:
> sigstruct.c:168:9: error: ‘PEM_read_bio_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declaration
> ]
> 168 | key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL);
> | ^~~
> /usr/include/openssl/pem.h:447:1: note: declared here
> 447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
> | ^~~~~~~~~~~~~~~~~~~~~~
> sigstruct.c: In function ‘encl_measure’:
> sigstruct.c:364:9: error: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> 364 | if (!RSA_sign(NID_sha256, digest, SHA256_DIGEST_LENGTH,
> | ^~
> /usr/include/openssl/rsa.h:348:27: note: declared here
> 348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
> | ^~~~~~~~
> sigstruct.c:377:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> 377 | RSA_free(key);
> | ^~~~~~~~
> /usr/include/openssl/rsa.h:293:28: note: declared here
> 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
> | ^~~~~~~~
> sigstruct.c:382:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> 382 | RSA_free(key);
> | ^~~~~~~~
> /usr/include/openssl/rsa.h:293:28: note: declared here
> 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
> | ^~~~~~~~
> cc1: all warnings being treated as errors
> make: *** [Makefile:39: /home/jarkko/work/linux-sgx/tools/testing/selftests/sgx/sigstruct.o] Error 1
>
> BR, Jarkko
Thanks for the review.
But, my intention was to just fix the `ERR_get_error_line` deprecated
warning (as mentioned in the commit header) and not all the OpenSSL
deprecated warnings found in `sigstruct.c`
Do I need to fix all these OpenSSL deprecated warnings in `sigstruct.c`
in order to get this patch merged?
Thanks,
Dhanuka
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
2022-08-30 11:18 ` Dhanuka
@ 2022-08-31 1:06 ` Jarkko Sakkinen
2022-08-31 6:33 ` Dhanuka
0 siblings, 1 reply; 7+ messages in thread
From: Jarkko Sakkinen @ 2022-08-31 1:06 UTC (permalink / raw)
To: Dhanuka; +Cc: dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
On Tue, Aug 30, 2022 at 11:18:03AM +0000, Dhanuka wrote:
> On 8/30/22 02:52, Jarkko Sakkinen wrote:
> > On Mon, Aug 29, 2022 at 03:15:30PM +0300, Jarkko Sakkinen wrote:
> > > On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
> > > > These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
> > > > Since OpenSSL 3.0" warning.
> > > >
> > > > Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
> > > > ---
> > > > tools/testing/selftests/sgx/sigstruct.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
> > > > index 50c5ab1aa6fa..671d9b58e274 100644
> > > > --- a/tools/testing/selftests/sgx/sigstruct.c
> > > > +++ b/tools/testing/selftests/sgx/sigstruct.c
> > > > @@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
> > > > break;
> > > > had_errors = true;
> > > > - err = ERR_get_error_line(&filename, &line);
> > > > + err = ERR_peek_last_error_line(&filename, &line);
> > > > ERR_error_string_n(err, str, sizeof(str));
> > > > fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
> > > > }
> > > > --
> > > > 2.37.2
> > > >
> > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> > Actually NAK.
> >
> > This fix is not complete:
> >
> > sigstruct.c: In function ‘get_modulus’:
> > sigstruct.c:151:9: error: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > 151 | RSA_get0_key(key, &n, NULL, NULL);
> > | ^~~~~~~~~~~~
> > In file included from /usr/include/openssl/x509.h:36,
> > from /usr/include/openssl/pem.h:23,
> > from sigstruct.c:16:
> > /usr/include/openssl/rsa.h:217:28: note: declared here
> > 217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
> > | ^~~~~~~~~~~~
> > sigstruct.c: In function ‘gen_sign_key’:
> > sigstruct.c:168:9: error: ‘PEM_read_bio_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declaration
> > ]
> > 168 | key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL);
> > | ^~~
> > /usr/include/openssl/pem.h:447:1: note: declared here
> > 447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
> > | ^~~~~~~~~~~~~~~~~~~~~~
> > sigstruct.c: In function ‘encl_measure’:
> > sigstruct.c:364:9: error: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > 364 | if (!RSA_sign(NID_sha256, digest, SHA256_DIGEST_LENGTH,
> > | ^~
> > /usr/include/openssl/rsa.h:348:27: note: declared here
> > 348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
> > | ^~~~~~~~
> > sigstruct.c:377:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > 377 | RSA_free(key);
> > | ^~~~~~~~
> > /usr/include/openssl/rsa.h:293:28: note: declared here
> > 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
> > | ^~~~~~~~
> > sigstruct.c:382:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > 382 | RSA_free(key);
> > | ^~~~~~~~
> > /usr/include/openssl/rsa.h:293:28: note: declared here
> > 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
> > | ^~~~~~~~
> > cc1: all warnings being treated as errors
> > make: *** [Makefile:39: /home/jarkko/work/linux-sgx/tools/testing/selftests/sgx/sigstruct.o] Error 1
> >
> > BR, Jarkko
>
> Thanks for the review.
>
> But, my intention was to just fix the `ERR_get_error_line` deprecated
> warning (as mentioned in the commit header) and not all the OpenSSL
> deprecated warnings found in `sigstruct.c`
>
> Do I need to fix all these OpenSSL deprecated warnings in `sigstruct.c` in
> order to get this patch merged?
Yes, it is incomplete as it is.
BR, Jarkko
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
2022-08-31 1:06 ` Jarkko Sakkinen
@ 2022-08-31 6:33 ` Dhanuka
2022-08-31 6:39 ` Jarkko Sakkinen
0 siblings, 1 reply; 7+ messages in thread
From: Dhanuka @ 2022-08-31 6:33 UTC (permalink / raw)
To: Jarkko Sakkinen
Cc: dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
On 8/31/22 01:06, Jarkko Sakkinen wrote:
> On Tue, Aug 30, 2022 at 11:18:03AM +0000, Dhanuka wrote:
>> On 8/30/22 02:52, Jarkko Sakkinen wrote:
>>> On Mon, Aug 29, 2022 at 03:15:30PM +0300, Jarkko Sakkinen wrote:
>>>> On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
>>>>> These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
>>>>> Since OpenSSL 3.0" warning.
>>>>>
>>>>> Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
>>>>> ---
>>>>> tools/testing/selftests/sgx/sigstruct.c | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
>>>>> index 50c5ab1aa6fa..671d9b58e274 100644
>>>>> --- a/tools/testing/selftests/sgx/sigstruct.c
>>>>> +++ b/tools/testing/selftests/sgx/sigstruct.c
>>>>> @@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
>>>>> break;
>>>>> had_errors = true;
>>>>> - err = ERR_get_error_line(&filename, &line);
>>>>> + err = ERR_peek_last_error_line(&filename, &line);
>>>>> ERR_error_string_n(err, str, sizeof(str));
>>>>> fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
>>>>> }
>>>>> --
>>>>> 2.37.2
>>>>>
>>>> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
>>> Actually NAK.
>>>
>>> This fix is not complete:
>>>
>>> sigstruct.c: In function ‘get_modulus’:
>>> sigstruct.c:151:9: error: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
>>> 151 | RSA_get0_key(key, &n, NULL, NULL);
>>> | ^~~~~~~~~~~~
>>> In file included from /usr/include/openssl/x509.h:36,
>>> from /usr/include/openssl/pem.h:23,
>>> from sigstruct.c:16:
>>> /usr/include/openssl/rsa.h:217:28: note: declared here
>>> 217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
>>> | ^~~~~~~~~~~~
>>> sigstruct.c: In function ‘gen_sign_key’:
>>> sigstruct.c:168:9: error: ‘PEM_read_bio_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declaration
>>> ]
>>> 168 | key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL);
>>> | ^~~
>>> /usr/include/openssl/pem.h:447:1: note: declared here
>>> 447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
>>> | ^~~~~~~~~~~~~~~~~~~~~~
>>> sigstruct.c: In function ‘encl_measure’:
>>> sigstruct.c:364:9: error: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
>>> 364 | if (!RSA_sign(NID_sha256, digest, SHA256_DIGEST_LENGTH,
>>> | ^~
>>> /usr/include/openssl/rsa.h:348:27: note: declared here
>>> 348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
>>> | ^~~~~~~~
>>> sigstruct.c:377:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
>>> 377 | RSA_free(key);
>>> | ^~~~~~~~
>>> /usr/include/openssl/rsa.h:293:28: note: declared here
>>> 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
>>> | ^~~~~~~~
>>> sigstruct.c:382:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
>>> 382 | RSA_free(key);
>>> | ^~~~~~~~
>>> /usr/include/openssl/rsa.h:293:28: note: declared here
>>> 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
>>> | ^~~~~~~~
>>> cc1: all warnings being treated as errors
>>> make: *** [Makefile:39: /home/jarkko/work/linux-sgx/tools/testing/selftests/sgx/sigstruct.o] Error 1
>>>
>>> BR, Jarkko
>> Thanks for the review.
>>
>> But, my intention was to just fix the `ERR_get_error_line` deprecated
>> warning (as mentioned in the commit header) and not all the OpenSSL
>> deprecated warnings found in `sigstruct.c`
>>
>> Do I need to fix all these OpenSSL deprecated warnings in `sigstruct.c` in
>> order to get this patch merged?
> Yes, it is incomplete as it is.
>
> BR, Jarkko
Understood. Will try to resolve the remaining deprecated warnings as well.
Thanks,
Dhanuka
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line
2022-08-31 6:33 ` Dhanuka
@ 2022-08-31 6:39 ` Jarkko Sakkinen
0 siblings, 0 replies; 7+ messages in thread
From: Jarkko Sakkinen @ 2022-08-31 6:39 UTC (permalink / raw)
To: Dhanuka; +Cc: dave.hansen, shuah, linux-sgx, linux-kselftest, linux-kernel
On Wed, Aug 31, 2022 at 06:33:26AM +0000, Dhanuka wrote:
> On 8/31/22 01:06, Jarkko Sakkinen wrote:
> > On Tue, Aug 30, 2022 at 11:18:03AM +0000, Dhanuka wrote:
> > > On 8/30/22 02:52, Jarkko Sakkinen wrote:
> > > > On Mon, Aug 29, 2022 at 03:15:30PM +0300, Jarkko Sakkinen wrote:
> > > > > On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
> > > > > > These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
> > > > > > Since OpenSSL 3.0" warning.
> > > > > >
> > > > > > Signed-off-by: Dhanuka Warusadura <wdnuka@gmail.com>
> > > > > > ---
> > > > > > tools/testing/selftests/sgx/sigstruct.c | 2 +-
> > > > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
> > > > > > index 50c5ab1aa6fa..671d9b58e274 100644
> > > > > > --- a/tools/testing/selftests/sgx/sigstruct.c
> > > > > > +++ b/tools/testing/selftests/sgx/sigstruct.c
> > > > > > @@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
> > > > > > break;
> > > > > > had_errors = true;
> > > > > > - err = ERR_get_error_line(&filename, &line);
> > > > > > + err = ERR_peek_last_error_line(&filename, &line);
> > > > > > ERR_error_string_n(err, str, sizeof(str));
> > > > > > fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
> > > > > > }
> > > > > > --
> > > > > > 2.37.2
> > > > > >
> > > > > Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
> > > > Actually NAK.
> > > >
> > > > This fix is not complete:
> > > >
> > > > sigstruct.c: In function ‘get_modulus’:
> > > > sigstruct.c:151:9: error: ‘RSA_get0_key’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > > > 151 | RSA_get0_key(key, &n, NULL, NULL);
> > > > | ^~~~~~~~~~~~
> > > > In file included from /usr/include/openssl/x509.h:36,
> > > > from /usr/include/openssl/pem.h:23,
> > > > from sigstruct.c:16:
> > > > /usr/include/openssl/rsa.h:217:28: note: declared here
> > > > 217 | OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
> > > > | ^~~~~~~~~~~~
> > > > sigstruct.c: In function ‘gen_sign_key’:
> > > > sigstruct.c:168:9: error: ‘PEM_read_bio_RSAPrivateKey’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declaration
> > > > ]
> > > > 168 | key = PEM_read_bio_RSAPrivateKey(bio, NULL, NULL, NULL);
> > > > | ^~~
> > > > /usr/include/openssl/pem.h:447:1: note: declared here
> > > > 447 | DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
> > > > | ^~~~~~~~~~~~~~~~~~~~~~
> > > > sigstruct.c: In function ‘encl_measure’:
> > > > sigstruct.c:364:9: error: ‘RSA_sign’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > > > 364 | if (!RSA_sign(NID_sha256, digest, SHA256_DIGEST_LENGTH,
> > > > | ^~
> > > > /usr/include/openssl/rsa.h:348:27: note: declared here
> > > > 348 | OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m,
> > > > | ^~~~~~~~
> > > > sigstruct.c:377:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > > > 377 | RSA_free(key);
> > > > | ^~~~~~~~
> > > > /usr/include/openssl/rsa.h:293:28: note: declared here
> > > > 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
> > > > | ^~~~~~~~
> > > > sigstruct.c:382:9: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> > > > 382 | RSA_free(key);
> > > > | ^~~~~~~~
> > > > /usr/include/openssl/rsa.h:293:28: note: declared here
> > > > 293 | OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
> > > > | ^~~~~~~~
> > > > cc1: all warnings being treated as errors
> > > > make: *** [Makefile:39: /home/jarkko/work/linux-sgx/tools/testing/selftests/sgx/sigstruct.o] Error 1
> > > >
> > > > BR, Jarkko
> > > Thanks for the review.
> > >
> > > But, my intention was to just fix the `ERR_get_error_line` deprecated
> > > warning (as mentioned in the commit header) and not all the OpenSSL
> > > deprecated warnings found in `sigstruct.c`
> > >
> > > Do I need to fix all these OpenSSL deprecated warnings in `sigstruct.c` in
> > > order to get this patch merged?
> > Yes, it is incomplete as it is.
> >
> > BR, Jarkko
>
> Understood. Will try to resolve the remaining deprecated warnings as well.
Yeah, it would be way more valuable instead of dozen
of oneline patches. Thank you.
BR, Jarkko
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-08-31 6:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28 6:18 [PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line Dhanuka Warusadura
2022-08-29 12:15 ` Jarkko Sakkinen
2022-08-30 2:52 ` Jarkko Sakkinen
2022-08-30 11:18 ` Dhanuka
2022-08-31 1:06 ` Jarkko Sakkinen
2022-08-31 6:33 ` Dhanuka
2022-08-31 6:39 ` Jarkko Sakkinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.