Hi,
here, I am on Debian/unstable AMD64.
Recently (or still) there is/was a transition to OpenSSL see below link.
The warnings look like:
189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
deprecated [-Wdeprecated-declarations]
201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
deprecated [-Wdeprecated-declarations]
213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
is deprecated [-Wdeprecated-declarations]
225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
[-Wdeprecated-declarations]
238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
deprecated [-Wdeprecated-declarations]
262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
deprecated [-Wdeprecated-declarations]
395:certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is
deprecated [-Wdeprecated-declarations]
407:certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is
deprecated [-Wdeprecated-declarations]
420:certs/extract-cert.c:124:3: warning: 'ENGINE_load_builtin_engines'
is deprecated [-Wdeprecated-declarations]
432:certs/extract-cert.c:126:7: warning: 'ENGINE_by_id' is deprecated
[-Wdeprecated-declarations]
444:certs/extract-cert.c:128:7: warning: 'ENGINE_init' is deprecated
[-Wdeprecated-declarations]
456:certs/extract-cert.c:133:9: warning: 'ENGINE_ctrl_cmd_string' is
deprecated [-Wdeprecated-declarations]
468:certs/extract-cert.c:134:3: warning: 'ENGINE_ctrl_cmd' is
deprecated [-Wdeprecated-declarations]
More detailed output:
189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
deprecated [-Wdeprecated-declarations]
190- while ((e = ERR_get_error_line(&file, &line))) {
191- ^
192-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
been explicitly marked deprecated here
193-OSSL_DEPRECATEDIN_3_0
194-^
195-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
196-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
197- ^
198-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
199-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
200- ^
201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
deprecated [-Wdeprecated-declarations]
202- while (ERR_get_error_line(&file, &line)) {}
203- ^
204-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
been explicitly marked deprecated here
205-OSSL_DEPRECATEDIN_3_0
206-^
207-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
208-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
209- ^
210-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
211-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
212- ^
213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
is deprecated [-Wdeprecated-declarations]
214- ENGINE_load_builtin_engines();
215- ^
216-/usr/include/openssl/engine.h:358:1: note:
'ENGINE_load_builtin_engines' has been explicitly marked deprecated
here
217-OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
218-^
219-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
220-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
221- ^
222-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
223-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
224- ^
225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
[-Wdeprecated-declarations]
226- e = ENGINE_by_id("pkcs11");
227- ^
228-/usr/include/openssl/engine.h:336:1: note: 'ENGINE_by_id' has been
explicitly marked deprecated here
229-OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
230-^
231-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
232-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
233- ^
234-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
235-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
236- ^
237-scripts/sign-file.c: ld.lld -r -o
/home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/objtool-in.o
/home/dileks/src/linux-kernel/git/tools/objtool/arch/x86
/special.o /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/decode.o
238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
239- if (ENGINE_init(e))
240- ^
241-/usr/include/openssl/engine.h:620:1: note: 'ENGINE_init' has been
explicitly marked deprecated here
242-OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
243-^
244-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
245-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
246- ^
247-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
248-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
249- ^
250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
deprecated [-Wdeprecated-declarations]
251- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
252- ^
253-/usr/include/openssl/engine.h:478:1: note:
'ENGINE_ctrl_cmd_string' has been explicitly marked deprecated here
254-OSSL_DEPRECATEDIN_3_0
255-^
256-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
257-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
258- ^
259-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
260-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
261- ^
262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
deprecated [-Wdeprecated-declarations]
263- private_key = ENGINE_load_private_key(e, private_key_name,
264- ^
265-/usr/include/openssl/engine.h:637:1: note:
'ENGINE_load_private_key' has been explicitly marked deprecated here
266-OSSL_DEPRECATEDIN_3_0
267-^
268-/usr/include/openssl/macros.h:182:49: note: expanded from macro
'OSSL_DEPRECATEDIN_3_0'
269-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
270- ^
271-/usr/include/openssl/macros.h:62:52: note: expanded from macro
'OSSL_DEPRECATED'
272-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
273-
Relevant OpenSSL v3.0.3 header files are attached.
My kernel-config, too.
If you need further information, please let me know.
Regards,
-Sedat-
[1] https://release.debian.org/transitions/html/auto-openssl.html
[ CC Kees and Salvatore ]
The Debian kernel-team ships a fix (4 hours young):
commit: 13e234d459c11946efba647c3daf15e03abb0d99
"sign-file: Convert API usage to support OpenSSL v3"
*untested*
Regards,
-Sedat-
[1] https://salsa.debian.org/kernel-team/linux/-/commit/13e234d459c11946efba647c3daf15e03abb0d99
On Thu, May 19, 2022 at 11:55 AM Sedat Dilek <[email protected]> wrote:
>
> Hi,
>
> here, I am on Debian/unstable AMD64.
>
> Recently (or still) there is/was a transition to OpenSSL see below link.
>
> The warnings look like:
>
> 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> deprecated [-Wdeprecated-declarations]
> 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> deprecated [-Wdeprecated-declarations]
> 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> is deprecated [-Wdeprecated-declarations]
> 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> [-Wdeprecated-declarations]
> 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> deprecated [-Wdeprecated-declarations]
> 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> deprecated [-Wdeprecated-declarations]
> 395:certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is
> deprecated [-Wdeprecated-declarations]
> 407:certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is
> deprecated [-Wdeprecated-declarations]
> 420:certs/extract-cert.c:124:3: warning: 'ENGINE_load_builtin_engines'
> is deprecated [-Wdeprecated-declarations]
> 432:certs/extract-cert.c:126:7: warning: 'ENGINE_by_id' is deprecated
> [-Wdeprecated-declarations]
> 444:certs/extract-cert.c:128:7: warning: 'ENGINE_init' is deprecated
> [-Wdeprecated-declarations]
> 456:certs/extract-cert.c:133:9: warning: 'ENGINE_ctrl_cmd_string' is
> deprecated [-Wdeprecated-declarations]
> 468:certs/extract-cert.c:134:3: warning: 'ENGINE_ctrl_cmd' is
> deprecated [-Wdeprecated-declarations]
>
> More detailed output:
>
> 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> deprecated [-Wdeprecated-declarations]
> 190- while ((e = ERR_get_error_line(&file, &line))) {
> 191- ^
> 192-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> been explicitly marked deprecated here
> 193-OSSL_DEPRECATEDIN_3_0
> 194-^
> 195-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 196-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 197- ^
> 198-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 199-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 200- ^
> 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> deprecated [-Wdeprecated-declarations]
> 202- while (ERR_get_error_line(&file, &line)) {}
> 203- ^
> 204-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> been explicitly marked deprecated here
> 205-OSSL_DEPRECATEDIN_3_0
> 206-^
> 207-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 208-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 209- ^
> 210-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 211-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 212- ^
> 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> is deprecated [-Wdeprecated-declarations]
> 214- ENGINE_load_builtin_engines();
> 215- ^
> 216-/usr/include/openssl/engine.h:358:1: note:
> 'ENGINE_load_builtin_engines' has been explicitly marked deprecated
> here
> 217-OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
> 218-^
> 219-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 220-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 221- ^
> 222-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 223-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 224- ^
> 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> [-Wdeprecated-declarations]
> 226- e = ENGINE_by_id("pkcs11");
> 227- ^
> 228-/usr/include/openssl/engine.h:336:1: note: 'ENGINE_by_id' has been
> explicitly marked deprecated here
> 229-OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
> 230-^
> 231-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 232-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 233- ^
> 234-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 235-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 236- ^
> 237-scripts/sign-file.c: ld.lld -r -o
> /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/objtool-in.o
> /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86
> /special.o /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/decode.o
> 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> 239- if (ENGINE_init(e))
> 240- ^
> 241-/usr/include/openssl/engine.h:620:1: note: 'ENGINE_init' has been
> explicitly marked deprecated here
> 242-OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
> 243-^
> 244-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 245-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 246- ^
> 247-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 248-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 249- ^
> 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> deprecated [-Wdeprecated-declarations]
> 251- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
> 252- ^
> 253-/usr/include/openssl/engine.h:478:1: note:
> 'ENGINE_ctrl_cmd_string' has been explicitly marked deprecated here
> 254-OSSL_DEPRECATEDIN_3_0
> 255-^
> 256-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 257-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 258- ^
> 259-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 260-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 261- ^
> 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> deprecated [-Wdeprecated-declarations]
> 263- private_key = ENGINE_load_private_key(e, private_key_name,
> 264- ^
> 265-/usr/include/openssl/engine.h:637:1: note:
> 'ENGINE_load_private_key' has been explicitly marked deprecated here
> 266-OSSL_DEPRECATEDIN_3_0
> 267-^
> 268-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> 'OSSL_DEPRECATEDIN_3_0'
> 269-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> 270- ^
> 271-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> 'OSSL_DEPRECATED'
> 272-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> 273-
>
> Relevant OpenSSL v3.0.3 header files are attached.
> My kernel-config, too.
>
> If you need further information, please let me know.
>
> Regards,
> -Sedat-
>
> [1] https://release.debian.org/transitions/html/auto-openssl.html
On Thu, May 19, 2022 at 12:01 PM Sedat Dilek <[email protected]> wrote:
>
> [ CC Kees and Salvatore ]
>
> The Debian kernel-team ships a fix (4 hours young):
>
> commit: 13e234d459c11946efba647c3daf15e03abb0d99
> "sign-file: Convert API usage to support OpenSSL v3"
>
> *untested*
@Kees:
Any updates on the part of certs/extract-cert.c?
-Sedat-
> [1] https://salsa.debian.org/kernel-team/linux/-/commit/13e234d459c11946efba647c3daf15e03abb0d99
>
> On Thu, May 19, 2022 at 11:55 AM Sedat Dilek <[email protected]> wrote:
> >
> > Hi,
> >
> > here, I am on Debian/unstable AMD64.
> >
> > Recently (or still) there is/was a transition to OpenSSL see below link.
> >
> > The warnings look like:
> >
> > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > deprecated [-Wdeprecated-declarations]
> > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > deprecated [-Wdeprecated-declarations]
> > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > is deprecated [-Wdeprecated-declarations]
> > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > [-Wdeprecated-declarations]
> > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > deprecated [-Wdeprecated-declarations]
> > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > deprecated [-Wdeprecated-declarations]
> > 395:certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is
> > deprecated [-Wdeprecated-declarations]
> > 407:certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is
> > deprecated [-Wdeprecated-declarations]
> > 420:certs/extract-cert.c:124:3: warning: 'ENGINE_load_builtin_engines'
> > is deprecated [-Wdeprecated-declarations]
> > 432:certs/extract-cert.c:126:7: warning: 'ENGINE_by_id' is deprecated
> > [-Wdeprecated-declarations]
> > 444:certs/extract-cert.c:128:7: warning: 'ENGINE_init' is deprecated
> > [-Wdeprecated-declarations]
> > 456:certs/extract-cert.c:133:9: warning: 'ENGINE_ctrl_cmd_string' is
> > deprecated [-Wdeprecated-declarations]
> > 468:certs/extract-cert.c:134:3: warning: 'ENGINE_ctrl_cmd' is
> > deprecated [-Wdeprecated-declarations]
> >
> > More detailed output:
> >
> > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > deprecated [-Wdeprecated-declarations]
> > 190- while ((e = ERR_get_error_line(&file, &line))) {
> > 191- ^
> > 192-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > been explicitly marked deprecated here
> > 193-OSSL_DEPRECATEDIN_3_0
> > 194-^
> > 195-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 196-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 197- ^
> > 198-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 199-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 200- ^
> > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > deprecated [-Wdeprecated-declarations]
> > 202- while (ERR_get_error_line(&file, &line)) {}
> > 203- ^
> > 204-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > been explicitly marked deprecated here
> > 205-OSSL_DEPRECATEDIN_3_0
> > 206-^
> > 207-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 208-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 209- ^
> > 210-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 211-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 212- ^
> > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > is deprecated [-Wdeprecated-declarations]
> > 214- ENGINE_load_builtin_engines();
> > 215- ^
> > 216-/usr/include/openssl/engine.h:358:1: note:
> > 'ENGINE_load_builtin_engines' has been explicitly marked deprecated
> > here
> > 217-OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
> > 218-^
> > 219-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 220-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 221- ^
> > 222-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 223-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 224- ^
> > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > [-Wdeprecated-declarations]
> > 226- e = ENGINE_by_id("pkcs11");
> > 227- ^
> > 228-/usr/include/openssl/engine.h:336:1: note: 'ENGINE_by_id' has been
> > explicitly marked deprecated here
> > 229-OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
> > 230-^
> > 231-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 232-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 233- ^
> > 234-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 235-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 236- ^
> > 237-scripts/sign-file.c: ld.lld -r -o
> > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/objtool-in.o
> > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86
> > /special.o /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/decode.o
> > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > 239- if (ENGINE_init(e))
> > 240- ^
> > 241-/usr/include/openssl/engine.h:620:1: note: 'ENGINE_init' has been
> > explicitly marked deprecated here
> > 242-OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
> > 243-^
> > 244-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 245-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 246- ^
> > 247-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 248-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 249- ^
> > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > deprecated [-Wdeprecated-declarations]
> > 251- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
> > 252- ^
> > 253-/usr/include/openssl/engine.h:478:1: note:
> > 'ENGINE_ctrl_cmd_string' has been explicitly marked deprecated here
> > 254-OSSL_DEPRECATEDIN_3_0
> > 255-^
> > 256-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 257-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 258- ^
> > 259-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 260-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 261- ^
> > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > deprecated [-Wdeprecated-declarations]
> > 263- private_key = ENGINE_load_private_key(e, private_key_name,
> > 264- ^
> > 265-/usr/include/openssl/engine.h:637:1: note:
> > 'ENGINE_load_private_key' has been explicitly marked deprecated here
> > 266-OSSL_DEPRECATEDIN_3_0
> > 267-^
> > 268-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > 'OSSL_DEPRECATEDIN_3_0'
> > 269-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > 270- ^
> > 271-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > 'OSSL_DEPRECATED'
> > 272-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > 273-
> >
> > Relevant OpenSSL v3.0.3 header files are attached.
> > My kernel-config, too.
> >
> > If you need further information, please let me know.
> >
> > Regards,
> > -Sedat-
> >
> > [1] https://release.debian.org/transitions/html/auto-openssl.html
On Fri, May 27, 2022 at 9:47 AM Sedat Dilek <[email protected]> wrote:
>
> On Tue, May 24, 2022 at 9:13 PM Sedat Dilek <[email protected]> wrote:
> >
> > On Thu, May 19, 2022 at 12:01 PM Sedat Dilek <[email protected]> wrote:
> > >
> > > [ CC Kees and Salvatore ]
> > >
> > > The Debian kernel-team ships a fix (4 hours young):
> > >
> > > commit: 13e234d459c11946efba647c3daf15e03abb0d99
> > > "sign-file: Convert API usage to support OpenSSL v3"
> > >
> > > *untested*
> >
> > @Kees:
> >
> > Any updates on the part of certs/extract-cert.c?
> >
>
> [ CC Tasmiya Nalatwad ]
>
> There are several more reports on this issue (see [3]).
>
> I did a quick test with Kees' patch from [2] and my attached patch
> "extract-cert: Suppress warnings with OpenSSL v3 API".
>
> Now, I see no more warnings due to OpenSSL v3 API:
>
> $ egrep 'sign-file|extract-cert'
> ../build-log_5.18.0-2-amd64-clang14-lto.txt
> 176: clang -Wp,-MMD,scripts/.sign-file.d -Wall -Wmissing-prototypes
> -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11
> -Wdeclaration-after-statement -o scripts/sign-file
> scripts/sign-file.c -lcrypto
> 2053: clang -Wp,-MMD,certs/.extract-cert.d -Wall -Wmissing-prototypes
> -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11
> -Wdeclaration-after-statement -Wno-deprecated-declarations -o
> certs/extract-cert certs/extract-cert.c -lcrypto
> 2068: certs/extract-cert "" certs/x509_certificate_list
> 2069: certs/extract-cert "" certs/signing_key.x509
>
> config-5.18-dileks: LLVM-14 + CONFIG_LTO_CLANG_THIN=y
>
> -Sedat-
>
> [1] https://marc.info/?l=linux-keyrings&m=165330697801670&w=2
> [2] https://salsa.debian.org/kernel-team/linux/-/commit/13e234d459c11946efba647c3daf15e03abb0d99
> [3] https://marc.info/?l=linux-keyrings&m=165330697801670&w=2
>
[ CC James Bottomley ]
[PATCH] extract-cert: Force build against OpenSSL API Compat v1.1.x
...works as well.
-Sedat-
> > >
> > > On Thu, May 19, 2022 at 11:55 AM Sedat Dilek <[email protected]> wrote:
> > > >
> > > > Hi,
> > > >
> > > > here, I am on Debian/unstable AMD64.
> > > >
> > > > Recently (or still) there is/was a transition to OpenSSL see below link.
> > > >
> > > > The warnings look like:
> > > >
> > > > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > > > is deprecated [-Wdeprecated-declarations]
> > > > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > > > [-Wdeprecated-declarations]
> > > > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > > > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 395:certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 407:certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 420:certs/extract-cert.c:124:3: warning: 'ENGINE_load_builtin_engines'
> > > > is deprecated [-Wdeprecated-declarations]
> > > > 432:certs/extract-cert.c:126:7: warning: 'ENGINE_by_id' is deprecated
> > > > [-Wdeprecated-declarations]
> > > > 444:certs/extract-cert.c:128:7: warning: 'ENGINE_init' is deprecated
> > > > [-Wdeprecated-declarations]
> > > > 456:certs/extract-cert.c:133:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 468:certs/extract-cert.c:134:3: warning: 'ENGINE_ctrl_cmd' is
> > > > deprecated [-Wdeprecated-declarations]
> > > >
> > > > More detailed output:
> > > >
> > > > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 190- while ((e = ERR_get_error_line(&file, &line))) {
> > > > 191- ^
> > > > 192-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > > > been explicitly marked deprecated here
> > > > 193-OSSL_DEPRECATEDIN_3_0
> > > > 194-^
> > > > 195-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 196-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 197- ^
> > > > 198-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 199-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 200- ^
> > > > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 202- while (ERR_get_error_line(&file, &line)) {}
> > > > 203- ^
> > > > 204-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > > > been explicitly marked deprecated here
> > > > 205-OSSL_DEPRECATEDIN_3_0
> > > > 206-^
> > > > 207-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 208-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 209- ^
> > > > 210-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 211-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 212- ^
> > > > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > > > is deprecated [-Wdeprecated-declarations]
> > > > 214- ENGINE_load_builtin_engines();
> > > > 215- ^
> > > > 216-/usr/include/openssl/engine.h:358:1: note:
> > > > 'ENGINE_load_builtin_engines' has been explicitly marked deprecated
> > > > here
> > > > 217-OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
> > > > 218-^
> > > > 219-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 220-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 221- ^
> > > > 222-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 223-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 224- ^
> > > > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > > > [-Wdeprecated-declarations]
> > > > 226- e = ENGINE_by_id("pkcs11");
> > > > 227- ^
> > > > 228-/usr/include/openssl/engine.h:336:1: note: 'ENGINE_by_id' has been
> > > > explicitly marked deprecated here
> > > > 229-OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
> > > > 230-^
> > > > 231-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 232-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 233- ^
> > > > 234-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 235-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 236- ^
> > > > 237-scripts/sign-file.c: ld.lld -r -o
> > > > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/objtool-in.o
> > > > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86
> > > > /special.o /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/decode.o
> > > > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > > > 239- if (ENGINE_init(e))
> > > > 240- ^
> > > > 241-/usr/include/openssl/engine.h:620:1: note: 'ENGINE_init' has been
> > > > explicitly marked deprecated here
> > > > 242-OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
> > > > 243-^
> > > > 244-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 245-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 246- ^
> > > > 247-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 248-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 249- ^
> > > > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 251- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
> > > > 252- ^
> > > > 253-/usr/include/openssl/engine.h:478:1: note:
> > > > 'ENGINE_ctrl_cmd_string' has been explicitly marked deprecated here
> > > > 254-OSSL_DEPRECATEDIN_3_0
> > > > 255-^
> > > > 256-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 257-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 258- ^
> > > > 259-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 260-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 261- ^
> > > > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > > > deprecated [-Wdeprecated-declarations]
> > > > 263- private_key = ENGINE_load_private_key(e, private_key_name,
> > > > 264- ^
> > > > 265-/usr/include/openssl/engine.h:637:1: note:
> > > > 'ENGINE_load_private_key' has been explicitly marked deprecated here
> > > > 266-OSSL_DEPRECATEDIN_3_0
> > > > 267-^
> > > > 268-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > 269-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > 270- ^
> > > > 271-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > 'OSSL_DEPRECATED'
> > > > 272-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > 273-
> > > >
> > > > Relevant OpenSSL v3.0.3 header files are attached.
> > > > My kernel-config, too.
> > > >
> > > > If you need further information, please let me know.
> > > >
> > > > Regards,
> > > > -Sedat-
> > > >
> > > > [1] https://release.debian.org/transitions/html/auto-openssl.html
On Tue, May 24, 2022 at 9:13 PM Sedat Dilek <[email protected]> wrote:
>
> On Thu, May 19, 2022 at 12:01 PM Sedat Dilek <[email protected]> wrote:
> >
> > [ CC Kees and Salvatore ]
> >
> > The Debian kernel-team ships a fix (4 hours young):
> >
> > commit: 13e234d459c11946efba647c3daf15e03abb0d99
> > "sign-file: Convert API usage to support OpenSSL v3"
> >
> > *untested*
>
> @Kees:
>
> Any updates on the part of certs/extract-cert.c?
>
[ CC Tasmiya Nalatwad ]
There are several more reports on this issue (see [3]).
I did a quick test with Kees' patch from [2] and my attached patch
"extract-cert: Suppress warnings with OpenSSL v3 API".
Now, I see no more warnings due to OpenSSL v3 API:
$ egrep 'sign-file|extract-cert'
../build-log_5.18.0-2-amd64-clang14-lto.txt
176: clang -Wp,-MMD,scripts/.sign-file.d -Wall -Wmissing-prototypes
-Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11
-Wdeclaration-after-statement -o scripts/sign-file
scripts/sign-file.c -lcrypto
2053: clang -Wp,-MMD,certs/.extract-cert.d -Wall -Wmissing-prototypes
-Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11
-Wdeclaration-after-statement -Wno-deprecated-declarations -o
certs/extract-cert certs/extract-cert.c -lcrypto
2068: certs/extract-cert "" certs/x509_certificate_list
2069: certs/extract-cert "" certs/signing_key.x509
config-5.18-dileks: LLVM-14 + CONFIG_LTO_CLANG_THIN=y
-Sedat-
[1] https://marc.info/?l=linux-keyrings&m=165330697801670&w=2
[2] https://salsa.debian.org/kernel-team/linux/-/commit/13e234d459c11946efba647c3daf15e03abb0d99
[3] https://marc.info/?l=linux-keyrings&m=165330697801670&w=2
> >
> > On Thu, May 19, 2022 at 11:55 AM Sedat Dilek <[email protected]> wrote:
> > >
> > > Hi,
> > >
> > > here, I am on Debian/unstable AMD64.
> > >
> > > Recently (or still) there is/was a transition to OpenSSL see below link.
> > >
> > > The warnings look like:
> > >
> > > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > > deprecated [-Wdeprecated-declarations]
> > > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > > deprecated [-Wdeprecated-declarations]
> > > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > > is deprecated [-Wdeprecated-declarations]
> > > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > > [-Wdeprecated-declarations]
> > > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > deprecated [-Wdeprecated-declarations]
> > > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > > deprecated [-Wdeprecated-declarations]
> > > 395:certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is
> > > deprecated [-Wdeprecated-declarations]
> > > 407:certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is
> > > deprecated [-Wdeprecated-declarations]
> > > 420:certs/extract-cert.c:124:3: warning: 'ENGINE_load_builtin_engines'
> > > is deprecated [-Wdeprecated-declarations]
> > > 432:certs/extract-cert.c:126:7: warning: 'ENGINE_by_id' is deprecated
> > > [-Wdeprecated-declarations]
> > > 444:certs/extract-cert.c:128:7: warning: 'ENGINE_init' is deprecated
> > > [-Wdeprecated-declarations]
> > > 456:certs/extract-cert.c:133:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > deprecated [-Wdeprecated-declarations]
> > > 468:certs/extract-cert.c:134:3: warning: 'ENGINE_ctrl_cmd' is
> > > deprecated [-Wdeprecated-declarations]
> > >
> > > More detailed output:
> > >
> > > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > > deprecated [-Wdeprecated-declarations]
> > > 190- while ((e = ERR_get_error_line(&file, &line))) {
> > > 191- ^
> > > 192-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > > been explicitly marked deprecated here
> > > 193-OSSL_DEPRECATEDIN_3_0
> > > 194-^
> > > 195-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 196-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 197- ^
> > > 198-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 199-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 200- ^
> > > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > > deprecated [-Wdeprecated-declarations]
> > > 202- while (ERR_get_error_line(&file, &line)) {}
> > > 203- ^
> > > 204-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > > been explicitly marked deprecated here
> > > 205-OSSL_DEPRECATEDIN_3_0
> > > 206-^
> > > 207-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 208-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 209- ^
> > > 210-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 211-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 212- ^
> > > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > > is deprecated [-Wdeprecated-declarations]
> > > 214- ENGINE_load_builtin_engines();
> > > 215- ^
> > > 216-/usr/include/openssl/engine.h:358:1: note:
> > > 'ENGINE_load_builtin_engines' has been explicitly marked deprecated
> > > here
> > > 217-OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
> > > 218-^
> > > 219-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 220-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 221- ^
> > > 222-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 223-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 224- ^
> > > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > > [-Wdeprecated-declarations]
> > > 226- e = ENGINE_by_id("pkcs11");
> > > 227- ^
> > > 228-/usr/include/openssl/engine.h:336:1: note: 'ENGINE_by_id' has been
> > > explicitly marked deprecated here
> > > 229-OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
> > > 230-^
> > > 231-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 232-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 233- ^
> > > 234-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 235-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 236- ^
> > > 237-scripts/sign-file.c: ld.lld -r -o
> > > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/objtool-in.o
> > > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86
> > > /special.o /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/decode.o
> > > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > > 239- if (ENGINE_init(e))
> > > 240- ^
> > > 241-/usr/include/openssl/engine.h:620:1: note: 'ENGINE_init' has been
> > > explicitly marked deprecated here
> > > 242-OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
> > > 243-^
> > > 244-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 245-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 246- ^
> > > 247-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 248-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 249- ^
> > > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > deprecated [-Wdeprecated-declarations]
> > > 251- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
> > > 252- ^
> > > 253-/usr/include/openssl/engine.h:478:1: note:
> > > 'ENGINE_ctrl_cmd_string' has been explicitly marked deprecated here
> > > 254-OSSL_DEPRECATEDIN_3_0
> > > 255-^
> > > 256-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 257-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 258- ^
> > > 259-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 260-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 261- ^
> > > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > > deprecated [-Wdeprecated-declarations]
> > > 263- private_key = ENGINE_load_private_key(e, private_key_name,
> > > 264- ^
> > > 265-/usr/include/openssl/engine.h:637:1: note:
> > > 'ENGINE_load_private_key' has been explicitly marked deprecated here
> > > 266-OSSL_DEPRECATEDIN_3_0
> > > 267-^
> > > 268-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > 'OSSL_DEPRECATEDIN_3_0'
> > > 269-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > 270- ^
> > > 271-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > 'OSSL_DEPRECATED'
> > > 272-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > 273-
> > >
> > > Relevant OpenSSL v3.0.3 header files are attached.
> > > My kernel-config, too.
> > >
> > > If you need further information, please let me know.
> > >
> > > Regards,
> > > -Sedat-
> > >
> > > [1] https://release.debian.org/transitions/html/auto-openssl.html
On Fri, May 27, 2022 at 6:05 PM Sedat Dilek <[email protected]> wrote:
>
> On Fri, May 27, 2022 at 9:47 AM Sedat Dilek <[email protected]> wrote:
> >
> > On Tue, May 24, 2022 at 9:13 PM Sedat Dilek <[email protected]> wrote:
> > >
> > > On Thu, May 19, 2022 at 12:01 PM Sedat Dilek <[email protected]> wrote:
> > > >
> > > > [ CC Kees and Salvatore ]
> > > >
> > > > The Debian kernel-team ships a fix (4 hours young):
> > > >
> > > > commit: 13e234d459c11946efba647c3daf15e03abb0d99
> > > > "sign-file: Convert API usage to support OpenSSL v3"
> > > >
> > > > *untested*
> > >
> > > @Kees:
> > >
> > > Any updates on the part of certs/extract-cert.c?
> > >
> >
> > [ CC Tasmiya Nalatwad ]
> >
> > There are several more reports on this issue (see [3]).
> >
> > I did a quick test with Kees' patch from [2] and my attached patch
> > "extract-cert: Suppress warnings with OpenSSL v3 API".
> >
> > Now, I see no more warnings due to OpenSSL v3 API:
> >
> > $ egrep 'sign-file|extract-cert'
> > ../build-log_5.18.0-2-amd64-clang14-lto.txt
> > 176: clang -Wp,-MMD,scripts/.sign-file.d -Wall -Wmissing-prototypes
> > -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11
> > -Wdeclaration-after-statement -o scripts/sign-file
> > scripts/sign-file.c -lcrypto
> > 2053: clang -Wp,-MMD,certs/.extract-cert.d -Wall -Wmissing-prototypes
> > -Wstrict-prototypes -O2 -fomit-frame-pointer -std=gnu11
> > -Wdeclaration-after-statement -Wno-deprecated-declarations -o
> > certs/extract-cert certs/extract-cert.c -lcrypto
> > 2068: certs/extract-cert "" certs/x509_certificate_list
> > 2069: certs/extract-cert "" certs/signing_key.x509
> >
> > config-5.18-dileks: LLVM-14 + CONFIG_LTO_CLANG_THIN=y
> >
> > -Sedat-
> >
> > [1] https://marc.info/?l=linux-keyrings&m=165330697801670&w=2
> > [2] https://salsa.debian.org/kernel-team/linux/-/commit/13e234d459c11946efba647c3daf15e03abb0d99
> > [3] https://marc.info/?l=linux-keyrings&m=165330697801670&w=2
> >
>
> [ CC James Bottomley ]
>
> [PATCH] extract-cert: Force build against OpenSSL API Compat v1.1.x
>
> ...works as well.
>
> -Sedat-
>
Why go back and forth... do it like Alexander the Great and the Gordian knot.
Sword - Swash - Done.
commit 6bfb56e93bcef41859c2d5ab234ffd80b691be35
"cert host tools: Stop complaining about deprecated OpenSSL functions"
-Sedat-
[1] https://git.kernel.org/linus/6bfb56e93bcef41859c2d5ab234ffd80b691be35
P.S.: BTW, perf needs also a openssl-v3 fix as well.
$ git show -1 for-5.19/openssl3-perf-dileks-20220605
commit 3cd76edba5753061b88acb22e9adaece0b9cb2b4
(for-5.19/openssl3-perf-dileks-20220605)
Author: Sedat Dilek <[email protected]>
Date: Sun Jun 5 14:23:06 2022 +0200
perf: openssl-v3: Force build against OpenSSL API Compat v1.1.x
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index 73e0762092fe..4da73213f89b 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -140,6 +140,7 @@ FEATURE_CHECK_LDFLAGS-libunwind-x86 += -lunwind
-llzma -lunwind-x86
FEATURE_CHECK_LDFLAGS-libunwind-x86_64 += -lunwind -llzma -lunwind-x86_64
FEATURE_CHECK_LDFLAGS-libcrypto = -lcrypto
+FEATURE_CHECK_LDFLAGS-libcrypto += -DOPENSSL_API_COMPAT=0x10100000L
ifdef CSINCLUDES
LIBOPENCSD_CFLAGS := -I$(CSINCLUDES)
@@ -780,6 +781,7 @@ ifndef NO_LIBCRYPTO
else
CFLAGS += -DHAVE_LIBCRYPTO_SUPPORT
EXTLIBS += -lcrypto
+ EXTLIBS += -DOPENSSL_API_COMPAT=0x10100000L
$(call detected,CONFIG_CRYPTO)
endif
endif
$ git show -1 for-5.19/openssl3-extract_cert-dileks-v3-20220605
commit 730a634c8ea1814c13abfff490c8a5fc48a4e25e
(for-5.19/openssl3-extract_cert-dileks-v3-20220605)
Author: Sedat Dilek <[email protected]>
Date: Mon Jun 6 10:14:57 2022 +0200
extract-cert: openssl-v3: Force build against OpenSSL API Compat v1.1.x
diff --git a/certs/Makefile b/certs/Makefile
index bb904f90f139..c24f31107c6a 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -87,4 +87,5 @@ targets += x509_revocation_list
hostprogs := extract-cert
HOSTCFLAGS_extract-cert.o = $(shell $(HOSTPKG_CONFIG) --cflags
libcrypto 2> /dev/null)
+HOSTCFLAGS_extract-cert.o += -DOPENSSL_API_COMPAT=0x10100000L
HOSTLDLIBS_extract-cert = $(shell $(HOSTPKG_CONFIG) --libs libcrypto
2> /dev/null || echo -lcrypto)
$ git show -1 for-5.19/openssl3-sign_file-kees-20220518
commit 711a9d3ddccb1303a0b3b85166b86159ba8dcfa5
(for-5.19/openssl3-sign_file-kees-20220518)
Author: Kees Cook <[email protected]>
Date: Wed May 18 14:51:29 2022 -0700
sign-file: Convert API usage to support OpenSSL v3
OpenSSL's ENGINE API is deprecated in OpenSSL v3.0, along with some
other functions. Remove the ENGINE use and a macro work-around for
ERR_get_error_line().
Cc: David Howells <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Eric Biggers <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Salvatore Bonaccorso <[email protected]>
Cc: [email protected]
Suggested-by: Adam Langley <[email protected]>
Co-developed-by: Lee Jones <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Kees Cook <[email protected]>
Tested-by: Shuah Khan <[email protected]>
diff --git a/scripts/sign-file.c b/scripts/sign-file.c
index fbd34b8e8f57..2d633c5f57c3 100644
--- a/scripts/sign-file.c
+++ b/scripts/sign-file.c
@@ -52,6 +52,10 @@
#include <openssl/pkcs7.h>
#endif
+#if OPENSSL_VERSION_MAJOR >= 3
+#define ERR_get_error_line(f, l) ERR_get_error_all(f, l, NULL,
NULL, NULL)
+#endif
+
struct module_signature {
uint8_t algo; /* Public-key crypto algorithm [0] */
uint8_t hash; /* Digest algorithm [0] */
@@ -92,16 +96,6 @@ static void display_openssl_errors(int l)
}
}
-static void drain_openssl_errors(void)
-{
- const char *file;
- int line;
-
- if (ERR_peek_error() == 0)
- return;
- while (ERR_get_error_line(&file, &line)) {}
-}
-
#define ERR(cond, fmt, ...) \
do { \
bool __cond = (cond); \
@@ -135,35 +129,14 @@ static int pem_pw_cb(char *buf, int len, int w, void *v)
static EVP_PKEY *read_private_key(const char *private_key_name)
{
EVP_PKEY *private_key;
+ BIO *b;
- if (!strncmp(private_key_name, "pkcs11:", 7)) {
- ENGINE *e;
-
- ENGINE_load_builtin_engines();
- drain_openssl_errors();
- e = ENGINE_by_id("pkcs11");
- ERR(!e, "Load PKCS#11 ENGINE");
- if (ENGINE_init(e))
- drain_openssl_errors();
- else
- ERR(1, "ENGINE_init");
- if (key_pass)
- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
- "Set PKCS#11 PIN");
- private_key = ENGINE_load_private_key(e, private_key_name,
- NULL, NULL);
- ERR(!private_key, "%s", private_key_name);
- } else {
- BIO *b;
-
- b = BIO_new_file(private_key_name, "rb");
- ERR(!b, "%s", private_key_name);
- private_key = PEM_read_bio_PrivateKey(b, NULL, pem_pw_cb,
- NULL);
- ERR(!private_key, "%s", private_key_name);
- BIO_free(b);
- }
-
+ b = BIO_new_file(private_key_name, "rb");
+ ERR(!b, "%s", private_key_name);
+ private_key = PEM_read_bio_PrivateKey(b, NULL, pem_pw_cb,
+ NULL);
+ ERR(!private_key, "%s", private_key_name);
+ BIO_free(b);
return private_key;
}
-EOT-
> > > >
> > > > On Thu, May 19, 2022 at 11:55 AM Sedat Dilek <[email protected]> wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > here, I am on Debian/unstable AMD64.
> > > > >
> > > > > Recently (or still) there is/was a transition to OpenSSL see below link.
> > > > >
> > > > > The warnings look like:
> > > > >
> > > > > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > > > > is deprecated [-Wdeprecated-declarations]
> > > > > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > > > > [-Wdeprecated-declarations]
> > > > > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > > > > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 395:certs/extract-cert.c:46:14: warning: 'ERR_get_error_line' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 407:certs/extract-cert.c:59:9: warning: 'ERR_get_error_line' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 420:certs/extract-cert.c:124:3: warning: 'ENGINE_load_builtin_engines'
> > > > > is deprecated [-Wdeprecated-declarations]
> > > > > 432:certs/extract-cert.c:126:7: warning: 'ENGINE_by_id' is deprecated
> > > > > [-Wdeprecated-declarations]
> > > > > 444:certs/extract-cert.c:128:7: warning: 'ENGINE_init' is deprecated
> > > > > [-Wdeprecated-declarations]
> > > > > 456:certs/extract-cert.c:133:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 468:certs/extract-cert.c:134:3: warning: 'ENGINE_ctrl_cmd' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > >
> > > > > More detailed output:
> > > > >
> > > > > 189:scripts/sign-file.c:89:14: warning: 'ERR_get_error_line' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 190- while ((e = ERR_get_error_line(&file, &line))) {
> > > > > 191- ^
> > > > > 192-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > > > > been explicitly marked deprecated here
> > > > > 193-OSSL_DEPRECATEDIN_3_0
> > > > > 194-^
> > > > > 195-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 196-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 197- ^
> > > > > 198-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 199-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 200- ^
> > > > > 201:scripts/sign-file.c:102:9: warning: 'ERR_get_error_line' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 202- while (ERR_get_error_line(&file, &line)) {}
> > > > > 203- ^
> > > > > 204-/usr/include/openssl/err.h:410:1: note: 'ERR_get_error_line' has
> > > > > been explicitly marked deprecated here
> > > > > 205-OSSL_DEPRECATEDIN_3_0
> > > > > 206-^
> > > > > 207-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 208-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 209- ^
> > > > > 210-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 211-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 212- ^
> > > > > 213:scripts/sign-file.c:142:3: warning: 'ENGINE_load_builtin_engines'
> > > > > is deprecated [-Wdeprecated-declarations]
> > > > > 214- ENGINE_load_builtin_engines();
> > > > > 215- ^
> > > > > 216-/usr/include/openssl/engine.h:358:1: note:
> > > > > 'ENGINE_load_builtin_engines' has been explicitly marked deprecated
> > > > > here
> > > > > 217-OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
> > > > > 218-^
> > > > > 219-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 220-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 221- ^
> > > > > 222-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 223-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 224- ^
> > > > > 225:scripts/sign-file.c:144:7: warning: 'ENGINE_by_id' is deprecated
> > > > > [-Wdeprecated-declarations]
> > > > > 226- e = ENGINE_by_id("pkcs11");
> > > > > 227- ^
> > > > > 228-/usr/include/openssl/engine.h:336:1: note: 'ENGINE_by_id' has been
> > > > > explicitly marked deprecated here
> > > > > 229-OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id);
> > > > > 230-^
> > > > > 231-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 232-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 233- ^
> > > > > 234-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 235-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 236- ^
> > > > > 237-scripts/sign-file.c: ld.lld -r -o
> > > > > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/objtool-in.o
> > > > > /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86
> > > > > /special.o /home/dileks/src/linux-kernel/git/tools/objtool/arch/x86/decode.o
> > > > > 238:146:7: warning: 'ENGINE_init' is deprecated [-Wdeprecated-declarations]
> > > > > 239- if (ENGINE_init(e))
> > > > > 240- ^
> > > > > 241-/usr/include/openssl/engine.h:620:1: note: 'ENGINE_init' has been
> > > > > explicitly marked deprecated here
> > > > > 242-OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
> > > > > 243-^
> > > > > 244-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 245-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 246- ^
> > > > > 247-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 248-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 249- ^
> > > > > 250:scripts/sign-file.c:151:9: warning: 'ENGINE_ctrl_cmd_string' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 251- ERR(!ENGINE_ctrl_cmd_string(e, "PIN", key_pass, 0),
> > > > > 252- ^
> > > > > 253-/usr/include/openssl/engine.h:478:1: note:
> > > > > 'ENGINE_ctrl_cmd_string' has been explicitly marked deprecated here
> > > > > 254-OSSL_DEPRECATEDIN_3_0
> > > > > 255-^
> > > > > 256-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 257-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 258- ^
> > > > > 259-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 260-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 261- ^
> > > > > 262:scripts/sign-file.c:153:17: warning: 'ENGINE_load_private_key' is
> > > > > deprecated [-Wdeprecated-declarations]
> > > > > 263- private_key = ENGINE_load_private_key(e, private_key_name,
> > > > > 264- ^
> > > > > 265-/usr/include/openssl/engine.h:637:1: note:
> > > > > 'ENGINE_load_private_key' has been explicitly marked deprecated here
> > > > > 266-OSSL_DEPRECATEDIN_3_0
> > > > > 267-^
> > > > > 268-/usr/include/openssl/macros.h:182:49: note: expanded from macro
> > > > > 'OSSL_DEPRECATEDIN_3_0'
> > > > > 269-# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
> > > > > 270- ^
> > > > > 271-/usr/include/openssl/macros.h:62:52: note: expanded from macro
> > > > > 'OSSL_DEPRECATED'
> > > > > 272-# define OSSL_DEPRECATED(since) __attribute__((deprecated))
> > > > > 273-
> > > > >
> > > > > Relevant OpenSSL v3.0.3 header files are attached.
> > > > > My kernel-config, too.
> > > > >
> > > > > If you need further information, please let me know.
> > > > >
> > > > > Regards,
> > > > > -Sedat-
> > > > >
> > > > > [1] https://release.debian.org/transitions/html/auto-openssl.html
On Thu, Jun 09, 2022 at 12:25:31PM -0700, Linus Torvalds wrote:
> On Thu, Jun 9, 2022 at 12:23 PM Willy Tarreau <[email protected]> wrote:
> >
> > IIRC you can also disable the deprecation warnings by defining the
> > OPENSSL_SUPPRESS_DEPRECATED macro. It doesn't require to change the
> > compiler's options and allows us to put our head in the sand.
>
> That one had the downside that you have to know what you're doing to
> make such a change ;)
Sure, but when I had to go through it, I found that it was the one
that's used to decide whether another macro would point to either
__attribute__((deprecated)) or to an empty string. It was doing
exactly the required job for that. My plan was to use it only for
default builds but let developers remove it to see new warnings.
Finally we did better and disabled engines completely!
> I just wanted to be able to start doing pulls again after mistakenly
> thinking that an upgrade would be pain-free.
:-)
Willy
On Thu, Jun 9, 2022 at 9:05 PM Linus Torvalds
<[email protected]> wrote:
>
> On Thu, Jun 9, 2022 at 11:41 AM Sedat Dilek <[email protected]> wrote:
> >
> > Why go back and forth... do it like Alexander the Great and the Gordian knot.
> >
> > Sword - Swash - Done.
> >
> > commit 6bfb56e93bcef41859c2d5ab234ffd80b691be35
> > "cert host tools: Stop complaining about deprecated OpenSSL functions"
>
> Well, it's not like that is the *right* fix.
>
> But I think for now, the answer is "leave it like that until we can
> just get rid of the ENGINE API entirely".
>
> I absolutely detest the "deprecation" warnings. We used to do that in
> the kernel too, and it was a complete disaster. The warnings are very
> noisy, and nobody ever cares about them, so it's simply not worth it.
>
> So we deprecated "__deprecated" in the kernel itself:
>
> 771c035372a0 deprecate the '__deprecated' attribute warnings
> entirely and for good
>
> and I don't think we should care about it when it comes to OpenSSL either.
>
> Eventually, that deprecated interface will go away entirely, and by
> then we hopefully don't care about really old openssl implementations
> and will have gotten rid of the uses.
>
> But for now, I think putting our head in the sand is actually the
> _better_ model rather than fighting some battle over old vs new
> libraries.
>
> Because sometimes, if you ignore a problem, it really does just go away.
>
To be honest: I like your approach, Linus.
Very pragma-tic.
That's why you use pragma's in your patch :-).
I invested too much of my lifetime in making things work "correctly".
And yes, it's post-rc1...
Most of the apps in the Debian world passed the OpenSSL-v3 transition.
-Sedat-
[0] https://www.youtube.com/watch?v=mVvr6PKUoEs
[1] https://release.debian.org/transitions/html/auto-openssl.html
On Thu, Jun 9, 2022 at 12:32 PM Willy Tarreau <[email protected]> wrote:
>
> Finally we did better and disabled engines completely!
Some day that fix will make it to me, and I can remove that ugly pragma.
Linus
On Thu, Jun 9, 2022 at 12:23 PM Willy Tarreau <[email protected]> wrote:
>
> IIRC you can also disable the deprecation warnings by defining the
> OPENSSL_SUPPRESS_DEPRECATED macro. It doesn't require to change the
> compiler's options and allows us to put our head in the sand.
That one had the downside that you have to know what you're doing to
make such a change ;)
I just wanted to be able to start doing pulls again after mistakenly
thinking that an upgrade would be pain-free.
Linus
On Thu, Jun 9, 2022 at 11:41 AM Sedat Dilek <[email protected]> wrote:
>
> Why go back and forth... do it like Alexander the Great and the Gordian knot.
>
> Sword - Swash - Done.
>
> commit 6bfb56e93bcef41859c2d5ab234ffd80b691be35
> "cert host tools: Stop complaining about deprecated OpenSSL functions"
Well, it's not like that is the *right* fix.
But I think for now, the answer is "leave it like that until we can
just get rid of the ENGINE API entirely".
I absolutely detest the "deprecation" warnings. We used to do that in
the kernel too, and it was a complete disaster. The warnings are very
noisy, and nobody ever cares about them, so it's simply not worth it.
So we deprecated "__deprecated" in the kernel itself:
771c035372a0 deprecate the '__deprecated' attribute warnings
entirely and for good
and I don't think we should care about it when it comes to OpenSSL either.
Eventually, that deprecated interface will go away entirely, and by
then we hopefully don't care about really old openssl implementations
and will have gotten rid of the uses.
But for now, I think putting our head in the sand is actually the
_better_ model rather than fighting some battle over old vs new
libraries.
Because sometimes, if you ignore a problem, it really does just go away.
Linus
On Thu, Jun 09, 2022 at 09:19:20PM +0200, Sedat Dilek wrote:
> On Thu, Jun 9, 2022 at 9:05 PM Linus Torvalds
> <[email protected]> wrote:
> >
> > On Thu, Jun 9, 2022 at 11:41 AM Sedat Dilek <[email protected]> wrote:
> > >
> > > Why go back and forth... do it like Alexander the Great and the Gordian knot.
> > >
> > > Sword - Swash - Done.
> > >
> > > commit 6bfb56e93bcef41859c2d5ab234ffd80b691be35
> > > "cert host tools: Stop complaining about deprecated OpenSSL functions"
> >
> > Well, it's not like that is the *right* fix.
> >
> > But I think for now, the answer is "leave it like that until we can
> > just get rid of the ENGINE API entirely".
> >
> > I absolutely detest the "deprecation" warnings. We used to do that in
> > the kernel too, and it was a complete disaster. The warnings are very
> > noisy, and nobody ever cares about them, so it's simply not worth it.
> >
> > So we deprecated "__deprecated" in the kernel itself:
> >
> > 771c035372a0 deprecate the '__deprecated' attribute warnings
> > entirely and for good
> >
> > and I don't think we should care about it when it comes to OpenSSL either.
> >
> > Eventually, that deprecated interface will go away entirely, and by
> > then we hopefully don't care about really old openssl implementations
> > and will have gotten rid of the uses.
> >
> > But for now, I think putting our head in the sand is actually the
> > _better_ model rather than fighting some battle over old vs new
> > libraries.
> >
> > Because sometimes, if you ignore a problem, it really does just go away.
> >
>
> To be honest: I like your approach, Linus.
> Very pragma-tic.
> That's why you use pragma's in your patch :-).
>
> I invested too much of my lifetime in making things work "correctly".
> And yes, it's post-rc1...
>
> Most of the apps in the Debian world passed the OpenSSL-v3 transition.
IIRC you can also disable the deprecation warnings by defining the
OPENSSL_SUPPRESS_DEPRECATED macro. It doesn't require to change the
compiler's options and allows us to put our head in the sand.
Willy
On Thu, Jun 9, 2022 at 9:25 PM Linus Torvalds
<[email protected]> wrote:
>
> On Thu, Jun 9, 2022 at 12:23 PM Willy Tarreau <[email protected]> wrote:
> >
> > IIRC you can also disable the deprecation warnings by defining the
> > OPENSSL_SUPPRESS_DEPRECATED macro. It doesn't require to change the
> > compiler's options and allows us to put our head in the sand.
>
> That one had the downside that you have to know what you're doing to
> make such a change ;)
>
> I just wanted to be able to start doing pulls again after mistakenly
> thinking that an upgrade would be pain-free.
>
My first approach in making this work....
From 3b019a241a72742c7f239965ed92385e9ffd9ed3 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <[email protected]>
Date: Fri, 27 May 2022 09:25:45 +0200
Subject: [PATCH] extract-cert: Suppress warnings with OpenSSL v3 API
Signed-off-by: Sedat Dilek <[email protected]>
---
certs/Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/certs/Makefile b/certs/Makefile
index d8443cfb1c40..52f71f0925e2 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -75,4 +75,5 @@ targets += x509_revocation_list
hostprogs := extract-cert
HOSTCFLAGS_extract-cert.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
+HOSTCFLAGS_extract-cert.o += -Wno-deprecated-declarations
HOSTLDLIBS_extract-cert = $(shell pkg-config --libs libcrypto 2>
/dev/null || echo -lcrypto)
--
2.36.1
...before looking through the Wild Wild Web for fixes.
-Sedat-
On Thu, Jun 9, 2022 at 9:34 PM Linus Torvalds
<[email protected]> wrote:
>
> On Thu, Jun 9, 2022 at 12:32 PM Willy Tarreau <[email protected]> wrote:
> >
> > Finally we did better and disabled engines completely!
>
> Some day that fix will make it to me, and I can remove that ugly pragma.
>
For the part scripts/sign-file.c - you looked at...?
https://lore.kernel.org/lkml/[email protected]/
-Sedat-
Hi,
On 2022-06-09 21:31:44 +0200, Sedat Dilek wrote:
> On Thu, Jun 9, 2022 at 9:25 PM Linus Torvalds
> <[email protected]> wrote:
> >
> > On Thu, Jun 9, 2022 at 12:23 PM Willy Tarreau <[email protected]> wrote:
> > >
> > > IIRC you can also disable the deprecation warnings by defining the
> > > OPENSSL_SUPPRESS_DEPRECATED macro. It doesn't require to change the
> > > compiler's options and allows us to put our head in the sand.
> >
> > That one had the downside that you have to know what you're doing to
> > make such a change ;)
> >
> > I just wanted to be able to start doing pulls again after mistakenly
> > thinking that an upgrade would be pain-free.
> >
>
> My first approach in making this work....
>
> From 3b019a241a72742c7f239965ed92385e9ffd9ed3 Mon Sep 17 00:00:00 2001
> From: Sedat Dilek <[email protected]>
> Date: Fri, 27 May 2022 09:25:45 +0200
> Subject: [PATCH] extract-cert: Suppress warnings with OpenSSL v3 API
>
> Signed-off-by: Sedat Dilek <[email protected]>
> ---
> certs/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/certs/Makefile b/certs/Makefile
> index d8443cfb1c40..52f71f0925e2 100644
> --- a/certs/Makefile
> +++ b/certs/Makefile
> @@ -75,4 +75,5 @@ targets += x509_revocation_list
> hostprogs := extract-cert
>
> HOSTCFLAGS_extract-cert.o = $(shell pkg-config --cflags libcrypto 2> /dev/null)
> +HOSTCFLAGS_extract-cert.o += -Wno-deprecated-declarations
> HOSTLDLIBS_extract-cert = $(shell pkg-config --libs libcrypto 2>
> /dev/null || echo -lcrypto)
> --
FWIW, these deprecation warnings also cause perf to fail to detect libcrypto:
test-libcrypto.c: In function ‘main’:
test-libcrypto.c:11:9: error: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
11 | MD5_Init(&context);
| ^~~~~~~~
In file included from test-libcrypto.c:3:
...
cc1: all warnings being treated as errors
Perhaps it's worth applying this fix a bit more broadly?
Greetings,
Andres Freund
> FWIW, these deprecation warnings also cause perf to fail to detect libcrypto:
>
> test-libcrypto.c: In function ‘main’:
> test-libcrypto.c:11:9: error: ‘MD5_Init’ is deprecated: Since OpenSSL 3.0 [-Werror=deprecated-declarations]
> 11 | MD5_Init(&context);
> | ^~~~~~~~
> In file included from test-libcrypto.c:3:
> ...
> cc1: all warnings being treated as errors
>
>
> Perhaps it's worth applying this fix a bit more broadly?
>
Just FYI:
"perf build: Suppress openssl v3 deprecation warnings in libcrypto feature test"
Included in git-pull request (pending) in [2].
-Sedat-
[1] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/commit/?h=perf-tools-for-v6.0-2022-08-04&id=10fef869a58e37ec649b61eddab545f2da57a79b
[2] https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tag/?h=perf-tools-for-v6.0-2022-08-04