]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
gnutls_x509_crt_get_sig_algorithm was renamed to gnutls_x509_crt_get_verify_algorithm.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 17 Apr 2009 12:23:58 +0000 (15:23 +0300)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 17 Apr 2009 12:23:58 +0000 (15:23 +0300)
Corrected some issues with the code.

NEWS
lib/includes/gnutls/x509.h
lib/x509/verify.c
lib/x509/x509.c

diff --git a/NEWS b/NEWS
index 68adae1b4193e4ca4258c876793f787f769fa9bd..7d451befe4984abcca21d2e9f0e5381af739e244 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@ See the end for copying conditions.
 * Version 2.7.7 (unreleased)
 
 ** libgnutls: Applied patch by Cedric Bail to add functions
-gnutls_x509_crt_verify_hash() and gnutls_x509_crt_get_sig_algorithm().
+gnutls_x509_crt_verify_hash() and gnutls_x509_crt_get_verify_algorithm().
 
 ** gnutls.pc: Add -ltasn1 to 'pkg-config --libs --static gnutls' output.
 Reported by Andreas Metzler <ametzler@downhill.at.eu.org> in
@@ -25,7 +25,7 @@ domain 'gnutls' for translations of the command line tools.
 
 ** API and ABI modifications:
 gnutls_x509_crt_verify_hash: ADDED
-gnutls_x509_crt_get_sig_algorithm: ADDED
+gnutls_x509_crt_get_verify_algorithm: ADDED
 
 * Version 2.7.6 (released 2009-02-27)
 
index 46038474dffe1882b5f8f04bcd00f97b22df53e1..f6515e85601959ece5bb098a89df860f8de44bf3 100644 (file)
@@ -646,7 +646,7 @@ extern "C"
                                   const gnutls_datum_t * hash,
                                   const gnutls_datum_t * signature);
 
-  int gnutls_x509_crt_get_sig_algorithm(gnutls_digest_algorithm_t *hash,
+  int gnutls_x509_crt_get_verify_algorithm(gnutls_digest_algorithm_t *hash,
                                         const gnutls_x509_crt_t crt,
                                         const gnutls_datum_t * signature);
 
index 3a1b1f00c4e459e54fd713f0b6d853c61286164f..035409d123f3ad36bf1dd385b370294c82dd4357 100644 (file)
@@ -664,7 +664,7 @@ _pkcs1_rsa_verify_sig (const gnutls_datum_t * text,
        _gnutls_hash (&hd, text->data, text->size);
        _gnutls_hash_deinit (&hd, md);
 
-       cmp = &md;
+       cmp = md;
     }
 
   if (memcmp (cmp, digest, digest_size) != 0)
index 1c6206af61600c709e381720cc33fce49566ba62..067dab13be6f06cbe5e0b1b154dafec1ad736913 100644 (file)
@@ -2305,7 +2305,7 @@ gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert,
 }
 
 /**
-  * gnutls_x509_crt_get_sig_algorithm - This function will return the hash algorithm used during signature.
+  * gnutls_x509_crt_get_verify_algorithm - This function will return the hash algorithm used during signature.
   * @hash: The result of the call with the hash algorithm used for signature
   * @crt: Holds the certificate
   * @signature: contains the signature
@@ -2317,7 +2317,7 @@ gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert,
   * returned on error.
   **/
 int
-gnutls_x509_crt_get_sig_algorithm(gnutls_digest_algorithm_t *hash,
+gnutls_x509_crt_get_verify_algorithm(gnutls_digest_algorithm_t *hash,
                                   const gnutls_x509_crt_t crt,
                                   const gnutls_datum_t * signature)
 {
@@ -2327,7 +2327,7 @@ gnutls_x509_crt_get_sig_algorithm(gnutls_digest_algorithm_t *hash,
        return GNUTLS_E_INVALID_REQUEST;
      }
 
-   return _gnutls_x509_verify_algorithm(hash, signature, crt);
+   return _gnutls_x509_verify_algorithm((gnutls_mac_algorithm_t*)hash, signature, crt);
 }
 
 /**