summaryrefslogtreecommitdiff
path: root/lib/x509/key_decode.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-07-25 10:16:40 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-03 11:57:52 +0200
commit99d5d8ae0eda8bbcfe118b1df987aea8ef142cf4 (patch)
treea7ebf84c99925e33dc3eb6c9fa238e9ef6769f2d /lib/x509/key_decode.c
parent67fac0f4ccb43c983c110060639de95168ca04a1 (diff)
downloadgnutls-99d5d8ae0eda8bbcfe118b1df987aea8ef142cf4.tar.gz
gnutls_pk_params_st: renamed sign field to spki
The name "sign" was ambiguous with regard to its intented use, as it could refer to digital signature parameters which was not exactly the case. That field contains parameters present in the subject public key info (SPKI), which could be used in a digital signature, but not necessarily. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/x509/key_decode.c')
-rw-r--r--lib/x509/key_decode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/x509/key_decode.c b/lib/x509/key_decode.c
index 7e9d05a887..6c90c648f9 100644
--- a/lib/x509/key_decode.c
+++ b/lib/x509/key_decode.c
@@ -433,7 +433,7 @@ int _gnutls_x509_read_pubkey_params(gnutls_pk_algorithm_t algo,
case GNUTLS_PK_EDDSA_ED25519:
return 0;
case GNUTLS_PK_RSA_PSS:
- return _gnutls_x509_read_rsa_pss_params(der, dersize, &params->sign);
+ return _gnutls_x509_read_rsa_pss_params(der, dersize, &params->spki);
case GNUTLS_PK_DSA:
return _gnutls_x509_read_dsa_params(der, dersize, params);
case GNUTLS_PK_EC:
@@ -451,14 +451,14 @@ int _gnutls_x509_check_pubkey_params(gnutls_pk_algorithm_t algo,
switch (algo) {
case GNUTLS_PK_RSA_PSS: {
unsigned bits = pubkey_to_bits(algo, params);
- const mac_entry_st *me = hash_to_entry(params->sign.rsa_pss_dig);
+ const mac_entry_st *me = hash_to_entry(params->spki.rsa_pss_dig);
size_t hash_size;
if (unlikely(me == NULL))
return gnutls_assert_val(GNUTLS_E_CERTIFICATE_ERROR);
hash_size = _gnutls_hash_get_algo_len(me);
- if (hash_size + params->sign.salt_size + 2 > (bits + 7) / 8)
+ if (hash_size + params->spki.salt_size + 2 > (bits + 7) / 8)
return gnutls_assert_val(GNUTLS_E_CERTIFICATE_ERROR);
return 0;
}