]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
_gnutls_x509_check_pubkey_params: removed unnecessary parameter
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 3 Aug 2017 14:16:49 +0000 (16:16 +0200)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Fri, 4 Aug 2017 09:08:51 +0000 (11:08 +0200)
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
lib/x509/key_decode.c
lib/x509/mpi.c
lib/x509/x509_int.h

index 63256cb8c8761bd88842f57dcd90c8a87abf9b8d..4dab121fcf8a7a7be0fb89abb33cb9d2d105fab6 100644 (file)
@@ -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;
index a960ca73633e3eb6b11f6bfe460b21bf47d1635a..8b5558214f4ab79b27593e3367a3881c6e60c42d 100644 (file)
@@ -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;
index 9555f65c0323fefb6a8fc6a27b411182b30e53cc..40c635dc4e4e8b4e60b223c2b0b635d24c60896b 100644 (file)
@@ -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);