| 1 |
.\" -*- mode: troff; coding: utf-8 -*- |
| 2 |
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45) |
| 3 |
.\" |
| 4 |
.\" Standard preamble: |
| 5 |
.\" ======================================================================== |
| 6 |
.de Sp \" Vertical space (when we can't use .PP) |
| 7 |
.if t .sp .5v |
| 8 |
.if n .sp |
| 9 |
.. |
| 10 |
.de Vb \" Begin verbatim text |
| 11 |
.ft CW |
| 12 |
.nf |
| 13 |
.ne \\$1 |
| 14 |
.. |
| 15 |
.de Ve \" End verbatim text |
| 16 |
.ft R |
| 17 |
.fi |
| 18 |
.. |
| 19 |
.\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>. |
| 20 |
.ie n \{\ |
| 21 |
. ds C` "" |
| 22 |
. ds C' "" |
| 23 |
'br\} |
| 24 |
.el\{\ |
| 25 |
. ds C` |
| 26 |
. ds C' |
| 27 |
'br\} |
| 28 |
.\" |
| 29 |
.\" Escape single quotes in literal strings from groff's Unicode transform. |
| 30 |
.ie \n(.g .ds Aq \(aq |
| 31 |
.el .ds Aq ' |
| 32 |
.\" |
| 33 |
.\" If the F register is >0, we'll generate index entries on stderr for |
| 34 |
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index |
| 35 |
.\" entries marked with X<> in POD. Of course, you'll have to process the |
| 36 |
.\" output yourself in some meaningful fashion. |
| 37 |
.\" |
| 38 |
.\" Avoid warning from groff about undefined register 'F'. |
| 39 |
.de IX |
| 40 |
.. |
| 41 |
.nr rF 0 |
| 42 |
.if \n(.g .if rF .nr rF 1 |
| 43 |
.if (\n(rF:(\n(.g==0)) \{\ |
| 44 |
. if \nF \{\ |
| 45 |
. de IX |
| 46 |
. tm Index:\\$1\t\\n%\t"\\$2" |
| 47 |
.. |
| 48 |
. if !\nF==2 \{\ |
| 49 |
. nr % 0 |
| 50 |
. nr F 2 |
| 51 |
. \} |
| 52 |
. \} |
| 53 |
.\} |
| 54 |
.rr rF |
| 55 |
.\" ======================================================================== |
| 56 |
.\" |
| 57 |
.IX Title "SSL_GET_PEER_SIGNATURE_NID 3SSL" |
| 58 |
.TH SSL_GET_PEER_SIGNATURE_NID 3SSL 2026-04-07 3.6.2 OpenSSL |
| 59 |
.\" For nroff, turn off justification. Always turn off hyphenation; it makes |
| 60 |
.\" way too many mistakes in technical documents. |
| 61 |
.if n .ad l |
| 62 |
.nh |
| 63 |
.SH NAME |
| 64 |
SSL_get0_peer_signature_name, SSL_get_peer_signature_nid, |
| 65 |
SSL_get_peer_signature_type_nid, SSL_get0_signature_name, |
| 66 |
SSL_get_signature_nid, SSL_get_signature_type_nid \- |
| 67 |
get TLS message signing types |
| 68 |
.SH SYNOPSIS |
| 69 |
.IX Header "SYNOPSIS" |
| 70 |
.Vb 1 |
| 71 |
\& #include <openssl/ssl.h> |
| 72 |
\& |
| 73 |
\& int SSL_get0_peer_signature_name(const SSL *ssl, const char **sigalg); |
| 74 |
\& int SSL_get_peer_signature_nid(SSL *ssl, int *psig_nid); |
| 75 |
\& int SSL_get_peer_signature_type_nid(const SSL *ssl, int *psigtype_nid); |
| 76 |
\& int SSL_get0_signature_name(SSL *ssl, const char **sigalg); |
| 77 |
\& int SSL_get_signature_nid(SSL *ssl, int *psig_nid); |
| 78 |
\& int SSL_get_signature_type_nid(const SSL *ssl, int *psigtype_nid); |
| 79 |
.Ve |
| 80 |
.SH DESCRIPTION |
| 81 |
.IX Header "DESCRIPTION" |
| 82 |
\&\fBSSL_get0_peer_signature_name()\fR sets \fI*sigalg\fR to the IANA name of the |
| 83 |
signature scheme <https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signaturescheme> |
| 84 |
used by the peer to sign the TLS handshake. |
| 85 |
The caller must not free the returned pointer. |
| 86 |
The returned string should be copied if it is to be retained beyond the |
| 87 |
lifetime of the SSL connection. |
| 88 |
.PP |
| 89 |
\&\fBSSL_get_peer_signature_nid()\fR sets \fB*psig_nid\fR to the NID of the digest used |
| 90 |
by the peer to sign TLS messages. It is implemented as a macro. |
| 91 |
.PP |
| 92 |
\&\fBSSL_get_peer_signature_type_nid()\fR sets \fB*psigtype_nid\fR to the signature |
| 93 |
type used by the peer to sign TLS messages. Currently the signature type |
| 94 |
is the NID of the public key type used for signing except for PSS signing |
| 95 |
where it is \fBEVP_PKEY_RSA_PSS\fR. To differentiate between |
| 96 |
\&\fBrsa_pss_rsae_*\fR and \fBrsa_pss_pss_*\fR signatures, it's necessary to check |
| 97 |
the type of public key in the peer's certificate. |
| 98 |
.PP |
| 99 |
\&\fBSSL_get0_signature_name()\fR, \fBSSL_get_signature_nid()\fR and |
| 100 |
\&\fBSSL_get_signature_type_nid()\fR return the equivalent information for the local |
| 101 |
end of the connection. |
| 102 |
.SH "RETURN VALUES" |
| 103 |
.IX Header "RETURN VALUES" |
| 104 |
These functions return 1 for success and 0 for failure. There are several |
| 105 |
possible reasons for failure: the peer or local end is a client and did not |
| 106 |
sign the handshake (did not use a client certificate), the cipher suite has no |
| 107 |
signature (e.g. it uses RSA key exchange or is anonymous), the TLS version is |
| 108 |
below 1.2 or the functions were called too early, e.g. before the peer signed a |
| 109 |
message. |
| 110 |
.SH "SEE ALSO" |
| 111 |
.IX Header "SEE ALSO" |
| 112 |
\&\fBssl\fR\|(7), \fBSSL_get_peer_certificate\fR\|(3), |
| 113 |
.SH HISTORY |
| 114 |
.IX Header "HISTORY" |
| 115 |
The \fBSSL_get0_peer_signature_name()\fR and \fBSSL_get0_signature_name()\fR functions were |
| 116 |
added in OpenSSL 3.5. |
| 117 |
.PP |
| 118 |
\&\fBSSL_get_signature_nid()\fR was added in OpenSSL 1.1.1a. |
| 119 |
.SH COPYRIGHT |
| 120 |
.IX Header "COPYRIGHT" |
| 121 |
Copyright 2017\-2025 The OpenSSL Project Authors. All Rights Reserved. |
| 122 |
.PP |
| 123 |
Licensed under the Apache License 2.0 (the "License"). You may not use |
| 124 |
this file except in compliance with the License. You can obtain a copy |
| 125 |
in the file LICENSE in the source distribution or at |
| 126 |
<https://www.openssl.org/source/license.html>. |