SSL_GET_PEER_SIGNATURE_NID(3ossl)
okay bestie, buckle up π«Ά this is the SSL_GET_PEER_SIGNATURE_NID(3ossl) page from the OpenSSL manual, and we're about to get into TLS message signing types together β¨
πΈ NAME πΈ
These functions are the little squad that gets TLS message signing types, no cap π
SSL_get0_peer_signature_nameSSL_get_peer_signature_nidSSL_get_peer_signature_type_nidSSL_get0_signature_nameSSL_get_signature_nidSSL_get_signature_type_nid
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
int SSL_get0_peer_signature_name(const SSL *ssl, const char **sigalg);
int SSL_get_peer_signature_nid(SSL *ssl, int *psig_nid);
int SSL_get_peer_signature_type_nid(const SSL *ssl, int *psigtype_nid);
int SSL_get0_signature_name(SSL *ssl, const char **sigalg);
int SSL_get_signature_nid(SSL *ssl, int *psig_nid);
int SSL_get_signature_type_nid(SSL *ssl, int *psigtype_nid);
π¦ DESCRIPTION π¦
Okay so here's the tea β β these are all about who signed what on a TLS connection, and which signature scheme they used.
SSL_get0_peer_signature_name()sets*sigalgto the IANA name of the signature scheme used by the peer to sign the TLS handshake. The IANA list lives here, bestie:https://www.iana.org/assignments/tls-parameters/tls-parameters.xhtml#tls-signatureschemeπ
β οΈ caveat, and this is important: the caller must not free the returned pointer. If you need the returned string to stick around beyond the lifetime of the SSL connection, copy it. periodt π
SSL_get_peer_signature_nid()sets*psig_nidto the NID of the digest used by the peer to sign TLS messages. It is implemented as a macro πSSL_get_peer_signature_type_nid()sets*psigtype_nidto the signature type used by the peer to sign TLS messages. Currently the signature type is the NID of the public key type used for signing except for PSS signing where it isEVP_PKEY_RSA_PSS. To differentiate betweenrsa_pss_rsae_*andrsa_pss_pss_*signatures, it's necessary to check the type of public key in the peer's certificate π§SSL_get0_signature_name(),SSL_get_signature_nid()andSSL_get_signature_type_nid()return the equivalent information for the local end of the connection. local end representation, slay π
π RETURN VALUES π
These functions return 1 for success and 0 for failure. No in-between, no mystery vibe check π
There are several possible reasons for failure:
- the peer or local end is a client and did not sign the handshake (did not use a client certificate)
- the cipher suite has no signature (e.g. it uses RSA key exchange or is anonymous)
- the TLS version is below 1.2
- or the functions were called too early, e.g. before the peer signed a message
π SEE ALSO π
β HISTORY β
The SSL_get0_peer_signature_name() and SSL_get0_signature_name() functions were added in OpenSSL 3.5. iconic behavior, honestly π₯
π COPYRIGHT π
Copyright 2017-2025 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at https://www.openssl.org/source/license.html.
mwah π signing off from OpenSSL 3.5.6, dated 2026-04-07 β catch you in the next manpage, bestie π«Άβ¨
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms