summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-03 16:16:49 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-08-04 11:08:51 +0200
commit41a7ed7097994a5d89eccbef7c0c0bb912ebd388 (patch)
tree4716020660e43dfce7924ef4cd12a04201aef42f
parent2fa181ce2aa3c2f89c0eb95cef0e66ff8658831f (diff)
downloadgnutls-41a7ed7097994a5d89eccbef7c0c0bb912ebd388.tar.gz
_gnutls_x509_check_pubkey_params: removed unnecessary parameter
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
-rw-r--r--lib/x509/key_decode.c5
-rw-r--r--lib/x509/mpi.c2
-rw-r--r--lib/x509/x509_int.h3
3 files changed, 4 insertions, 6 deletions
diff --git a/lib/x509/key_decode.c b/lib/x509/key_decode.c
index 63256cb8c8..4dab121fcf 100644
--- a/lib/x509/key_decode.c
+++ b/lib/x509/key_decode.c
@@ -453,10 +453,9 @@ int _gnutls_x509_read_pubkey_params(gnutls_pk_algorithm_t algo,
/* This function must be called after _gnutls_x509_read_pubkey()
*/
-int _gnutls_x509_check_pubkey_params(gnutls_pk_algorithm_t algo,
- gnutls_pk_params_st * params)
+int _gnutls_x509_check_pubkey_params(gnutls_pk_params_st * params)
{
- switch (algo) {
+ switch (params->algo) {
case GNUTLS_PK_RSA_PSS: {
unsigned bits;
const mac_entry_st *me;
diff --git a/lib/x509/mpi.c b/lib/x509/mpi.c
index a960ca7363..8b5558214f 100644
--- a/lib/x509/mpi.c
+++ b/lib/x509/mpi.c
@@ -179,7 +179,7 @@ _gnutls_get_asn_mpis(ASN1_TYPE asn, const char *root,
goto error;
}
- result = _gnutls_x509_check_pubkey_params(pk_algorithm, params);
+ result = _gnutls_x509_check_pubkey_params(params);
if (result < 0) {
gnutls_assert();
goto error;
diff --git a/lib/x509/x509_int.h b/lib/x509/x509_int.h
index 9555f65c03..40c635dc4e 100644
--- a/lib/x509/x509_int.h
+++ b/lib/x509/x509_int.h
@@ -329,8 +329,7 @@ int _gnutls_x509_crt_get_mpis(gnutls_x509_crt_t cert,
int _gnutls_x509_read_pubkey_params(gnutls_pk_algorithm_t, uint8_t * der,
int dersize,
gnutls_pk_params_st * params);
-int _gnutls_x509_check_pubkey_params(gnutls_pk_algorithm_t algo,
- gnutls_pk_params_st * params);
+int _gnutls_x509_check_pubkey_params(gnutls_pk_params_st * params);
int _gnutls_x509_read_pubkey(gnutls_pk_algorithm_t, uint8_t * der,
int dersize, gnutls_pk_params_st * params);