diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-07-25 10:16:40 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-08-03 11:57:52 +0200 |
commit | 99d5d8ae0eda8bbcfe118b1df987aea8ef142cf4 (patch) | |
tree | a7ebf84c99925e33dc3eb6c9fa238e9ef6769f2d /lib/x509/privkey.c | |
parent | 67fac0f4ccb43c983c110060639de95168ca04a1 (diff) | |
download | gnutls-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/privkey.c')
-rw-r--r-- | lib/x509/privkey.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c index 23bc50a152..9c62b551eb 100644 --- a/lib/x509/privkey.c +++ b/lib/x509/privkey.c @@ -1259,7 +1259,7 @@ gnutls_x509_privkey_get_pk_algorithm3(gnutls_x509_privkey_t key, } if (spki) { - memcpy(spki, &key->params.sign, sizeof (gnutls_x509_spki_st)); + memcpy(spki, &key->params.spki, sizeof (gnutls_x509_spki_st)); } if (bits) { @@ -1627,13 +1627,13 @@ gnutls_x509_privkey_generate2(gnutls_x509_privkey_t key, if (algo == GNUTLS_PK_RSA_PSS) { const mac_entry_st *me; - key->params.sign.pk = GNUTLS_PK_RSA_PSS; + key->params.spki.pk = GNUTLS_PK_RSA_PSS; if (key->params.palgo != GNUTLS_DIG_UNKNOWN) - key->params.sign.rsa_pss_dig = key->params.palgo; + key->params.spki.rsa_pss_dig = key->params.palgo; else - key->params.sign.rsa_pss_dig = GNUTLS_DIG_SHA256; + key->params.spki.rsa_pss_dig = GNUTLS_DIG_SHA256; - me = hash_to_entry(key->params.sign.rsa_pss_dig); + me = hash_to_entry(key->params.spki.rsa_pss_dig); if (unlikely(me == NULL)) { gnutls_assert(); ret = GNUTLS_E_INVALID_REQUEST; @@ -1641,9 +1641,9 @@ gnutls_x509_privkey_generate2(gnutls_x509_privkey_t key, } if (flags & GNUTLS_PRIVKEY_FLAG_REPRODUCIBLE) - key->params.sign.salt_size = 0; + key->params.spki.salt_size = 0; else { - key->params.sign.salt_size = + key->params.spki.salt_size = _gnutls_find_rsa_pss_salt_size(bits, me, 0); } } @@ -2006,7 +2006,7 @@ gnutls_x509_privkey_sign_hash(gnutls_x509_privkey_t key, result = _gnutls_pk_sign(key->pk_algorithm, signature, hash, - &key->params, &key->params.sign); + &key->params, &key->params.spki); if (result < 0) { gnutls_assert(); @@ -2160,7 +2160,7 @@ int _gnutls_x509_privkey_get_spki_params(gnutls_x509_privkey_t key, gnutls_x509_spki_st *params) { - memcpy(params, &key->params.sign, sizeof(gnutls_x509_spki_st)); + memcpy(params, &key->params.spki, sizeof(gnutls_x509_spki_st)); params->pk = key->pk_algorithm; return 0; } |