| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_pubkey_verify_hash2} (gnutls_pubkey_t @var{key}, gnutls_sign_algorithm_t @var{algo}, unsigned int @var{flags}, const gnutls_datum_t * @var{hash}, const gnutls_datum_t * @var{signature}) |
| 6 |
@var{key}: Holds the public key |
| 7 |
|
| 8 |
@var{algo}: The signature algorithm used |
| 9 |
|
| 10 |
@var{flags}: Zero or an OR list of @code{gnutls_certificate_verify_flags} |
| 11 |
|
| 12 |
@var{hash}: holds the hash digest to be verified |
| 13 |
|
| 14 |
@var{signature}: contains the signature |
| 15 |
|
| 16 |
This function will verify the given signed digest, using the |
| 17 |
parameters from the public key. Note that unlike @code{gnutls_privkey_sign_hash()} , |
| 18 |
this function accepts a signature algorithm instead of a digest algorithm. |
| 19 |
You can use @code{gnutls_pk_to_sign()} to get the appropriate value. |
| 20 |
|
| 21 |
@strong{Returns:} In case of a verification failure @code{GNUTLS_E_PK_SIG_VERIFY_FAILED} |
| 22 |
is returned, and zero or positive code on success. For known to be insecure |
| 23 |
signatures this function will return @code{GNUTLS_E_INSUFFICIENT_SECURITY} unless |
| 24 |
the flag @code{GNUTLS_VERIFY_ALLOW_BROKEN} is specified. |
| 25 |
|
| 26 |
@strong{Since:} 3.0 |
| 27 |
@end deftypefun |