Functions | Variables
channel_credentials.c File Reference
#include "channel_credentials.h"
#include <ext/standard/sha1.h>
#include <ext/spl/spl_exceptions.h>
#include <zend_exceptions.h>
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
#include "call_credentials.h"
#include "channel.h"
Include dependency graph for channel_credentials.c:

Go to the source code of this file.

Functions

php_grpc_zend_object create_wrapped_grpc_channel_credentials (zend_class_entry *class_type TSRMLS_DC)
 
static grpc_ssl_roots_override_result get_ssl_roots_override (char **pem_root_certs)
 
void grpc_init_channel_credentials (TSRMLS_D)
 
zval * grpc_php_wrap_channel_credentials (grpc_channel_credentials *wrapped, char *hashstr, zend_bool has_call_creds TSRMLS_DC)
 
 if (p->hashstr !=NULL)
 
 if (p->wrapped !=NULL)
 
 PHP_METHOD (ChannelCredentials, createComposite)
 
 PHP_METHOD (ChannelCredentials, createDefault)
 
 PHP_METHOD (ChannelCredentials, createInsecure)
 
 PHP_METHOD (ChannelCredentials, createSsl)
 
 PHP_METHOD (ChannelCredentials, createXds)
 
 PHP_METHOD (ChannelCredentials, invalidateDefaultRootsPem)
 
 PHP_METHOD (ChannelCredentials, isDefaultRootsPemSet)
 
 PHP_METHOD (ChannelCredentials, setDefaultRootsPem)
 

Variables

static zend_function_entry channel_credentials_methods []
 
static char * default_pem_root_certs = NULL
 
zend_class_entry * grpc_ce_channel_credentials
 

Function Documentation

◆ create_wrapped_grpc_channel_credentials()

php_grpc_zend_object create_wrapped_grpc_channel_credentials ( zend_class_entry *class_type  TSRMLS_DC)

Definition at line 64 of file channel_credentials.c.

◆ get_ssl_roots_override()

static grpc_ssl_roots_override_result get_ssl_roots_override ( char **  pem_root_certs)
static

Definition at line 40 of file channel_credentials.c.

◆ grpc_init_channel_credentials()

void grpc_init_channel_credentials ( TSRMLS_D  )

Definition at line 326 of file channel_credentials.c.

◆ grpc_php_wrap_channel_credentials()

zval* grpc_php_wrap_channel_credentials ( grpc_channel_credentials wrapped,
char *  hashstr,
zend_bool has_call_creds  TSRMLS_DC 
)

Definition at line 73 of file channel_credentials.c.

◆ if() [1/2]

if ( p->hashstr = NULL)

Definition at line 52 of file channel_credentials.c.

◆ if() [2/2]

if ( p->wrapped = NULL)

Definition at line 56 of file channel_credentials.c.

◆ PHP_METHOD() [1/8]

PHP_METHOD ( ChannelCredentials  ,
createComposite   
)

Create composite credentials from two existing credentials.

Parameters
ChannelCredentials$cred1_objThe first credential
CallCredentials$cred2_objThe second credential
Returns
ChannelCredentials The new composite credentials object

Definition at line 200 of file channel_credentials.c.

◆ PHP_METHOD() [2/8]

PHP_METHOD ( ChannelCredentials  ,
createDefault   
)

Create a default channel credentials object.

Returns
ChannelCredentials The new default channel credentials object

Definition at line 133 of file channel_credentials.c.

◆ PHP_METHOD() [3/8]

PHP_METHOD ( ChannelCredentials  ,
createInsecure   
)

Create insecure channel credentials

Returns
null

Definition at line 235 of file channel_credentials.c.

◆ PHP_METHOD() [4/8]

PHP_METHOD ( ChannelCredentials  ,
createSsl   
)

Create SSL credentials.

Parameters
string | null$pem_root_certs= null PEM encoding of the server root certificates (optional)
string | null$private_key= null PEM encoding of the client's private key (optional)
string | null$cert_chain= null PEM encoding of the client's certificate chain (optional)
Returns
ChannelCredentials The new SSL credentials object

Definition at line 149 of file channel_credentials.c.

◆ PHP_METHOD() [5/8]

PHP_METHOD ( ChannelCredentials  ,
createXds   
)

Create XDS channel credentials

Parameters
ChannelCredentials$fallback_credsThe fallback credentials used if the channel target does not have the 'xds:///' scheme or if the xDS control plane does not provide information on how to fetch credentials dynamically.
Returns
ChannelCredentials The xDS channel credentials object

Definition at line 247 of file channel_credentials.c.

◆ PHP_METHOD() [6/8]

PHP_METHOD ( ChannelCredentials  ,
invalidateDefaultRootsPem   
)

free default roots pem, if it is set

Definition at line 122 of file channel_credentials.c.

◆ PHP_METHOD() [7/8]

PHP_METHOD ( ChannelCredentials  ,
isDefaultRootsPemSet   
)

if default roots pem is set

Returns
TRUE/FALSE

Definition at line 112 of file channel_credentials.c.

◆ PHP_METHOD() [8/8]

PHP_METHOD ( ChannelCredentials  ,
setDefaultRootsPem   
)

Set default roots pem.

Parameters
string$pem_rootsPEM encoding of the server root certificates
Returns
void

Definition at line 93 of file channel_credentials.c.

Variable Documentation

◆ channel_credentials_methods

zend_function_entry channel_credentials_methods[]
static
Initial value:
= {
PHP_ME(ChannelCredentials, setDefaultRootsPem, arginfo_setDefaultRootsPem,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, isDefaultRootsPemSet, arginfo_isDefaultRootsPemSet,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, invalidateDefaultRootsPem, arginfo_invalidateDefaultRootsPem,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, createDefault, arginfo_createDefault,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, createSsl, arginfo_createSsl,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, createComposite, arginfo_createComposite,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, createInsecure, arginfo_createInsecure,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(ChannelCredentials, createXds, arginfo_createXds,
ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_FE_END
}

Definition at line 306 of file channel_credentials.c.

◆ default_pem_root_certs

char* default_pem_root_certs = NULL
static

Definition at line 38 of file channel_credentials.c.

◆ grpc_ce_channel_credentials

zend_class_entry* grpc_ce_channel_credentials
grpc.beta.implementations.ChannelCredentials
ChannelCredentials
Definition: implementations.py:33


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:06