Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
2622-crypto-Ensble-using-curve-names-that-are-u...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2622-crypto-Ensble-using-curve-names-that-are-unknown-to-.patch of Package erlang
From 6c588a8aa33967fa89b0e9265b83a7635fdc61b5 Mon Sep 17 00:00:00 2001 From: Hans Nilsson <hans@erlang.org> Date: Fri, 17 Jun 2022 09:19:44 +0200 Subject: [PATCH 2/2] crypto: Ensble using curve names that are unknown to crypto --- lib/crypto/src/crypto.erl | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl index e4b68da8a6..7bfceba6d8 100644 --- a/lib/crypto/src/crypto.erl +++ b/lib/crypto/src/crypto.erl @@ -2323,12 +2323,20 @@ nif_curve_params({PrimeField, Curve, BasePoint, Order, CoFactor}) -> }, undefined %% The curve name }; -nif_curve_params(Curve) when is_atom(Curve) -> - %% named curve - case Curve of - x448 -> {evp,Curve}; - x25519 -> {evp,Curve}; - _ -> {crypto_ec_curves:curve(Curve), Curve} +nif_curve_params(CurveName) when is_atom(CurveName) -> + %% A named curve + case CurveName of + x448 -> {evp,CurveName}; + x25519 -> {evp,CurveName}; + _ -> + Spec = + try + crypto_ec_curves:curve(CurveName) + catch + _:_ -> + undefined + end, + {Spec, CurveName} end. -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor