diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2018-07-09 14:22:34 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-07-10 12:45:36 +0200 |
commit | 2473836074c4803030aecc609233c915e954a179 (patch) | |
tree | 75f78c4ee10142fbbdbc0c8d1bff88e49ae278ac /lib/x509/key_encode.c | |
parent | 025abe3d3693ebdbd55d8a0c8953eaebe8c4b87e (diff) | |
download | gnutls-2473836074c4803030aecc609233c915e954a179.tar.gz |
lib/x509: use new function to deduce default GOST paramset
Use new _gnutls_gost_paramset_default() function to deduce default GOST
paramset, instead of hardcoding if/else in several places.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Diffstat (limited to 'lib/x509/key_encode.c')
-rw-r--r-- | lib/x509/key_encode.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/x509/key_encode.c b/lib/x509/key_encode.c index 6cd42f2c0f..bbcbab2e16 100644 --- a/lib/x509/key_encode.c +++ b/lib/x509/key_encode.c @@ -581,13 +581,8 @@ _gnutls_x509_write_gost_params(gnutls_pk_params_st * params, goto cleanup; } - if (params->algo == GNUTLS_PK_GOST_01) { - if (params->gost_params == GNUTLS_GOST_PARAMSET_CP_A) - oid = NULL; - } else { - if (params->gost_params == GNUTLS_GOST_PARAMSET_TC26_Z) - oid = NULL; - } + if (params->gost_params == _gnutls_gost_paramset_default(params->algo)) + oid = NULL; if ((result = asn1_write_value(spk, "encryptionParamSet", oid, |