Add Comments For Getting Peer Cert Full Chain (#25942)

pull/25956/head
ZhenLian 4 years ago committed by GitHub
parent e8a904368b
commit f6b69a659b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      include/grpc/grpc_security_constants.h

@ -29,6 +29,17 @@ extern "C" {
#define GRPC_X509_CN_PROPERTY_NAME "x509_common_name"
#define GRPC_X509_SAN_PROPERTY_NAME "x509_subject_alternative_name"
#define GRPC_X509_PEM_CERT_PROPERTY_NAME "x509_pem_cert"
// Please note that internally, we just faithfully pass whatever value we got by
// calling SSL_get_peer_cert_chain() in OpenSSL/BoringSSL. This will mean in
// OpenSSL, the following conditions might apply:
// 1. On the client side, this property returns the full certificate chain. On
// the server side, this property will return the certificate chain without the
// leaf certificate. Application can use GRPC_X509_PEM_CERT_PROPERTY_NAME to
// get the peer leaf certificate.
// 2. If the session is resumed, this property could be empty for OpenSSL (but
// not for BoringSSL).
// For more, please refer to the official OpenSSL manual:
// https://www.openssl.org/docs/man1.1.0/man3/SSL_get_peer_cert_chain.html.
#define GRPC_X509_PEM_CERT_CHAIN_PROPERTY_NAME "x509_pem_cert_chain"
#define GRPC_SSL_SESSION_REUSED_PROPERTY "ssl_session_reused"
#define GRPC_TRANSPORT_SECURITY_LEVEL_PROPERTY_NAME "security_level"

Loading…
Cancel
Save