mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-06-29 01:03:38 +08:00
Clean TLS code
This commit is contained in:
@@ -364,6 +364,24 @@ int tls_named_curve_from_name(const char *name)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int tls_named_curve_oid(int named_curve)
|
||||
{
|
||||
switch (named_curve) {
|
||||
case TLS_curve_secp256r1: return OID_secp256r1;
|
||||
case TLS_curve_sm2p256v1: return OID_sm2;
|
||||
}
|
||||
return OID_undef;
|
||||
}
|
||||
|
||||
int tls_named_curve_from_oid(int oid)
|
||||
{
|
||||
switch (oid) {
|
||||
case OID_secp256r1: return TLS_curve_secp256r1;
|
||||
case OID_sm2: return TLS_curve_sm2p256v1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
const char *tls_signature_scheme_name(int scheme)
|
||||
{
|
||||
switch (scheme) {
|
||||
|
||||
Reference in New Issue
Block a user