File: gnutls_ocsp_req_get_cert_id

package info (click to toggle)
gnutls28 3.3.8-6
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 51,388 kB
  • sloc: ansic: 191,357; asm: 60,370; sh: 21,457; makefile: 5,257; lisp: 1,531; yacc: 1,254; cpp: 1,155; perl: 199; sed: 16
file content (37 lines) | stat: -rw-r--r-- 1,555 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37




@deftypefun {int} {gnutls_ocsp_req_get_cert_id} (gnutls_ocsp_req_t @var{req}, unsigned @var{indx}, gnutls_digest_algorithm_t * @var{digest}, gnutls_datum_t * @var{issuer_name_hash}, gnutls_datum_t * @var{issuer_key_hash}, gnutls_datum_t * @var{serial_number})
@var{req}: should contain a @code{gnutls_ocsp_req_t}  structure

@var{indx}: Specifies which extension OID to get. Use (0) to get the first one.

@var{digest}: output variable with @code{gnutls_digest_algorithm_t}  hash algorithm

@var{issuer_name_hash}: output buffer with hash of issuer's DN

@var{issuer_key_hash}: output buffer with hash of issuer's public key

@var{serial_number}: output buffer with serial number of certificate to check

This function will return the certificate information of the
 @code{indx} 'ed request in the OCSP request.  The information returned
corresponds to the CertID structure:

<informalexample><programlisting>
CertID          ::=     SEQUENCE @{
hashAlgorithm       AlgorithmIdentifier,
issuerNameHash      OCTET STRING, -- Hash of Issuer's DN
issuerKeyHash       OCTET STRING, -- Hash of Issuers public key
serialNumber        CertificateSerialNumber @}
</programlisting></informalexample>

Each of the pointers to output variables may be NULL to indicate
that the caller is not interested in that value.

@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS}  (0) is returned, otherwise a
negative error code is returned.  If you have reached the last
CertID available @code{GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE}  will be
returned.
@end deftypefun