chromium/third_party/grpc/src/include/grpc/grpc_security_constants.h

/*
 *
 * Copyright 2016 gRPC authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

#ifndef GRPC_GRPC_SECURITY_CONSTANTS_H
#define GRPC_GRPC_SECURITY_CONSTANTS_H

#ifdef __cplusplus
extern "C" {
#endif

#define GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME
#define GRPC_SSL_TRANSPORT_SECURITY_TYPE
#define GRPC_TLS_TRANSPORT_SECURITY_TYPE

#define GRPC_X509_CN_PROPERTY_NAME
#define GRPC_X509_SUBJECT_PROPERTY_NAME
#define GRPC_X509_SAN_PROPERTY_NAME
#define GRPC_X509_PEM_CERT_PROPERTY_NAME
// 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
#define GRPC_SSL_SESSION_REUSED_PROPERTY
#define GRPC_TRANSPORT_SECURITY_LEVEL_PROPERTY_NAME
#define GRPC_PEER_DNS_PROPERTY_NAME
#define GRPC_PEER_SPIFFE_ID_PROPERTY_NAME
#define GRPC_PEER_URI_PROPERTY_NAME
#define GRPC_PEER_EMAIL_PROPERTY_NAME
#define GRPC_PEER_IP_PROPERTY_NAME

/** Environment variable that points to the default SSL roots file. This file
   must be a PEM encoded file with all the roots such as the one that can be
   downloaded from https://pki.google.com/roots.pem.  */
#define GRPC_DEFAULT_SSL_ROOTS_FILE_PATH_ENV_VAR

/** Environment variable that points to the google default application
   credentials json key or refresh token. Used in the
   grpc_google_default_credentials_create function. */
#define GRPC_GOOGLE_CREDENTIALS_ENV_VAR

/** Results for the SSL roots override callback. */
grpc_ssl_roots_override_result;

/** Callback results for dynamically loading a SSL certificate config. */
grpc_ssl_certificate_config_reload_status;

grpc_ssl_client_certificate_request_type;

/* Security levels of grpc transport security. It represents an inherent
 * property of a backend connection and is determined by a channel credential
 * used to create the connection. */
grpc_security_level;

/**
 * Type of local connections for which local channel/server credentials will be
 * applied. It supports UDS and local TCP connections.
 */
grpc_local_connect_type;

/** The TLS versions that are supported by the SSL stack. **/
grpc_tls_version;

#ifdef __cplusplus
}
#endif

#endif /* GRPC_GRPC_SECURITY_CONSTANTS_H */