]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
read revocation reason
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 30 Sep 2012 22:18:43 +0000 (00:18 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 30 Sep 2012 22:18:43 +0000 (00:18 +0200)
lib/x509/ocsp.c

index 37fa4dd298d6c945ab2a5498f19520d55c377d64..2ec35a5ac0fb085ffcc963db3a6205d67b5b74d1 100644 (file)
@@ -1572,6 +1572,18 @@ gnutls_ocsp_resp_get_single (gnutls_ocsp_resp_t resp,
     }
 
   /* revocation_reason */
+  if (revocation_reason)
+    {
+      snprintf (name, sizeof (name),
+               "tbsResponseData.responses.?%u.certStatus."
+               "revoked.revocationReason",
+               indx + 1);
+
+      ret = _gnutls_x509_read_uint (resp->basicresp, name,
+                                    revocation_reason);
+      if (ret < 0)
+        return gnutls_assert_val(ret);
+    }
 
   return GNUTLS_E_SUCCESS;
 }