xref: /freebsd/crypto/openssl/doc/man3/SSL_get_peer_signature_nid.pod (revision e9b1dc32c9bd2ebae5f9e140bfa0e0321bc366b5)
1=pod
2
3=head1 NAME
4
5SSL_get_peer_signature_nid, SSL_get_peer_signature_type_nid - get TLS
6message signing types
7
8=head1 SYNOPSIS
9
10 #include <openssl/ssl.h>
11
12 int SSL_get_peer_signature_nid(SSL *ssl, int *psig_nid);
13 int SSL_get_peer_signature_type_nid(const SSL *ssl, int *psigtype_nid);
14
15=head1 DESCRIPTION
16
17SSL_get_peer_signature_nid() sets B<*psig_nid> to the NID of the digest used
18by the peer to sign TLS messages. It is implemented as a macro.
19
20SSL_get_peer_signature_type_nid() sets B<*psigtype_nid> to the signature
21type used by the peer to sign TLS messages. Currently the signature type
22is the NID of the public key type used for signing except for PSS signing
23where it is B<EVP_PKEY_RSA_PSS>. To differentiate between
24B<rsa_pss_rsae_*> and B<rsa_pss_pss_*> signatures, it's necessary to check
25the type of public key in the peer's certificate.
26
27=head1 RETURN VALUES
28
29These functions return 1 for success and 0 for failure. There are several
30possible reasons for failure: the cipher suite has no signature (e.g. it
31uses RSA key exchange or is anonymous), the TLS version is below 1.2 or
32the functions were called before the peer signed a message.
33
34=head1 SEE ALSO
35
36L<ssl(7)>, L<SSL_get_peer_certificate(3)>,
37
38=head1 COPYRIGHT
39
40Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
41
42Licensed under the OpenSSL license (the "License").  You may not use
43this file except in compliance with the License.  You can obtain a copy
44in the file LICENSE in the source distribution or at
45L<https://www.openssl.org/source/license.html>.
46
47=cut
48