@@ -60,6 +60,10 @@ function_entry mcve_functions[] = {
60
60
PHP_FE (m_setdropfile , NULL )
61
61
PHP_FE (m_setip , NULL )
62
62
PHP_FE (m_setssl , NULL )
63
+ #if LIBMONETRA_VERSION >= 050000
64
+ PHP_FE (m_setssl_cafile , NULL )
65
+ PHP_FE (m_responsekeys , NULL )
66
+ #endif
63
67
PHP_FE (m_setssl_files , NULL )
64
68
PHP_FE (m_settimeout , NULL )
65
69
PHP_FE (m_setblocking , NULL )
@@ -734,6 +738,31 @@ PHP_FUNCTION(m_setssl)
734
738
}
735
739
/* }}} */
736
740
741
+ #if LIBMONETRA_VERSION >= 050000
742
+ /* {{{ proto int m_setssl_cafile(resource conn, string cafile)
743
+ Set SSL CA (Certificate Authority) file for verification of server
744
+ certificate
745
+ */
746
+ PHP_FUNCTION (m_setssl_cafile )
747
+ {
748
+ MCVE_CONN * conn ;
749
+ int retval ;
750
+ zval * * arg1 , * * arg2 ;
751
+
752
+ if (ZEND_NUM_ARGS () != 2 || zend_get_parameters_ex (2 , & arg1 , & arg2 ) == FAILURE )
753
+ WRONG_PARAM_COUNT ;
754
+
755
+
756
+ ZEND_FETCH_RESOURCE (conn , MCVE_CONN * , arg1 , -1 , "mcve connection" , le_conn );
757
+ convert_to_string_ex (arg2 );
758
+
759
+ retval = M_SetSSL_CAfile (conn , Z_STRVAL_PP (arg2 ));
760
+
761
+ RETURN_LONG (retval );
762
+ }
763
+ /* }}} */
764
+ #endif
765
+
737
766
/* {{{ proto int m_setssl_files(resource conn, string sslkeyfile, string sslcertfile)
738
767
Set certificate key files and certificates if server requires client certificate
739
768
verification
@@ -1150,6 +1179,36 @@ PHP_FUNCTION(m_responseparam)
1150
1179
}
1151
1180
/* }}} */
1152
1181
1182
+ #if LIBMONETRA_VERSION >= 050000
1183
+ /* {{{ proto array m_responsekeys(resource conn, long identifier)
1184
+ Returns array of strings which represents the keys that can be used
1185
+ for response parameters on this transaction
1186
+ */
1187
+ PHP_FUNCTION (m_responsekeys )
1188
+ {
1189
+ MCVE_CONN * conn ;
1190
+ char * * retval ;
1191
+ int num_keys , i ;
1192
+ zval * * arg1 , * * arg2 ;
1193
+
1194
+ if (ZEND_NUM_ARGS () != 2 || zend_get_parameters_ex (2 , & arg1 , & arg2 ) == FAILURE )
1195
+ WRONG_PARAM_COUNT ;
1196
+
1197
+ ZEND_FETCH_RESOURCE (conn , MCVE_CONN * , arg1 , -1 , "mcve connection" , le_conn );
1198
+ convert_to_long_ex (arg2 );
1199
+
1200
+ array_init (return_value );
1201
+
1202
+ retval = M_ResponseKeys (conn , Z_LVAL_PP (arg2 ), & num_keys );
1203
+ if (retval != NULL ) {
1204
+ for (i = 0 ; i < num_keys ; i ++ )
1205
+ add_next_index_string (return_value , retval [i ], 1 );
1206
+ M_FreeResponseKeys (retval , num_keys );
1207
+ }
1208
+ }
1209
+ /* }}} */
1210
+ #endif
1211
+
1153
1212
/* {{{ proto string m_getuserparam(resource conn, long identifier, int key)
1154
1213
Get a user response parameter */
1155
1214
PHP_FUNCTION (m_getuserparam )
0 commit comments