cgsi_plugin.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) Members of the EGEE Collaboration. 2004.
00003  * See http://www.eu-egee.org/partners/ for details on the copyright holders.
00004  *
00005  * Licensed under the Apache License, Version 2.0 (the "License");
00006  * you may not use this file except in compliance with the License.
00007  * You may obtain a copy of the License at
00008  *
00009  *     http://www.apache.org/licenses/LICENSE-2.0
00010  *
00011  * Unless required by applicable law or agreed to in writing, software
00012  * distributed under the License is distributed on an "AS IS" BASIS,
00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  * See the License for the specific language governing permissions and
00015  * limitations under the License.
00016  */
00017 
00030 #include <stdsoap2.h>
00031 
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #endif
00035 
00036 
00042 #define CGSI_OPT_CLIENT             0x1
00043 
00044 #define CGSI_OPT_SERVER             0x2
00045 
00046 #define CGSI_OPT_DELEG_FLAG         0x4
00047 
00048 #define CGSI_OPT_SSL_COMPATIBLE     0x8
00049 
00050 #define CGSI_OPT_DISABLE_NAME_CHECK 0x10
00051 
00052 #define CGSI_OPT_KEEP_ALIVE         0x20
00053 
00054 #define CGSI_OPT_DISABLE_MAPPING    0x40
00055 
00057 #define CGSI_OPT_DISABLE_VOMS_CHECK 0x80
00058 
00060 #define CGSI_OPT_ALLOW_ONLY_SELF    0x100
00061 
00074 int soap_cgsi_init(struct soap *soap, int cgsi_options);
00075 
00085 int cgsi_plugin(struct soap *soap, struct soap_plugin *plugin, void *arg);
00086 
00096 int client_cgsi_plugin(struct soap *soap, struct soap_plugin *plugin, void *arg);
00097 
00107 int server_cgsi_plugin(struct soap *soap, struct soap_plugin *plugin, void *arg);
00108 
00116 int is_context_established(struct soap *soap);
00117 
00127 int get_client_dn(struct soap *soap, char *dn, size_t dnlen);
00128 
00138 int get_client_username(struct soap *soap, char *username, size_t dnlen);
00139 
00152 int get_delegated_credentials(struct soap *soap, void **buffer, size_t *length);
00153 
00162 int export_delegated_credentials(struct soap *soap, char *filename);
00163 
00171 int has_delegated_credentials(struct soap *soap);
00172 
00181 int set_default_proxy_file(struct soap *soap, char *filename);
00182 
00189 void clear_default_proxy_file(int unlink_file);
00190 
00200 int retrieve_voms_creds(struct soap *soap);
00201 int retrieve_userca_and_voms_creds(struct soap *soap);
00202 
00211 char *get_client_ca(struct soap *soap);
00212 
00221 char *get_client_voname(struct soap *soap);
00222 
00233 char ** get_client_roles(struct soap *soap, int* nbfqans);
00234 
00235 
00250 int cgsi_plugin_set_flags(struct soap *soap, int is_server, int flags);
00251 
00266 int cgsi_plugin_clr_flags(struct soap *soap, int is_server, int flags);
00267 
00277 int cgsi_plugin_get_flags(struct soap *soap, int is_server);
00278 
00289 int cgsi_plugin_set_credentials(struct soap *soap, int is_server, const char* x509_cert, const char* x509_key);
00290 
00291 #ifdef __cplusplus
00292 }
00293 #endif
Copyright © 2004-2009 EU-EGEE