xref: /freebsd/crypto/openssl/doc/man3/SSL_get_peer_signature_nid.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5c9cf7b5cSJung-uk KimSSL_get_peer_signature_nid, SSL_get_peer_signature_type_nid,
6c9cf7b5cSJung-uk KimSSL_get_signature_nid, SSL_get_signature_type_nid - get TLS message signing
7c9cf7b5cSJung-uk Kimtypes
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim=head1 SYNOPSIS
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim #include <openssl/ssl.h>
12e71b7053SJung-uk Kim
13e71b7053SJung-uk Kim int SSL_get_peer_signature_nid(SSL *ssl, int *psig_nid);
14e71b7053SJung-uk Kim int SSL_get_peer_signature_type_nid(const SSL *ssl, int *psigtype_nid);
15c9cf7b5cSJung-uk Kim int SSL_get_signature_nid(SSL *ssl, int *psig_nid);
16c9cf7b5cSJung-uk Kim int SSL_get_signature_type_nid(const SSL *ssl, int *psigtype_nid);
17e71b7053SJung-uk Kim
18e71b7053SJung-uk Kim=head1 DESCRIPTION
19e71b7053SJung-uk Kim
20e71b7053SJung-uk KimSSL_get_peer_signature_nid() sets B<*psig_nid> to the NID of the digest used
21e71b7053SJung-uk Kimby the peer to sign TLS messages. It is implemented as a macro.
22e71b7053SJung-uk Kim
23e71b7053SJung-uk KimSSL_get_peer_signature_type_nid() sets B<*psigtype_nid> to the signature
24e71b7053SJung-uk Kimtype used by the peer to sign TLS messages. Currently the signature type
25e71b7053SJung-uk Kimis the NID of the public key type used for signing except for PSS signing
26e71b7053SJung-uk Kimwhere it is B<EVP_PKEY_RSA_PSS>. To differentiate between
27e71b7053SJung-uk KimB<rsa_pss_rsae_*> and B<rsa_pss_pss_*> signatures, it's necessary to check
28e71b7053SJung-uk Kimthe type of public key in the peer's certificate.
29e71b7053SJung-uk Kim
30c9cf7b5cSJung-uk KimSSL_get_signature_nid() and SSL_get_signature_type_nid() return the equivalent
31c9cf7b5cSJung-uk Kiminformation for the local end of the connection.
32c9cf7b5cSJung-uk Kim
33e71b7053SJung-uk Kim=head1 RETURN VALUES
34e71b7053SJung-uk Kim
35e71b7053SJung-uk KimThese functions return 1 for success and 0 for failure. There are several
36e71b7053SJung-uk Kimpossible reasons for failure: the cipher suite has no signature (e.g. it
37e71b7053SJung-uk Kimuses RSA key exchange or is anonymous), the TLS version is below 1.2 or
38c9cf7b5cSJung-uk Kimthe functions were called too early, e.g. before the peer signed a message.
39e71b7053SJung-uk Kim
40e71b7053SJung-uk Kim=head1 SEE ALSO
41e71b7053SJung-uk Kim
42e71b7053SJung-uk KimL<ssl(7)>, L<SSL_get_peer_certificate(3)>,
43e71b7053SJung-uk Kim
44e71b7053SJung-uk Kim=head1 COPYRIGHT
45e71b7053SJung-uk Kim
46e71b7053SJung-uk KimCopyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
47e71b7053SJung-uk Kim
48*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
49e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
50e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
51e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
52e71b7053SJung-uk Kim
53e71b7053SJung-uk Kim=cut
54