gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_3_1_2-28-g5a9b47c


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_3_1_2-28-g5a9b47c
Date: Mon, 01 Oct 2012 19:34:44 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=5a9b47c3365cd07189e7449e9bb91a4e3bacc62e

The branch, master has been updated
       via  5a9b47c3365cd07189e7449e9bb91a4e3bacc62e (commit)
       via  db4c433c6c1806a53190b90ef3df8e07a046755e (commit)
      from  c34892626fe63157fac460877841fd7067bc1a6c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5a9b47c3365cd07189e7449e9bb91a4e3bacc62e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon Oct 1 21:33:24 2012 +0200

    check the first response.

commit db4c433c6c1806a53190b90ef3df8e07a046755e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Mon Oct 1 21:32:51 2012 +0200

    gnutls_ocsp_resp_check_crt() accepts the response index.

-----------------------------------------------------------------------

Summary of changes:
 doc/examples/ex-ocsp-client.c |    2 +-
 lib/includes/gnutls/ocsp.h    |    1 +
 lib/x509/ocsp.c               |    6 ++++--
 src/ocsptool-common.c         |    2 +-
 4 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/doc/examples/ex-ocsp-client.c b/doc/examples/ex-ocsp-client.c
index 0428574..6373fc2 100644
--- a/doc/examples/ex-ocsp-client.c
+++ b/doc/examples/ex-ocsp-client.c
@@ -255,7 +255,7 @@ _verify_response (gnutls_datum_t * data, gnutls_x509_crt_t 
cert,
     if (ret < 0)
         exit (1);
         
-    ret = gnutls_ocsp_resp_check_crt (resp, cert);
+    ret = gnutls_ocsp_resp_check_crt (resp, 0, cert);
     if (ret < 0)
       exit(1);
 
diff --git a/lib/includes/gnutls/ocsp.h b/lib/includes/gnutls/ocsp.h
index af10feb..efc184f 100644
--- a/lib/includes/gnutls/ocsp.h
+++ b/lib/includes/gnutls/ocsp.h
@@ -249,6 +249,7 @@ typedef enum gnutls_ocsp_verify_reason_t
                               unsigned int flags);
 
   int gnutls_ocsp_resp_check_crt (gnutls_ocsp_resp_t resp,
+                                  unsigned int indx,
                                   gnutls_x509_crt_t crt);
 
 #ifdef __cplusplus
diff --git a/lib/x509/ocsp.c b/lib/x509/ocsp.c
index 2ec35a5..5b2d3d6 100644
--- a/lib/x509/ocsp.c
+++ b/lib/x509/ocsp.c
@@ -1277,6 +1277,7 @@ gnutls_ocsp_resp_get_produced (gnutls_ocsp_resp_t resp)
 /**
  * gnutls_ocsp_resp_check_crt:
  * @resp: should contain a #gnutls_ocsp_resp_t structure
+ * @indx: Specifies response number to get. Use (0) to get the first one.
  * @crt: The certificate to check
  *
  * This function will check whether the OCSP response
@@ -1287,6 +1288,7 @@ gnutls_ocsp_resp_get_produced (gnutls_ocsp_resp_t resp)
  **/
 int
 gnutls_ocsp_resp_check_crt (gnutls_ocsp_resp_t resp,
+                            unsigned int indx,
                            gnutls_x509_crt_t crt)
 {
 int ret;
@@ -1297,7 +1299,7 @@ gnutls_datum_t dn = {NULL, 0};
 uint8_t cdn_hash[MAX_HASH_SIZE];
 size_t t, hash_len;
 
-  ret = gnutls_ocsp_resp_get_single (resp, 0, &digest, &rdn_hash, NULL,
+  ret = gnutls_ocsp_resp_get_single (resp, indx, &digest, &rdn_hash, NULL,
                                      &rserial, NULL, NULL, NULL, NULL, NULL);
   if (ret < 0)
     return gnutls_assert_val(ret);
@@ -1373,7 +1375,7 @@ cleanup:
 /**
  * gnutls_ocsp_resp_get_single:
  * @resp: should contain a #gnutls_ocsp_resp_t structure
- * @indx: Specifies which extension OID to get. Use (0) to get the first one.
+ * @indx: Specifies response number to get. Use (0) to get the first one.
  * @digest: output variable with #gnutls_digest_algorithm_t hash algorithm
  * @issuer_name_hash: output buffer with hash of issuer's DN
  * @issuer_key_hash: output buffer with hash of issuer's public key
diff --git a/src/ocsptool-common.c b/src/ocsptool-common.c
index 33f7894..835ccbf 100644
--- a/src/ocsptool-common.c
+++ b/src/ocsptool-common.c
@@ -330,7 +330,7 @@ check_ocsp_response (gnutls_x509_crt_t cert,
   if (ret < 0)
     error (EXIT_FAILURE, 0, "importing response: %s", gnutls_strerror (ret));
   
-  ret = gnutls_ocsp_resp_check_crt(resp, cert);
+  ret = gnutls_ocsp_resp_check_crt(resp, 0, cert);
   if (ret < 0)
     {
       printf ("*** Got OCSP response on an unrelated certificate 
(ignoring)\n");


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]