1 /* zxidpriv.h - Private API functions 2 * Copyright (c) 2009-2010 Sampo Kellomaki (sampo@iki.fi), All Rights Reserved. 3 * Copyright (c) 2006-2009 Symlabs (symlabs@symlabs.com), All Rights Reserved. 4 * Author: Sampo Kellomaki (sampo@iki.fi) 5 * This is confidential unpublished proprietary source code of the author. 6 * NO WARRANTY, not even implied warranties. Contains trade secrets. 7 * Distribution prohibited unless authorized in writing. 8 * Licensed under Apache License 2.0, see file COPYING. 9 * $Id: zxid.h,v 1.94 2010-01-08 02:10:09 sampo Exp $ 10 * 11 * 12.8.2006, created --Sampo 12 * 31.5.2010, eliminated many include dependencies from the public API --Sampo 13 * 13.11.2010, added ZXID_DECL for benefit of the Windows port --Sampo 14 * 12.12.2010, separate zxidpriv.h and zxidutil.h from zxid.h --Sampo 15 */ 16 17 #ifndef _zxidpriv_h 18 #define _zxidpriv_h 19 20 #include <memory.h> 21 #include <string.h> 22 #include <zx/zx.h> 23 24 /* ZXID_DECL allows all API functions to be qualified with a declatation, such 25 * as relating to the calling convention (e.g. c-decl). Such qualification 26 * is very important in the Windows environment. In such environment ZXID_DECL 27 * will be defined in Makefile to cause the desired effect. */ 28 29 #ifndef ZXID_DECL 30 #define ZXID_DECL 31 #endif 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 #ifdef ZXID_FULL_HEADERS 38 #include <zx/c/zx-data.h> /* Generated. If missing, run `make dep ENA_GEN=1' */ 39 #else 40 /* Since we only need pointers to these generated structures, we do not 41 * really need to include (or ship) c/zx-data.h. Just forward declare 42 * them here. */ 43 struct zx_root_s; 44 struct zx_e_Envelope_s; 45 struct zx_e_Header_s; 46 struct zx_e_Body_s; 47 struct zx_e_Fault_s; 48 struct zx_tas3_Status_s; 49 struct zx_a_EndpointReference_s; 50 struct zx_a_Address_s; 51 struct zx_a_Metadata_s; 52 struct zx_sa_EncryptedAssertion_s; 53 struct zx_sa_Assertion_s; 54 struct zx_sa_NameID_s; 55 struct zx_sa_Issuer_s; 56 struct zx_sa_Attribute_s; 57 struct zx_sa_EncryptedID_s; 58 struct zx_sa_Subject_s; 59 struct zx_sa_AuthnStatement_s; 60 struct zx_sa_AttributeStatement_s; 61 struct zx_sec_Token_s; 62 struct zx_sp_Response_s; 63 struct zx_sp_Status_s; 64 struct zx_sp_NewEncryptedID_s; 65 struct zx_sp_AuthnRequest_s; 66 struct zx_sp_ArtifactResolve_s; 67 struct zx_sp_LogoutRequest_s; 68 struct zx_sp_LogoutResponse_s; 69 struct zx_sp_ManageNameIDRequest_s; 70 struct zx_sp_ManageNameIDResponse_s; 71 struct zx_sp_NameIDMappingRequest_s; 72 struct zx_sp_NameIDMappingResponse_s; 73 struct zx_sa11_Assertion_s; 74 struct zx_sa11_Assertion_s; 75 struct zx_ff12_Assertion_s; 76 struct zx_ff12_Assertion_s; 77 struct zx_ds_Signature_s; 78 struct zx_ds_Reference_s; 79 struct zx_ds_KeyInfo_s; 80 struct zx_xenc_EncryptedData_s; 81 struct zx_xenc_EncryptedKey_s; 82 struct zx_md_KeyDescriptor_s; 83 struct zx_md_ArtifactResolutionService_s; 84 struct zx_md_SingleSignOnService_s; 85 struct zx_md_SingleLogoutService_s; 86 struct zx_md_ManageNameIDService_s; 87 struct zx_md_AssertionConsumerService_s; 88 struct zx_md_IDPSSODescriptor_s; 89 struct zx_md_SPSSODescriptor_s; 90 struct zx_md_EntityDescriptor_s; 91 struct zx_xasa_XACMLAuthzDecisionStatement_s; 92 struct zx_xac_Response_s; 93 struct zx_xac_Attribute_s; 94 struct zx_xasp_XACMLAuthzDecisionQuery_s; 95 struct zx_xaspcd1_XACMLAuthzDecisionQuery_s; 96 struct zx_as_SASLRequest_s; 97 struct zx_di_Query_s; 98 struct zx_di_QueryResponse_s; 99 struct zx_im_IdentityMappingRequest_s; 100 struct zx_im_IdentityMappingResponse_s; 101 struct zx_ps_AddEntityRequest_s; 102 struct zx_ps_AddEntityResponse_s; 103 struct zx_ps_ResolveIdentifierRequest_s; 104 struct zx_ps_ResolveIdentifierResponse_s; 105 struct zx_lu_Status_s; 106 struct zx_wsu_Timestamp_s; 107 struct zx_wsse_Security_s; 108 struct zx_wsse_SecurityTokenReference_s; 109 struct zx_dap_Select_s; 110 struct zx_dap_QueryItem_s; 111 struct zx_dap_TestOp_s; 112 struct zx_dap_TestItem_s; 113 struct zx_dap_ResultQuery_s; 114 struct zx_dap_Subscription_s; 115 struct zx_dap_Query_s; 116 #endif 117 118 /* zxidsimp */ 119 120 ZXID_DECL int zxid_decode_ssoreq(zxid_conf* cf, zxid_cgi* cgi); 121 ZXID_DECL char* zxid_simple_show_page(zxid_conf* cf, struct zx_str* ss, int c_mask, int h_mask, char* rets, char* cont_type, int* res_len, int auto_flags, const char* status); 122 ZXID_DECL char* zxid_simple_show_json(zxid_conf* cf, const char* json, int* res_len, int auto_flags, const char* status); 123 124 /* zxidmeta */ 125 126 #ifdef USE_OPENSSL 127 ZXID_DECL struct zx_ds_KeyInfo_s* zxid_key_info(zxid_conf* cf, struct zx_elem_s* father, X509* x); 128 ZXID_DECL struct zx_md_KeyDescriptor_s* zxid_key_desc(zxid_conf* cf, struct zx_elem_s* father, char* use, X509* cert); 129 #endif 130 ZXID_DECL struct zx_md_ArtifactResolutionService_s* zxid_ar_desc(zxid_conf* cf, struct zx_elem_s* father, char* binding, char* loc, char* resp_loc); 131 ZXID_DECL struct zx_md_SingleSignOnService_s* zxid_sso_desc(zxid_conf* cf, struct zx_elem_s* father, char* binding, char* loc, char* resp_loc); 132 ZXID_DECL struct zx_md_SingleLogoutService_s* zxid_slo_desc(zxid_conf* cf, struct zx_elem_s* father, char* binding, char* loc, char* resp_loc); 133 ZXID_DECL struct zx_md_ManageNameIDService_s* zxid_mni_desc(zxid_conf* cf, struct zx_elem_s* father, char* binding, char* loc, char* resp_loc); 134 ZXID_DECL struct zx_md_AssertionConsumerService_s* zxid_ac_desc(zxid_conf* cf, struct zx_elem_s* father, char* binding, char* loc, char* index); 135 ZXID_DECL struct zx_md_IDPSSODescriptor_s* zxid_idp_sso_desc(zxid_conf* cf, struct zx_elem_s* father); 136 ZXID_DECL struct zx_md_SPSSODescriptor_s* zxid_sp_sso_desc(zxid_conf* cf, struct zx_elem_s* father); 137 138 /* zxidconf */ 139 140 ZXID_DECL struct zxid_map* zxid_load_map(zxid_conf* cf, struct zxid_map* map, char* v); 141 ZXID_DECL void zxid_free_map(struct zxid_conf *cf, struct zxid_map *map); 142 ZXID_DECL struct zxid_map* zxid_load_unix_grp_az_map(zxid_conf* cf, struct zxid_map* map, char* v); 143 ZXID_DECL struct zxid_need* zxid_is_needed(struct zxid_need* need, const char* name); 144 ZXID_DECL struct zxid_map* zxid_find_map(struct zxid_map* map, const char* name); 145 ZXID_DECL int zxid_unix_grp_az_check(zxid_conf* cf, zxid_ses* ses, int gid); 146 ZXID_DECL struct zxid_cstr_list* zxid_load_cstr_list(zxid_conf* cf, struct zxid_cstr_list* l, char* p); 147 ZXID_DECL void zxid_free_cstr_list(struct zxid_conf *cf, struct zxid_cstr_list *l); 148 ZXID_DECL struct zxid_cstr_list* zxid_find_cstr_list(struct zxid_cstr_list* lst, const char* name); 149 ZXID_DECL struct zxid_cstr_list* zxid_find_at_multival_on_cstr_list(struct zxid_cstr_list* cs, struct zxid_attr* at); 150 ZXID_DECL struct zxid_attr* zxid_find_at(struct zxid_attr* pool, const char* name); 151 ZXID_DECL struct zxid_attr* zxid_new_at(zxid_conf* cf, struct zxid_attr* at, int name_len, char* name, int val_len, char* val, char* lk); 152 ZXID_DECL void zxid_free_at(struct zxid_conf *cf, struct zxid_attr *attr); 153 ZXID_DECL char* zxid_grab_domain_name(zxid_conf* cf, const char* url); 154 ZXID_DECL struct zxid_need* zxid_load_need(zxid_conf* cf, struct zxid_need* need, char* v); 155 ZXID_DECL void zxid_free_need(struct zxid_conf *cf, struct zxid_need *need); 156 ZXID_DECL struct zxid_atsrc* zxid_load_atsrc(zxid_conf* cf, struct zxid_atsrc* atsrc, char* v); 157 ZXID_DECL void zxid_free_atsrc(struct zxid_conf *cf, struct zxid_atsrc *src); 158 ZXID_DECL struct zxid_obl_list* zxid_load_obl_list(zxid_conf* cf, struct zxid_obl_list* ol, char* obl); 159 ZXID_DECL void zxid_free_obl_list(struct zxid_conf* cf, struct zxid_obl_list* ol); 160 ZXID_DECL struct zxid_obl_list* zxid_find_obl_list(struct zxid_obl_list* obl, const char* name); 161 ZXID_DECL char* zxid_mk_jwks(zxid_conf* cf); 162 ZXID_DECL char* zxid_read_cert_pem(zxid_conf* cf, char* name, int siz, char* buf); 163 164 /* zxiduser */ 165 166 ZXID_DECL zxid_nid* zxid_parse_mni(zxid_conf* cf, char* buf, char** pmniptr); 167 168 /* zxidlib */ 169 170 ZXID_DECL struct zx_str* zxid_lecp_check(zxid_conf* cf, zxid_cgi* cgi); 171 ZXID_DECL struct zx_str* zxid_cdc_read(zxid_conf* cf, zxid_cgi* cgi); 172 ZXID_DECL int zxid_cdc_check(zxid_conf* cf, zxid_cgi* cgi); 173 174 ZXID_DECL int zxid_chk_sig(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_elem_s* elem, struct zx_ds_Signature_s* sig, struct zx_sa_Issuer_s* issue_ent, struct zx_ns_s* pop_seen, const char* lk); 175 176 ZXID_DECL struct zx_str* zxid_map_val_ss(zxid_conf* cf, zxid_ses* ses, zxid_entity* meta, struct zxid_map* map, const char* atname, struct zx_str* val); 177 ZXID_DECL struct zx_str* zxid_map_val(zxid_conf* cf, zxid_ses* ses, zxid_entity* meta, struct zxid_map* map, const char* atname, const char* val); 178 179 ZXID_DECL struct zx_str* zxid_get_affil_and_sp_name_buf(zxid_conf* cf, zxid_entity* meta, char* sp_name_buf); 180 ZXID_DECL zxid_nid* zxid_get_fed_nameid(zxid_conf* cf, struct zx_str* prvid, struct zx_str* affil, const char* uid, const char* sp_name_buf, int allow_create, int want_transient, struct timeval* srcts, struct zx_str* id, char* logop); 181 182 /* zxidloc */ 183 184 ZXID_DECL struct zx_str* zxid_idp_loc_raw(zxid_conf* cf, zxid_cgi* cgi, zxid_entity* idp_meta, int svc_type, char* binding, int req); 185 ZXID_DECL struct zx_str* zxid_idp_loc(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, zxid_entity* idp_meta, int svc_type, char* binding); 186 187 ZXID_DECL struct zx_str* zxid_sp_loc_by_index_raw(zxid_conf* cf, zxid_cgi* cgi, zxid_entity* sp_meta, int svc_type,struct zx_str* ix, int* binding); 188 ZXID_DECL struct zx_str* zxid_sp_loc_raw(zxid_conf* cf, zxid_cgi* cgi, zxid_entity* sp_meta, int svc_type, char* binding, int req); 189 ZXID_DECL struct zx_str* zxid_sp_loc(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, zxid_entity* sp_meta, int svc_type, char* binding); 190 191 /* zxidspx */ 192 193 ZXID_DECL zxid_a7n* zxid_dec_a7n(zxid_conf* cf, zxid_a7n* a7n, struct zx_sa_EncryptedAssertion_s* enca7n); 194 ZXID_DECL struct zx_str* zxid_sp_dispatch(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses); 195 ZXID_DECL int zxid_sp_soap_parse(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, int len, char* buf); 196 ZXID_DECL int zxid_sp_soap_dispatch(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_root_s* r); 197 198 /* zxididpx */ 199 200 ZXID_DECL struct zx_str* zxid_idp_dispatch(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, int chk_dup); 201 202 /* zxidpsso - IdP side of SSO: generating A7N */ 203 204 ZXID_DECL void zxid_mk_transient_nid(zxid_conf* cf, zxid_nid* nameid, const char* sp_name_buf, const char* uid); 205 ZXID_DECL int zxid_anoint_a7n(zxid_conf* cf, int sign, zxid_a7n* a7n, struct zx_str* issued_to, const char* lk, const char* uid, struct zx_str** ret_logpath); 206 ZXID_DECL struct zx_str* zxid_anoint_sso_resp(zxid_conf* cf, int sign, struct zx_sp_Response_s* resp, struct zx_sp_AuthnRequest_s* ar); 207 ZXID_DECL zxid_a7n* zxid_sso_issue_a7n(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct timeval* srcts, zxid_entity* sp_meta, struct zx_str* acsurl, zxid_nid** nameid, char* logop, struct zx_sp_AuthnRequest_s* ar); 208 ZXID_DECL void zxid_gen_boots(zxid_conf* cf, zxid_ses* ses, struct zx_sa_AttributeStatement_s* father, char* path, int add_bs_lvl); 209 ZXID_DECL zxid_a7n* zxid_mk_usr_a7n_to_sp(zxid_conf* cf, zxid_ses* ses, zxid_nid* nameid, zxid_entity* sp_meta, const char* sp_name_buf, int add_bs_lvl); 210 ZXID_DECL zxid_nid* zxid_check_fed(zxid_conf* cf, struct zx_str* affil, const char* uid, char allow_create, struct timeval* srcts, struct zx_str* issuer, struct zx_str* req_id, const char* sp_name_buf); 211 ZXID_DECL int zxid_add_fed_tok2epr(zxid_conf* cf, zxid_ses* ses, zxid_epr* epr, int add_bs_lvl, char* logop); 212 ZXID_DECL struct zx_str* zxid_idp_sso(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_sp_AuthnRequest_s* ar); 213 ZXID_DECL struct zx_as_SASLResponse_s* zxid_idp_as_do(zxid_conf* cf, struct zx_as_SASLRequest_s* req); 214 215 /* zxidsso - SP side of SSO: consuming A7N */ 216 217 ZXID_DECL int zxid_pick_sso_profile(zxid_conf* cf, zxid_cgi* cgi, zxid_entity* idp_met); 218 ZXID_DECL void zxid_sso_set_relay_state_to_return_to_this_url(zxid_conf* cf, zxid_cgi* cgi); 219 ZXID_DECL struct zx_str* zxid_start_sso_location(zxid_conf* cf, zxid_cgi* cgi); 220 ZXID_DECL int zxid_sp_sso_finalize(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, zxid_a7n* a7n, struct zx_ns_s* pop_seen); 221 ZXID_DECL int zxid_sp_anon_finalize(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses); 222 223 ZXID_DECL int zxid_validate_cond(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, zxid_a7n* a7n, struct zx_str* myentid, struct timeval* ourts, char** err); 224 225 /* zxidslo */ 226 227 ZXID_DECL struct zx_str* zxid_slo_resp_redir(zxid_conf* cf, zxid_cgi* cgi, struct zx_sp_LogoutRequest_s* req); 228 ZXID_DECL int zxid_sp_slo_do(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_sp_LogoutRequest_s* req); 229 ZXID_DECL int zxid_idp_slo_do(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_sp_LogoutRequest_s* req); 230 231 /* zxidmni */ 232 233 ZXID_DECL struct zx_sp_ManageNameIDResponse_s* zxid_mni_do(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_sp_ManageNameIDRequest_s* mni); 234 ZXID_DECL struct zx_str* zxid_mni_do_ss(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, struct zx_sp_ManageNameIDRequest_s* mni, struct zx_str* loc); 235 236 /* zxidpep */ 237 238 ZXID_DECL char* zxid_pep_az_soap_pepmap(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, const char* pdp_url, struct zxid_map* pepmap, const char* lk); 239 ZXID_DECL char* zxid_pep_az_soap(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, const char* pdp_url); 240 241 ZXID_DECL char* zxid_pep_az_base_soap_pepmap(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, const char* pdp_url, struct zxid_map* pepmap); 242 ZXID_DECL char* zxid_pep_az_base_soap(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, const char* pdp_url); 243 244 /* zxidpdp */ 245 246 ZXID_DECL int zxid_localpdp(zxid_conf* cf, zxid_ses* ses); 247 ZXID_DECL char* zxid_simple_ab_pep(zxid_conf* cf, zxid_ses* ses, int* res_len, int auto_flags); 248 249 /* zxidmk */ 250 251 ZXID_DECL struct zx_sp_AuthnRequest_s* zxid_mk_authn_req(zxid_conf* cf, zxid_cgi* cgi); 252 ZXID_DECL struct zx_sp_ArtifactResolve_s* zxid_mk_art_deref(zxid_conf* cf, struct zx_elem_s* father, zxid_entity* idp_meta, const char* artifact); 253 254 ZXID_DECL struct zx_sa_EncryptedID_s* zxid_mk_enc_id(zxid_conf* cf, struct zx_elem_s* father, zxid_nid* nid, zxid_entity* meta); 255 ZXID_DECL struct zx_sa_EncryptedAssertion_s* zxid_mk_enc_a7n(zxid_conf* cf, struct zx_elem_s* father, zxid_a7n* a7n, zxid_entity* meta); 256 257 ZXID_DECL struct zx_sp_LogoutRequest_s* zxid_mk_logout(zxid_conf* cf, zxid_nid* nid, struct zx_str* ses_ix, zxid_entity* idp); 258 ZXID_DECL struct zx_sp_LogoutResponse_s* zxid_mk_logout_resp(zxid_conf* cf, struct zx_sp_Status_s* st, struct zx_str* req_id); 259 ZXID_DECL struct zx_sp_ManageNameIDRequest_s* zxid_mk_mni(zxid_conf* cf, zxid_nid* nid, struct zx_str* new_nym, zxid_entity* idp); 260 ZXID_DECL struct zx_sp_ManageNameIDResponse_s* zxid_mk_mni_resp(zxid_conf* cf, struct zx_sp_Status_s* st, struct zx_str* req_id); 261 262 ZXID_DECL zxid_a7n* zxid_mk_a7n(zxid_conf* cf, struct zx_str* audience, struct zx_sa_Subject_s* subj, struct zx_sa_AuthnStatement_s* an_stmt, struct zx_sa_AttributeStatement_s* at_stmt); 263 ZXID_DECL struct zx_sa_Subject_s* zxid_mk_subj(zxid_conf* cf, struct zx_elem_s* father, zxid_entity* sp_meta, zxid_nid* nid); 264 ZXID_DECL struct zx_sa_AuthnStatement_s* zxid_mk_an_stmt(zxid_conf* cf, zxid_ses* ses, struct zx_elem_s* father, const char* eid); 265 ZXID_DECL struct zx_sp_Response_s* zxid_mk_saml_resp(zxid_conf* cf, zxid_a7n* a7n, zxid_entity* enc_meta); 266 ZXID_DECL struct zx_xac_Response_s* zxid_mk_xacml_resp(zxid_conf* cf, char* decision); 267 ZXID_DECL struct zx_xac_Attribute_s* zxid_mk_xacml_simple_at(zxid_conf* cf, struct zx_elem_s* father, struct zx_str* atid, struct zx_str* attype, struct zx_str* atissuer, struct zx_str* atvalue); 268 ZXID_DECL struct zx_xac_Request_s* zxid_mk_xac_az(zxid_conf* cf, struct zx_elem_s* father, struct zx_xac_Attribute_s* subj, struct zx_xac_Attribute_s* rsrc, struct zx_xac_Attribute_s* act, struct zx_xac_Attribute_s* env); 269 ZXID_DECL struct zx_xasp_XACMLAuthzDecisionQuery_s* zxid_mk_az(zxid_conf* cf, struct zx_xac_Attribute_s* subj, struct zx_xac_Attribute_s* rsrc, struct zx_xac_Attribute_s* act, struct zx_xac_Attribute_s* env); 270 ZXID_DECL struct zx_xaspcd1_XACMLAuthzDecisionQuery_s* zxid_mk_az_cd1(zxid_conf* cf, struct zx_xac_Attribute_s* subj, struct zx_xac_Attribute_s* rsrc, struct zx_xac_Attribute_s* act, struct zx_xac_Attribute_s* env); 271 ZXID_DECL struct zx_sa_Attribute_s* zxid_mk_sa_attribute_ss(zxid_conf* cf, struct zx_elem_s* father, const char* name, const char* namfmt, struct zx_str* val); 272 ZXID_DECL struct zx_sa_Attribute_s* zxid_mk_sa_attribute(zxid_conf* cf, struct zx_elem_s* father, const char* name, const char* namfmt, const char* val); 273 274 /* zxidoauth */ 275 276 ZXID_DECL struct zx_str* zxid_sp_oauth2_dispatch(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses); 277 ZXID_DECL char* zxid_idp_oauth2_token_and_check_id(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses, int* res_len, int auto_flags); 278 ZXID_DECL struct zx_str* zxid_oauth2_az_server_sso(zxid_conf* cf, zxid_cgi* cgi, zxid_ses* ses); 279 280 /* zxidmkwsf */ 281 282 ZXID_DECL struct zx_di_Query_s* zxid_mk_di_query(zxid_conf* cf, struct zx_elem_s* father, const char* svc_type, const char* url, const char* di_opt, const char* action); 283 ZXID_DECL struct zx_a_Address_s* zxid_mk_addr(zxid_conf* cf, struct zx_elem_s* father, struct zx_str* url); 284 285 ZXID_DECL struct zx_dap_Select_s* zxid_mk_dap_select(zxid_conf* cf, struct zx_elem_s* father, char* dn, char* filter, char* attributes, int deref_aliases, int scope, int sizelimit, int timelimit, int typesonly); 286 ZXID_DECL struct zx_dap_QueryItem_s* zxid_mk_dap_query_item(zxid_conf* cf, struct zx_elem_s* father, struct zx_dap_Select_s* sel, char* objtype, char* predef, char* sort, char* changed_since, int incl_common_attrs, int offset, int count, char* setreq, char* setid, char* contingent_itemidref); 287 ZXID_DECL struct zx_dap_TestOp_s* zxid_mk_dap_testop(zxid_conf* cf, struct zx_elem_s* father, char* dn, char* filter, char* attributes, int deref_aliases, int scope, int sizelimit, int timelimit, int typesonly); 288 ZXID_DECL struct zx_dap_TestItem_s* zxid_mk_dap_test_item(zxid_conf* cf, struct zx_elem_s* father, struct zx_dap_TestOp_s* top, char* objtype, char* predef); 289 ZXID_DECL struct zx_dap_ResultQuery_s* zxid_mk_dap_resquery(zxid_conf* cf, struct zx_elem_s* father, struct zx_dap_Select_s* sel, char* objtype, char* predef, char* sort, char* changed_since, int incl_common_attr, char* contingent_itemidref); 290 ZXID_DECL struct zx_dap_Subscription_s* zxid_mk_dap_subscription(zxid_conf* cf, struct zx_elem_s* father, char* subsID, char* itemidref, struct zx_dap_ResultQuery_s* rq, char* aggreg, char* trig, char* starts, char* expires, int incl_data, char* admin_notif, char* notify_ref); 291 ZXID_DECL struct zx_dap_Query_s* zxid_mk_dap_query(zxid_conf* cf, struct zx_elem_s* father, struct zx_dap_TestItem_s* tis, struct zx_dap_QueryItem_s* qis, struct zx_dap_Subscription_s* subs); 292 293 /* zxidwsf */ 294 295 #define ZXID_N_WSF_SIGNED_HEADERS 40 /* Max number of signed SOAP headers. */ 296 297 ZXID_DECL int zxid_hunt_sig_parts(zxid_conf* cf, int n_refs, struct zxsig_ref* refs, struct zx_ds_Reference_s* sref, struct zx_e_Header_s* hdr, struct zx_e_Body_s* bdy); 298 ZXID_DECL int zxid_add_header_refs(zxid_conf* cf, int n_refs, struct zxsig_ref* refs, struct zx_e_Header_s* hdr); 299 ZXID_DECL void zxid_wsf_sign(zxid_conf* cf, int sign_flags, struct zx_wsse_Security_s* sec, struct zx_wsse_SecurityTokenReference_s* str, struct zx_e_Header_s* hdr, struct zx_e_Body_s* bdy); 300 ZXID_DECL int zxid_timestamp_chk(zxid_conf* cf, zxid_ses* ses, struct zx_wsu_Timestamp_s* ts, struct timeval* ourts, struct timeval* srcts, const char* ctlpt, const char* faultactor); 301 ZXID_DECL void zxid_attach_sol1_usage_directive(zxid_conf* cf, zxid_ses* ses, struct zx_e_Envelope_s* env, const char* attrid, const char* obl); 302 ZXID_DECL void zxid_add_action_from_body_child(zxid_conf* cf, zxid_ses* ses, struct zx_e_Envelope_s* env); 303 ZXID_DECL int zxid_query_ctlpt_pdp(zxid_conf* cf, zxid_ses* ses, const char* az_cred, struct zx_e_Envelope_s* env, const char* ctlpt, const char* faultparty, struct zxid_map* pepmap); 304 ZXID_DECL int zxid_eval_sol1(zxid_conf* cf, zxid_ses* ses, const char* obl, struct zxid_obl_list* req); 305 306 /* zxidwsc */ 307 308 ZXID_DECL struct zx_e_Envelope_s* zxid_add_env_if_needed(zxid_conf* cf, const char* enve); 309 ZXID_DECL struct zx_e_Envelope_s* zxid_wsc_call(zxid_conf* cf, zxid_ses* ses, zxid_epr* epr, struct zx_e_Envelope_s* env, char** ret_enve); 310 311 /* zxidepr */ 312 313 ZXID_DECL int zxid_cache_epr(zxid_conf* cf, zxid_ses* ses, zxid_epr* epr, int rank); 314 ZXID_DECL void zxid_snarf_eprs(zxid_conf* cf, zxid_ses* ses, zxid_epr* epr); 315 ZXID_DECL void zxid_snarf_eprs_from_ses(zxid_conf* cf, zxid_ses* ses); 316 317 /* zxiddi - Discovery Service */ 318 319 ZXID_DECL int zxid_idp_map_nid2uid(zxid_conf* cf, int len, char* uid, zxid_nid* nameid, struct zx_lu_Status_s** stp); 320 321 ZXID_DECL void zxid_di_set_rankKey_if_needed(zxid_conf* cf, struct zx_a_Metadata_s* md, int nth, struct dirent* de); 322 323 ZXID_DECL zxid_epr* zxid_di_sort_eprs(zxid_conf* cf, zxid_epr* epr); 324 325 ZXID_DECL struct zx_di_QueryResponse_s* zxid_di_query(zxid_conf* cf, zxid_ses* ses, struct zx_di_Query_s* req); 326 327 /* zxidim - Identity Mapping Service, Single Sign-On Service (SSOS) */ 328 329 ZXID_DECL struct zx_sp_Response_s* zxid_ssos_anreq(zxid_conf* cf, zxid_ses* ses, struct zx_sp_AuthnRequest_s* req); 330 ZXID_DECL struct zx_im_IdentityMappingResponse_s* zxid_imreq(zxid_conf* cf, zxid_ses* ses, struct zx_im_IdentityMappingRequest_s* req); 331 332 ZXID_DECL struct zx_sp_NameIDMappingResponse_s* zxid_nidmap_do(zxid_conf* cf, struct zx_sp_NameIDMappingRequest_s* req); 333 334 /* zxidps - People Service (and delegation) */ 335 336 ZXID_DECL struct zx_str* zxid_psobj_enc(zxid_conf* cf, struct zx_str* eid, const char* prefix, struct zx_str* psobj); 337 ZXID_DECL struct zx_str* zxid_psobj_dec(zxid_conf* cf, struct zx_str* eid, const char* prefix, struct zx_str* psobj); 338 339 ZXID_DECL struct zx_ps_AddEntityResponse_s* zxid_ps_addent_invite(zxid_conf* cf, zxid_ses* ses, struct zx_ps_AddEntityRequest_s* req); 340 ZXID_DECL struct zx_ps_ResolveIdentifierResponse_s* zxid_ps_resolv_id(zxid_conf* cf, zxid_ses* ses, struct zx_ps_ResolveIdentifierRequest_s* req); 341 342 /* zxidmda - Metadata authority */ 343 344 ZXID_DECL char* zxid_simple_md_authority(zxid_conf* cf, zxid_cgi* cgi, int* res_len, int auto_flags); 345 346 /* zxidcurl */ 347 348 ZXID_DECL const char* zxid_locate_soap_Envelope(const char* haystack); 349 350 #ifdef __cplusplus 351 } // extern "C" 352 #endif 353 354 #endif /* _zxidpriv_h */ 355