#include <ORBitservices/CosNaming.h>
#include <assert.h>
#include <orbit/orbit.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "epp-client.h"
#include "epp_common.h"
|
#define | CLEAR_CERRNO(_cerrno) (_cerrno = 0) |
| Clear errno variable to non-error state.
|
|
|
static int | err_idl2epp (int idlcode) |
| Translate error code from IDL code to mod_eppd's code. More...
|
|
static int | err_epp2idl (int eppcode) |
| Translate error code from mod_eppd's code to IDL code. More...
|
|
char * | wrap_str (const char *str) |
| Function wraps strings passed from XML parser into strings accepted by CORBA. More...
|
|
static char * | wrap_str_upd (const char *str) |
| Function works the same way as wrap_str(), but empty strings are substituted by IDL-defined string with special meaning. More...
|
|
static char * | unwrap_str (void *pool, const char *str, int *cerrno) |
| Function unwraps strings passed through CORBA - empty strings are transformed to NULL strings. More...
|
|
static char * | unwrap_str_req (epp_context *epp_ctx, const char *str, int *cerrno, const char *id) |
| Does the same thing as unwrap_str() but in addition input string is required not to be empty. More...
|
|
ccReg_EppParams * | init_epp_params (const ccReg_TID login_id, const ccReg_TID request_id, const char *xml_in, const char *clTRID) |
|
int | epp_call_hello (epp_context *epp_ctx, service_EPP service, char **version, char **curdate) |
| Purpose of this function is to get version string of ccReg from corba server, which is used as part of server's name in <greeting> frame. More...
|
|
static corba_status | create_dummy_answer (epp_context *epp_ctx, epp_command_data *cdata) |
| This function creates answer even though it has not enough data for that from CORBA server. More...
|
|
static corba_status | epilog_success (epp_context *epp_ctx, epp_command_data *cdata, ccReg_Response *response) |
| This is common routine for all corba function calls (except hello call) executed at the end of command. More...
|
|
static int | epilog_failure (epp_context *epp_ctx, epp_command_data *cdata, ccReg_EPP_EppError *exc) |
| This function is called in case of invalid parameter which is signalled to module by throwing InvalidParam exception. More...
|
|
static corba_status | handle_exception (epp_context *epp_ctx, epp_command_data *cdata, CORBA_Environment *ev) |
| Common code for handling exceptions from corba calls. More...
|
|
static corba_status | epp_call_dummy (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| "dummy" call is dummy because it only retrieves unique svTRID and error message from central repository and by this way informs repository about the error. More...
|
|
corba_status | epp_call_login (epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_lang *lang, const char *certID, epp_command_data *cdata) |
| Call corba login function, which sets up a session variables. More...
|
|
corba_status | epp_call_logout (epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| Call corba logout function. More...
|
|
static corba_status | epp_call_check (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj) |
| EPP check for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter. More...
|
|
static epp_PrivacyPolicy | compute_epp_PrivacyPolicy (ccReg_PrivacyPolicy src) |
|
static ccReg_PrivacyPolicy | epp_PrivacyPolicy_to_ccReg_PrivacyPolicy (epp_PrivacyPolicy src) |
|
static int | info_contact_data_copy (epp_context *epp_ctx, epps_info_contact *info_contact, const ccReg_Contact *c_contact, CORBA_Environment *ev) |
| Helper function for copy contact data from corba to internal structure. More...
|
|
static ccReg_ControlledPrivacyDataMask | epp_controlled_privacy_data_mask_to_ccReg_ControlledPrivacyDataMask (epp_controlled_privacy_data_mask src) |
|
static corba_status | epp_call_info_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, ccReg_TID request_id, epp_command_data *cdata) |
| EPP info contact. More...
|
|
int | info_domain_data_copy (epp_context *epp_ctx, epps_info_domain *info_domain, ccReg_Domain *c_domain, CORBA_Environment *ev) |
| Helper function for copy domain data from corba to internal structure. More...
|
|
static corba_status | epp_call_info_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP info domain. More...
|
|
int | info_nsset_data_copy (epp_context *epp_ctx, epps_info_nsset *info_nsset, ccReg_NSSet *c_nsset, CORBA_Environment *ev) |
| Helper function for copy nsset data from corba to internal structure. More...
|
|
static corba_status | epp_call_info_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP info nsset. More...
|
|
int | info_keyset_data_copy (epp_context *epp_ctx, epps_info_keyset *info_keyset, ccReg_KeySet *c_keyset, CORBA_Environment *ev) |
| Helper function for copy keyset data from corba to internal structure. More...
|
|
static corba_status | epp_call_info_keyset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP info keyset. More...
|
|
static corba_status | epp_call_poll_req (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, ccReg_TID request_id, epp_command_data *cdata) |
| EPP poll request. More...
|
|
static corba_status | epp_call_poll_ack (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP poll acknowledge. More...
|
|
static corba_status | epp_call_create_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP create domain. More...
|
|
static ccReg_identtyp | convIdentType (epp_identType our_ident) |
| Convert our SSN enum to IDL's SSNtyp enum. More...
|
|
static corba_status | epp_call_create_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, ccReg_TID request_id, epp_command_data *cdata) |
| EPP create contact. More...
|
|
static corba_status | epp_call_create_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP create nsset. More...
|
|
static corba_status | epp_call_create_keyset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP create keyset. More...
|
|
static corba_status | epp_call_delete (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj) |
| EPP delete for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter. More...
|
|
static corba_status | epp_call_renew_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP renew domain. More...
|
|
static corba_status | epp_call_update_domain (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP update domain. More...
|
|
static corba_status | epp_call_update_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP update contact. More...
|
|
static corba_status | epp_call_update_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP update nsset. More...
|
|
static corba_status | epp_call_update_keyset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| EPP update keyset. More...
|
|
static corba_status | epp_call_transfer (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj) |
| EPP transfer for domain, contact, nsset and keyset is so similar that it is worth of having the code in one function and pass object type as parameter. More...
|
|
static corba_status | epp_call_list (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj) |
| List command for domain, contact and nsset is so similar that it is worth of having the code in one function and pass object type as parameter. More...
|
|
static corba_status | epp_call_sendauthinfo (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, epp_object_type obj) |
| SendAuthInfo command. More...
|
|
static corba_status | epp_call_creditinfo (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| Retrieve information about available credit of registrar. More...
|
|
static corba_status | epp_call_test_nsset (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| Issue technical test on nsset. More...
|
|
static corba_status | epp_call_info (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata, ccReg_InfoType c_infotype) |
| Info functions handler. More...
|
|
static corba_status | epp_call_getInfoResults (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| Get results of info search. More...
|
|
corba_status | epp_call_cmd (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata) |
| Call generic command corba handler which decides what to do on the basis of cdata content. More...
|
|
void | epp_call_CloseSession (epp_context *epp_ctx, service_EPP service, unsigned long long loginid) |
| Let the CR know that client has closed tcp session. More...
|
|
Corba component is used for communication between apache module and central repository.
Input are self-descriptive data stored in structure ussually called cdata. Output data are returned via the same structure. Purpose of this module is to hide the complexity of communication behind simple API defined in epp-client.h. The function names are analogical to names defined in EPP protocol standard.
◆ convIdentType()
◆ create_dummy_answer()
◆ epilog_failure()
This function is called in case of invalid parameter which is signalled to module by throwing InvalidParam exception.
- Parameters
-
epp_ctx | Epp context. |
cdata | EPP data. |
exc | Data of thrown exception. |
- Returns
- 0 if successful, 1 if required parameter is missing, 2 if malloc failed.
References CLEAR_CERRNO, epp_malloc(), err_idl2epp(), epp_command_data::errors, epp_command_data::msg, epp_command_data::noresdata, epp_context::pool, epp_error::position, q_add(), epp_command_data::rc, epp_error::reason, epp_error::spec, epp_command_data::svTRID, and unwrap_str_req().
Referenced by handle_exception().
◆ epilog_success()
◆ epp_call_check()
EPP check for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request_id |
cdata | Data from xml request. |
obj | Object type (see epp_object_type) |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_CloseSession()
◆ epp_call_cmd()
Call generic command corba handler which decides what to do on the basis of cdata content.
login, logout commands are not handled by this function. They are rather handled by dedicated functions epp_call_login() and epp_call_logout(). For all other commands use this function.
- Parameters
-
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Session identifier |
request_id | fred-logd request ID |
cdata | Data from parsed xml command. |
- Returns
- Status.
References EPP_DEBUG, epplog(), and epp_command_data::type.
◆ epp_call_create_contact()
EPP create contact.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epps_create_contact::authInfo, convIdentType(), CORBA_INT_ERROR, epp_command_data::data, epps_create_contact::email, epps_create_contact::fax, epps_create_contact::id, epps_create_contact::ident, epps_create_contact::identtype, epps_create_contact::notify_email, epps_create_contact::vat, epps_create_contact::voice, wrap_str(), and epp_command_data::xml_in.
◆ epp_call_create_domain()
◆ epp_call_create_keyset()
EPP create keyset.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epp_dnskey::alg, epps_create_keyset::authInfo, CORBA_INT_ERROR, epp_command_data::data, epp_dnskey::flags, epps_create_keyset::id, epps_create_keyset::keys, epp_dnskey::protocol, epp_dnskey::public_key, q_content, q_foreach, q_length, epps_create_keyset::tech, wrap_str(), and epp_command_data::xml_in.
◆ epp_call_create_nsset()
EPP create nsset.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epp_ns::addr, epps_create_nsset::authInfo, CORBA_INT_ERROR, epp_command_data::data, epps_create_nsset::id, epp_ns::name, epps_create_nsset::ns, q_content, q_foreach, q_length, epps_create_nsset::tech, wrap_str(), and epp_command_data::xml_in.
◆ epp_call_creditinfo()
Retrieve information about available credit of registrar.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_delete()
EPP delete for domain, nsset and contact is so similar that it is worth of having the code in one function and pass object type as parameter.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
obj | Object type (see epp_object_type) |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_dummy()
"dummy" call is dummy because it only retrieves unique svTRID and error message from central repository and by this way informs repository about the error.
This call is used for failures detected already on side of mod_eppd.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, create_dummy_answer(), EPP_ERROR, epplog(), err_epp2idl(), epp_command_data::errors, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, q_content, q_foreach, q_length, raised_exception, epp_command_data::rc, RETR_SLEEP, epp_error::spec, and wrap_str().
◆ epp_call_getInfoResults()
Get results of info search.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_hello()
Purpose of this function is to get version string of ccReg from corba server, which is used as part of server's name in <greeting> frame.
- Parameters
-
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
version | Output parameter version string. |
curdate | Output parameter current date. |
- Returns
- If successfull 1 and 0 if corba function call failed.
References CLEAR_CERRNO, CORBA_ERROR, CORBA_INT_ERROR, CORBA_OK, EPP_DEBUG, EPP_ERROR, epplog(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, raised_exception, RETR_SLEEP, and unwrap_str().
Referenced by epp_process_connection().
◆ epp_call_info()
Info functions handler.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
c_infotype | Type of info query. |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_info_contact()
◆ epp_call_info_domain()
◆ epp_call_info_keyset()
◆ epp_call_info_nsset()
◆ epp_call_list()
List command for domain, contact and nsset is so similar that it is worth of having the code in one function and pass object type as parameter.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
obj | Object type (see epp_object_type). |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_login()
Call corba login function, which sets up a session variables.
- Parameters
-
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | If successfully logged in, the session identifier assigned by server will be stored in this parameter. |
request_id | fred-logd request ID |
lang | If successfully logged in, the selected language will be stored in this parameter. |
fingerprint | Fingerprint of client's certificate. |
cdata | Data from parsed xml command. |
- Returns
- Status.
References epps_login::clID, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, EPP_DEBUG, epplog(), epps_login::lang, epps_login::newPW, epp_command_data::noresdata, epps_login::pw, wrap_str(), and epp_command_data::xml_in.
Referenced by call_login().
◆ epp_call_logout()
◆ epp_call_poll_ack()
◆ epp_call_poll_req()
EPP poll request.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_renew_domain()
◆ epp_call_sendauthinfo()
◆ epp_call_test_nsset()
Issue technical test on nsset.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epp_command_data::data, and epp_command_data::xml_in.
◆ epp_call_transfer()
◆ epp_call_update_contact()
EPP update contact.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epps_update_contact::authInfo, epp_postalInfo::cc, epp_postalInfo::city, convIdentType(), epp_command_data::data, epps_update_contact::discl_update, epps_update_contact::email, epps_update_contact::fax, epps_update_contact::id, epps_update_contact::ident, epps_update_contact::identtype, epp_postalInfo::name, epps_update_contact::notify_email, epp_postalInfo::org, epp_postalInfo::pc, epps_update_contact::pi, q_content, q_foreach, q_length, epp_postalInfo::sp, epp_postalInfo::streets, epps_update_contact::vat, epps_update_contact::voice, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
◆ epp_call_update_domain()
EPP update domain.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- status.
References epps_update_domain::add_admin, epps_update_domain::authInfo, epp_command_data::data, epps_update_domain::extensions, epp_ext_item::extType, epps_update_domain::keyset, epps_update_domain::name, epps_update_domain::nsset, q_content, q_foreach, q_length, epps_update_domain::registrant, epps_update_domain::rem_admin, epps_update_domain::rem_tmpcontact, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
◆ epp_call_update_keyset()
EPP update keyset.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epps_update_keyset::add_dnskey, epps_update_keyset::add_tech, epp_dnskey::alg, epps_update_keyset::authInfo, epp_command_data::data, epp_dnskey::flags, epps_update_keyset::id, epp_dnskey::protocol, epp_dnskey::public_key, q_content, q_foreach, q_length, epps_update_keyset::rem_dnskey, epps_update_keyset::rem_tech, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
◆ epp_call_update_nsset()
EPP update nsset.
- Parameters
-
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
- Returns
- Status.
References epps_update_nsset::add_ns, epps_update_nsset::add_tech, epp_ns::addr, epps_update_nsset::authInfo, epp_command_data::data, epps_update_nsset::id, epp_ns::name, q_content, q_foreach, q_length, epps_update_nsset::rem_ns, epps_update_nsset::rem_tech, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
◆ err_epp2idl()
static int err_epp2idl |
( |
int |
eppcode | ) |
|
|
static |
◆ err_idl2epp()
static int err_idl2epp |
( |
int |
idlcode | ) |
|
|
static |
◆ handle_exception()
Common code for handling exceptions from corba calls.
- Parameters
-
epp_ctx | Epp context. |
cdata | Epp data. |
ev | Exception. |
- Returns
- Corba status.
References CLEAR_CERRNO, CORBA_INT_ERROR, CORBA_OK, create_dummy_answer(), epilog_failure(), EPP_ERROR, epplog(), IS_EPP_ERROR, IS_NO_MESSAGES, epp_command_data::msg, epp_command_data::rc, epp_command_data::svTRID, and unwrap_str_req().
Referenced by epp_call_dummy().
◆ info_contact_data_copy()
static int info_contact_data_copy |
( |
epp_context * |
epp_ctx, |
|
|
epps_info_contact * |
info_contact, |
|
|
const ccReg_Contact * |
c_contact, |
|
|
CORBA_Environment * |
ev |
|
) |
| |
|
static |
Helper function for copy contact data from corba to internal structure.
- Parameters
-
epp_ctx | Epp context |
info_contact | Destination contact data structure |
c_contact | Source contact data structure |
ev | Corba exception |
References epps_info_contact::authInfo, epp_postalInfo::cc, epp_postalInfo::city, CLEAR_CERRNO, epps_info_contact::clID, epps_info_contact::crDate, epps_info_contact::crID, epps_info_contact::discl, epps_info_contact::email, epp_malloc(), epps_info_contact::fax, epps_info_contact::handle, epps_info_contact::ident, ident_BIRTHDAY, ident_ICO, ident_MPSV, ident_OP, ident_PASSPORT, ident_UNKNOWN, epps_info_contact::identtype, epp_postalInfo::name, epps_info_contact::notify_email, epp_postalInfo::org, epp_postalInfo::pc, epps_info_contact::pi, epp_context::pool, q_add(), epps_info_contact::roid, epp_postalInfo::sp, epps_info_contact::status, epp_postalInfo::streets, epp_status::text, epps_info_contact::trDate, unwrap_str(), unwrap_str_req(), epps_info_contact::upDate, epps_info_contact::upID, epp_status::value, epps_info_contact::vat, and epps_info_contact::voice.
◆ info_domain_data_copy()
Helper function for copy domain data from corba to internal structure.
- Parameters
-
epp_ctx | Epp context |
info_domain | Destination domain data structure |
c_domain | Source domain data structure |
ev | Corba exception |
References epps_info_domain::admin, epps_info_domain::authInfo, CLEAR_CERRNO, epps_info_domain::clID, epps_info_domain::crDate, epps_info_domain::crID, epp_malloc(), epps_info_domain::exDate, epp_ext_item::ext, epp_ext_item::extType, epps_info_domain::handle, epps_info_domain::keyset, epps_info_domain::nsset, epp_context::pool, q_add(), epps_info_domain::registrant, epps_info_domain::roid, epps_info_domain::status, epp_status::text, epps_info_domain::tmpcontact, epps_info_domain::trDate, unwrap_str(), unwrap_str_req(), epps_info_domain::upDate, epps_info_domain::upID, and epp_status::value.
◆ info_keyset_data_copy()
Helper function for copy keyset data from corba to internal structure.
- Parameters
-
epp_ctx | Epp context |
info_keyset | Destination keyset data structure |
c_keyset | Source keyset data structure |
ev | Corba exception |
References epp_dnskey::alg, epps_info_keyset::authInfo, CLEAR_CERRNO, epps_info_keyset::clID, epps_info_keyset::crDate, epps_info_keyset::crID, epp_calloc(), epp_malloc(), epp_dnskey::flags, epps_info_keyset::handle, epps_info_keyset::keys, epp_context::pool, epp_dnskey::protocol, epp_dnskey::public_key, q_add(), epps_info_keyset::roid, epps_info_keyset::status, epps_info_keyset::tech, epp_status::text, epps_info_keyset::trDate, unwrap_str(), unwrap_str_req(), epps_info_keyset::upDate, epps_info_keyset::upID, and epp_status::value.
◆ info_nsset_data_copy()
Helper function for copy nsset data from corba to internal structure.
- Parameters
-
epp_ctx | Epp context |
info_nsset | Destination nsset data structure |
c_nsset | Source nsset data structure |
ev | Corba exception |
References epp_ns::addr, epps_info_nsset::authInfo, CLEAR_CERRNO, epps_info_nsset::clID, epps_info_nsset::crDate, epps_info_nsset::crID, epp_calloc(), epp_malloc(), epps_info_nsset::handle, epps_info_nsset::level, epp_ns::name, epps_info_nsset::ns, epp_context::pool, q_add(), epps_info_nsset::roid, epps_info_nsset::status, epps_info_nsset::tech, epp_status::text, epps_info_nsset::trDate, unwrap_str(), unwrap_str_req(), epps_info_nsset::upDate, epps_info_nsset::upID, and epp_status::value.
◆ unwrap_str()
static char* unwrap_str |
( |
void * |
pool, |
|
|
const char * |
str, |
|
|
int * |
cerrno |
|
) |
| |
|
static |
◆ unwrap_str_req()
static char* unwrap_str_req |
( |
epp_context * |
epp_ctx, |
|
|
const char * |
str, |
|
|
int * |
cerrno, |
|
|
const char * |
id |
|
) |
| |
|
static |
Does the same thing as unwrap_str() but in addition input string is required not to be empty.
If it is empty, an error message is logged.
- Parameters
-
epp_ctx | Epp context used for logging and memory allocation. |
str | Input string. |
cerrno | Set to 1 if malloc failed. |
id | Identifier of string used in error message. |
- Returns
- Output string.
References EPP_ERROR, epp_strdup(), epplog(), and epp_context::pool.
Referenced by epilog_failure(), epilog_success(), handle_exception(), info_contact_data_copy(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().
◆ wrap_str()
char* wrap_str |
( |
const char * |
str | ) |
|
Function wraps strings passed from XML parser into strings accepted by CORBA.
Null strings are transformed to empty strings. The resulting string must be freed with CORBA_free().
- Parameters
-
- Returns
- Output string.
Referenced by epp_call_create_contact(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_dummy(), epp_call_login(), epp_call_renew_domain(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().
◆ wrap_str_upd()
static char* wrap_str_upd |
( |
const char * |
str | ) |
|
|
static |
int epp_call_hello(epp_context *epp_ctx, service_EPP service, char **version, char **curdate)
Purpose of this function is to get version string of ccReg from corba server, which is used as part o...
Definition: epp-client.c:257
Definition: epp_common.h:500
gen_status
XML generator status values.
Definition: epp_gen.h:37
static const char * set_schema(cmd_parms *cmd, void *dummy, const char *schemaurl)
Handler for apache's configuration directive "EPPschema".
Definition: mod_eppd.c:2214
parser_status
EPP parser status values.
Definition: epp_parser.h:33
void epp_parser_request_cleanup(void *cdata_arg)
This will cleanup xpath context and parsed document tree.
Definition: epp_parser.c:587
@ GEN_EBUILD
Error when building xml document.
Definition: epp_gen.h:41
static const command_rec eppd_cmds[]
Structure containing mod_eppd's configuration directives and their handler references.
Definition: mod_eppd.c:2645
static const char * set_valid_resp(cmd_parms *cmd, void *dummy, int flag)
Handler for apache's configuration directive "EPPvalidResponse".
Definition: mod_eppd.c:2402
@ GEN_EINTERNAL
Malloc failure during response validation.
Definition: epp_gen.h:46
epp_red_command_type
Enumeration of all implemented EPP commands as defined in rfc.
Definition: epp_parser.h:62
void epp_call_CloseSession(epp_context *epp_ctx, service_EPP service, unsigned long long loginid)
Let the CR know that client has closed tcp session.
Definition: epp-client.c:5244
void * epp_parser_init(const char *url_schema)
This routine initializes libxml's parser, hash table for command recognition and parses xml schema,...
Definition: epp_parser.c:532
static APR_OPTIONAL_FN_TYPE(ssl_var_lookup)
SSL variable lookup function pointer used for client's PEM encoded certificate retrieval.
Definition: mod_eppd.c:343
int count
Optimization for length() function.
Definition: epp_common.h:311
static const char * set_loglevel(cmd_parms *cmd, void *dummy, const char *a1)
Handler for apache's configuration directive "EPPloglevel".
Definition: mod_eppd.c:2308
static int epp_request_loop(epp_context *epp_ctx, apr_bucket_brigade *bb, service_EPP *EPPservice, service_Logger *logger_service, eppd_server_conf *sc, unsigned long long *login_id_save, ccReg_TID *session_id_save)
Read and process EPP requests waiting in the queue.
Definition: mod_eppd.c:1138
#define q_foreach(_qhead)
Iterate through items in a list.
Definition: epp_common.h:328
@ EPP_INFO
This is the default log level.
Definition: epp_common.h:36
char * reason
Human readable reason of error.
Definition: epp_common.h:221
static const char * set_xml_in_out_log(cmd_parms *cmd, void *dummy, const char *value)
Handler for apache's configuration directive "EPPxmlinoutlog".
Definition: mod_eppd.c:152
epp_loglevel
Log levels used for logging to eppd log file.
Definition: epp_common.h:32
static apr_status_t epp_cleanup_request(void *cdata)
Cleanup routine, is merely wrapper around epp_parser_request_cleanup().
Definition: mod_eppd.c:580
char * epp_strdup(void *pool, const char *str)
Wrapper around apache's apr_strdup() which allocates memory from a pool.
Definition: mod_eppd.c:404
static void * get_corba_service(epp_context *epp_ctx, const char *name)
function for obtaining a reference to a CORBA object
Definition: mod_eppd.c:1613
@ PARSER_CMD_LOGOUT
Logout command.
Definition: epp_parser.h:35
gen_status epp_gen_greeting(void *pool, const char *svid, const char *date, const eppd_server_xml_conf *xml_schema, char **greeting)
Routine makes up epp greeting frame.
Definition: epp_gen.c:112
@ EPP_DEBUG
Contents of requests and responses are logged.
Definition: epp_common.h:37
char * epp_strcat(void *pool, const char *str1, const char *str2)
Wrapper around apache's apr_pstrcat() which concatenates strings.
Definition: mod_eppd.c:422
void * service_Logger
Reference to fred-logd CORBA service.
Definition: epp-client.h:66
@ GEN_ESCHEMA
Error when parsing xml schema used for validation.
Definition: epp_gen.h:47
#define MAX_FRAME_LENGTH
If client claims in EPP header that he is sending message which is longer than this number of bytes,...
Definition: mod_eppd.c:134
static int epp_request_contains_extra_addr_extension(epp_command_data *cdata)
Analyze parsed request data if contains extra address extension.
Definition: mod_eppd.c:877
@ PARSER_CMD_LOGIN
Login command.
Definition: epp_parser.h:34
@ EPP_WARNING
Errors which are not serious but should be logged.
Definition: epp_common.h:35
static void epp_init_child_hook(apr_pool_t *p, server_rec *s)
Init child hook is run everytime a new thread (or process) is started.
Definition: mod_eppd.c:1906
corba_status epp_call_login(epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_lang *lang, const char *certID, epp_command_data *cdata)
Call corba login function, which sets up a session variables.
Definition: epp-client.c:620
static const char * set_defer_errors(cmd_parms *cmd, void *dummy, const char *a1)
Handler for apache's configuration directive "EPPdeferErrors".
Definition: mod_eppd.c:2424
static int epp_read_request(epp_context *epp_ctx, char **content, unsigned *bytes)
Read epp request.
Definition: mod_eppd.c:597
static void * create_eppd_config(apr_pool_t *p, server_rec *s)
Initialization of of mod_eppd's configuration structure.
Definition: mod_eppd.c:2712
static apr_status_t epp_output_filter(ap_filter_t *f, apr_bucket_brigade *bb)
EPP output filter, which prefixes each response with length of the response.
Definition: mod_eppd.c:1861
EPP context is a group of variables used often together.
Definition: epp_common.h:45
void * epp_calloc(void *pool, unsigned size)
Wrapper around apache's apr_pcalloc() which allocates memory from a pool.
Definition: mod_eppd.c:386
static int epp_process_connection(conn_rec *c)
EPP Connection handler.
Definition: mod_eppd.c:1679
epp_lang
definition of languages (english is default)
Definition: epp_common.h:145
@ PARSER_NOT_COMMAND
Request is not a command nor hello frame.
Definition: epp_parser.h:46
@ CORBA_INT_ERROR
This should occur unusualy (e.g.
Definition: epp-client.h:58
void * data
Command data (Input + output parameters for all possible epp commands).
Definition: epp_common.h:935
epp_ext_type extType
Identifier of extension.
Definition: epp_common.h:502
#define EPP_LOGD_ERRLVL
Many errors in logging will be logged to epplog with this severity, If logging is mandatory,...
Definition: mod_eppd.c:141
Login parameters.
Definition: epp_common.h:546
@ PARSER_HELLO
Request is not command but <hello> frame this indicates that greeting should be generated.
Definition: epp_parser.h:42
#define EPP_HEADER_LENGTH
Length of EPP header containing message size.
Definition: mod_eppd.c:127
#define DEFER_MIN
Min and max time values (in msec) for deferring error responses
Definition: mod_eppd.c:123
void * conn
Connection handler.
Definition: epp_common.h:48
@ GEN_NOT_XML
Something what is not xml was generated.
Definition: epp_gen.h:45
static void register_hooks(apr_pool_t *p)
Registration of various hooks which the mod_eppd is interested in.
Definition: mod_eppd.c:2742
@ EPP_ERROR
Error caused usually by client, module is operational.
Definition: epp_common.h:34
static int epp_postconfig_hook(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
In post config hook is check consistency of configuration (required parameters, default values of par...
Definition: mod_eppd.c:1969
void * pool
Pool for allocations.
Definition: epp_common.h:47
@ CORBA_REMOTE_ERROR
Epp server is responding but the response is not valid.
Definition: epp-client.h:60
@ CORBA_ERROR
Corba function call failed (e.g.
Definition: epp-client.h:57
static const char * set_servername(cmd_parms *cmd, void *dummy, const char *a1)
Handler for apache's configuration directive "EPPservername".
Definition: mod_eppd.c:2362
Definition: epp_common.h:392
static int call_corba(epp_context *epp_ctx, service_EPP *service, service_Logger *service_log, epp_command_data *cdata, parser_status pstat, unsigned long long *loginid, ccReg_TID *const session_id, const ccReg_TID request_id, epp_lang *lang, unsigned int logd_mandatory)
Function calls command from corba backend.
Definition: mod_eppd.c:925
void epp_parser_init_cleanup(void *schema)
This will cleanup command hash table, libxml's parser and release parsed xml schema.
Definition: epp_parser.c:580
static const char * set_contact_mailing_address_extension(cmd_parms *cmd, void *dummy, int flag)
Handler for apache's configuration directive "EPPcontactMailingAddressExtension".
Definition: mod_eppd.c:2454
qitem * body
Items in a queue.
Definition: epp_common.h:312
gen_status epp_gen_response(epp_context *epp_ctx, int validate, void *schema, epp_lang lang, epp_command_data *cdata, char **response, qhead *valerr)
Generate command response in XML format.
Definition: epp_gen.c:1001
static const char * set_epp_object(cmd_parms *cmd, void *dummy, const char *obj_name)
Handler for apache's configuration directive "EPPObject".
Definition: mod_eppd.c:2132
static int call_login(epp_context *epp_ctx, service_EPP *service, epp_command_data *cdata, unsigned long long *loginid, const ccReg_TID request_id, epp_lang *lang, corba_status *cstat)
Function calls login over corba and before it computes fingerprint of client's SSL certificate.
Definition: mod_eppd.c:830
static int get_md5(char *cert_md5, char *pem)
Get md5 signature of given PEM encoded certificate.
Definition: mod_eppd.c:766
static apr_status_t epp_cleanup_xml(void *data)
Cleanup routine, is merely wrapper around epp_parser_init_cleanup().
Definition: mod_eppd.c:1952
parser_status epp_parse_command(epp_context *epp_ctx, int loggedin, void *schema, const char *request, unsigned bytes, epp_command_data **cdata_arg, const eppd_server_xml_conf *xml_schema, epp_red_command_type *cmd_type)
This is the main workhorse of parser component.
Definition: epp_parser.c:3378
@ PARSER_ESCHEMA
Error when parsing xml schema.
Definition: epp_parser.h:48
static void current_logtime(char *buf, int nbytes)
Get well formatted time used in log file as a timestamp.
Definition: mod_eppd.c:458
corba_status
Possible return values of functions from corba module.
Definition: epp-client.h:54
static int gen_response(epp_context *epp_ctx, service_EPP *service, epp_command_data *cdata, int validate, void *schema, epp_lang lang, char **response, gen_status *gstat, qhead *valerr)
Function generates XML response.
Definition: mod_eppd.c:1067
void * epp_malloc(void *pool, unsigned size)
Allocate memory from memory pool.
char * value
Client provided input which caused the error.
Definition: epp_common.h:206
@ GEN_EWRITER
Could not create xml writer.
Definition: epp_gen.h:40
Queue structure used on countless places throughout the program.
Definition: epp_common.h:309
@ GEN_EBUFFER
Could not create xml buffer.
Definition: epp_gen.h:39
@ EPP_FATAL
Error, the module is not in operational state.
Definition: epp_common.h:33
The struct represents one epp error in ExtValue element.
Definition: epp_common.h:203
@ GEN_NOT_VALID
Response does not validate.
Definition: epp_gen.h:48
static const char * set_epp_protocol(cmd_parms *cmd, void *dummy, int flag)
Handler for apache's configuration directive "EPPprotocol".
Definition: mod_eppd.c:2096
@ PARSER_EINTERNAL
Internal parser error (e.g.
Definition: epp_parser.h:54
corba_status epp_call_logout(epp_context *epp_ctx, service_EPP service, unsigned long long *loginid, const ccReg_TID request_id, epp_command_data *cdata)
Call corba logout function.
Definition: epp-client.c:715
module AP_MODULE_DECLARE_DATA eppd_module
eppd_module definition.
Definition: mod_eppd.c:2757
@ GEN_OK
No error appeared, everything was allright.
Definition: epp_gen.h:38
char * epp_sprintf(void *pool, const char *fmt,...)
Wrapper around apache's apr_pvsprintf() which prints formated string.
Definition: mod_eppd.c:439
void * service_EPP
Reference to EPP CORBA service.
Definition: epp-client.h:64
@ PARSER_NOT_VALID
Request does not validate.
Definition: epp_parser.h:37
This structure is central to the concept of the whole module.
Definition: epp_common.h:909
epp_command_type type
Identification of epp command.
Definition: epp_common.h:929
static const char * set_logger_object(cmd_parms *cmd, void *dummy, const char *obj_name)
Handler for apache's configuration directive "EPPlogdObject".
Definition: mod_eppd.c:2172
#define q_content(_qhead)
Get content of current item.
Definition: epp_common.h:321
corba_status epp_call_cmd(epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, epp_command_data *cdata)
Call generic command corba handler which decides what to do on the basis of cdata content.
Definition: epp-client.c:5031
@ PARSER_NOT_XML
Request is not xml.
Definition: epp_parser.h:47
void epplog(epp_context *epp_ctx, epp_loglevel level, const char *fmt,...)
Write a log message to eppd log file.
Definition: mod_eppd.c:475
static const char * set_epplog(cmd_parms *cmd, void *dummy, const char *a1)
Handler for apache's configuration directive "EPPlog".
Definition: mod_eppd.c:2269
@ CORBA_OK
No errors.
Definition: epp-client.h:55