2

I am creating server code using bare Erlang ssl:listen/2 function. I would like to use TLS certificate using ED25519 algorithm but the server is crashing upon handshake. By digging in the Erlang code it seems that this algorithm is not supported for TLS (it is crashing on this function: https://github.com/erlang/otp/blob/master/lib/public_key/src/pubkey_cert_records.erl#L109 ).

Is that correct or am I doing something wrong? Is there a way to enable the support for it? Some workaround?

For the reference this is how I generated my certificate:

openssl genpkey -algorithm ED25519 -out key.pem
openssl req -new -x509 -days 1825 -key key.pem -out cert.pem

And this is the crash data I am getting:

{
  :function_clause,
  [
    {:pubkey_cert_records, :supportedPublicKeyAlgorithms, [{1, 3, 101, 112}], [file: 'pubkey_cert_records.erl', line: 109]}, 
    {:pubkey_cert_records, :decode_supportedPublicKey, 1, [file: 'pubkey_cert_records.erl', line: 228]}, 
    {:pubkey_cert_records, :decode_tbs, 1, [file: 'pubkey_cert_records.erl', line: 325]}, 
    {:pubkey_cert_records, :decode_cert, 1, [file: 'pubkey_cert_records.erl', line: 42]}, 
    {:public_key, :pkix_decode_cert, 2, [file: 'public_key.erl', line: 380]}, 
    {:ssl_handshake, :get_cert_params, 1, [file: 'ssl_handshake.erl', line: 1613]}, 
    {:tls_handshake_1_3, :get_certificate_params, 1, [file: 'tls_handshake_1_3.erl', line: 2245]}, 
    {:tls_handshake_1_3, :do_start, 2, [file: 'tls_handshake_1_3.erl', line: 638]}
  ]
}

And also my code works perfectly fine with RSA certificate.

Thanks for any help

Sgiath
  • 360
  • 2
  • 8

1 Answers1

1

Seems like it is really not supported for OTP 23 and below.

It is planned to be included in OTP 24.0 release. See GitHub issue https://github.com/erlang/otp/issues/4637

Sgiath
  • 360
  • 2
  • 8