SSL_get_peer_signature_nid.pod 1.8 KB

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