Skip to content

Broken on OTP 28 #13

@ziopio

Description

@ziopio

'OTP-PUB-KEY' is not available on OTP 28

{undef,[{'OTP-PUB-KEY',encode,

This undocumented function has been removed in OTP 28, we cannot do this anymore:

%% There's no way to DER encode standard types using
%% standard modules, hence use undocumented 'OTP-PUB-KEY'
%% and some hackery

These helpers all require that old function:

%% There's no way to DER encode standard types using

Consequence

The certificate cannot be read from the secure element.

Full crash on grisp2 OTP 28

Erlang/OTP 28 [erts-16.1.1] [source] [32-bit] [smp:1:1] [ds:1:1:10] [async-threads:1]

2025-11-14T14:49:25.001324+00:00 warning: Exception while calling function read_cert [4]: error:undef
2025-11-14T14:49:25.409758+00:00 warning: Exception while calling function read_cert [3]: error:undef
2025-11-14T14:49:25.816801+00:00 warning: Exception while calling function read_cert [2]: error:undef
2025-11-14T14:49:26.226723+00:00 warning: Exception while calling function read_cert [1]: error:undef
2025-11-14T14:49:26.633510+00:00 error: crasher: initial call: grisp_connect_cluster:init/1, pid: <0.1303.0>, registered_name: [], error: {undef,[{'OTP-PUB-KEY',encode,['CertPolicyId',{1,3,6,1,4,1,4849,1}],[]},{grisp_cryptoauth_cert,der_encode_ObjectIdentifier,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,290}]},{grisp_cryptoauth_cert,encode_grisp_meta,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,122}]},{grisp_cryptoauth_cert,build_grisp_ext,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,114}]},{grisp_cryptoauth_profile,tls_client,5,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_profile.erl"},{line,26}]},{grisp_cryptoauth,read_cert,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth.erl"},{line,205}]},{grisp_cryptoauth_api_server,retry,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,38}]},{grisp_cryptoauth_api_server,handle_call,3,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,32}]}]}, ancestors: [grisp_connect_sup,<0.1300.0>], message_queue_len: 0, messages: [], links: [<0.1301.0>], dictionary: [], trap_exit: false, status: running, heap_size: 3
2025-11-14T14:49:26.647347+00:00 error: Supervisor: {local,grisp_connect_sup}. Context: start_error. Reason: {undef,[{'OTP-PUB-KEY',encode,['CertPolicyId',{1,3,6,1,4,1,4849,1}],[]},{grisp_cryptoauth_cert,der_encode_ObjectIdentifier,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,290}]},{grisp_cryptoauth_cert,encode_grisp_meta,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,122}]},{grisp_cryptoauth_cert,build_grisp_ext,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,114}]},{grisp_cryptoauth_profile,tls_client,5,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_profile.erl"},{line,26}]},{grisp_cryptoauth,read_cert,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth.erl"},{line,205}]},{grisp_cryptoauth_api_server,retry,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,38}]},{grisp_cryptoauth_api_server,handle_call,3,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,32}]}]}. Offender: id=grisp_connect_cluster,pid=undefined.
2025-11-14T14:49:26.659940+00:00 notice: Application: grisp_connect. Exited: {{shutdown,{failed_to_start_child,grisp_connect_cluster,{undef,[{'OTP-PUB-KEY',encode,['CertPolicyId',{1,3,6,1,4,1,4849,1}],[]},{grisp_cryptoauth_cert,der_encode_ObjectIdentifier,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,290}]},{grisp_cryptoauth_cert,encode_grisp_meta,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,122}]},{grisp_cryptoauth_cert,build_grisp_ext,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,114}]},{grisp_cryptoauth_profile,tls_client,5,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_profile.erl"},{line,26}]},{grisp_cryptoauth,read_cert,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth.erl"},{line,205}]},{grisp_cryptoauth_api_server,retry,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,38}]},{grisp_cryptoauth_api_server,handle_call,3,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,32}]}]}}},{grisp_connect_app,start,[normal,[]]}}. Type: permanent.
2025-11-14T14:49:26.664241+00:00 error: crasher: initial call: application_master:init/3, pid: <0.1299.0>, registered_name: [], exit: {{{shutdown,{failed_to_start_child,grisp_connect_cluster,{undef,[{'OTP-PUB-KEY',encode,['CertPolicyId',{1,3,6,1,4,1,4849,1}],[]},{grisp_cryptoauth_cert,der_encode_ObjectIdentifier,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,290}]},{grisp_cryptoauth_cert,encode_grisp_meta,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,122}]},{grisp_cryptoauth_cert,build_grisp_ext,1,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl"},{line,114}]},{grisp_cryptoauth_profile,tls_client,5,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_profile.erl"},{line,26}]},{grisp_cryptoauth,read_cert,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth.erl"},{line,205}]},{grisp_cryptoauth_api_server,retry,4,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,38}]},{grisp_cryptoauth_api_server,handle_call,3,[{file,"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_api_server.erl"},{line,32}]}]}}},{grisp_connect_app,start,[normal,[]]}},[{application_master,init,3,[{file,"application_master.erl"},{line,147}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,333}]}]}, ancestors: [application_controller,<0.10.0>], message_queue_len: 1, messages: [{'EXIT',<0.1300.0>,normal}], links: [<0.1155.0>], dictionary: [], trap_exit: true, status: running, heap_size: 2586, stack_size: 29, reductions: 248; neighbours:
Kernel pid terminated (application_controller) ("{application_start_failure,grisp_connect,{{shutdown,{failed_to_start_child,grisp_connect_cluster,{undef,[{'OTP-PUB-KEY',encode,['CertPolicyId',{1,3,6,1,4,1,4849,1}],[]},{grisp_cryptoauth_cert,der_encode_ObjectIdentifier,1,[{file,\"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl\"},{line,290}]},{grisp_cryptoauth_cert,encode_grisp_meta,1,[{file,\"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl\"},{line,122}]},{grisp_cryptoauth_cert,build_grisp_ext,1,[{file,\"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_cert.erl\"},{line,114}]},{grisp_cryptoauth_profile,tls_client,5,[{file,\"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoauth_profile.erl\"},{line,26}]},{grisp_cryptoauth,read_cert,4,[{file,\"/Users/lucasucci/Desktop/grisp/grisp_demo/_checkouts/grisp_cryptoauth/src/grisp_cryptoau

Crash dump is being written to: erl_crash.dump...

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions