fred-mod-eppd-2.17.0
|
Corba component is used for communication between apache module and central repository. More...
#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"
Macros | |
#define | CLEAR_CERRNO(_cerrno) (_cerrno = 0) |
Clear errno variable to non-error state. More... | |
Functions | |
static ccReg_Disclose | convDiscl (char flag) |
Function for conversion of our disclose flag to IDL's disclose flag. More... | |
static char | convDisclBack (ccReg_Disclose discl) |
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 corba_status | epp_call_info_contact (epp_context *epp_ctx, service_EPP service, unsigned long long loginid, const ccReg_TID request_id, int has_contact_mailing_address_extension, 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, const 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, int has_contact_mailing_address_extension, 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, int has_contact_mailing_address_extension, 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, int has_contact_mailing_address_extension, 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... | |
Variables | |
static int | error_translator [][2] |
Error code translation table. | |
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.
#define CLEAR_CERRNO | ( | _cerrno | ) | (_cerrno = 0) |
Clear errno variable to non-error state.
Referenced by epilog_failure(), epilog_success(), epp_call_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_hello(), epp_call_info_contact(), epp_call_list(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), handle_exception(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().
|
static |
Function for conversion of our disclose flag to IDL's disclose flag.
flag | Disclose flag to be converted. |
Referenced by epp_call_create_contact(), epp_call_create_domain(), epp_call_renew_domain(), epp_call_update_contact(), and epp_call_update_domain().
|
static |
Convert our SSN enum to IDL's SSNtyp enum.
our_ident | Our ssn's type. |
References ident_BIRTHDAY, ident_ICO, ident_MPSV, ident_OP, and ident_PASSPORT.
Referenced by epp_call_create_contact(), and epp_call_update_contact().
|
static |
This function creates answer even though it has not enough data for that from CORBA server.
This behaviour is in conflict with EPP standard, but it was enforced by users and administrators.
epp_ctx | Epp context. |
cdata | Epp data. |
References qhead::body, CORBA_ERROR, CORBA_INT_ERROR, qhead::count, qhead::cur, epp_strdup(), epp_command_data::errors, epp_command_data::msg, epp_command_data::noresdata, epp_context::pool, epp_command_data::rc, epp_command_data::svTRID, and epp_command_data::type.
Referenced by epp_call_check(), epp_call_dummy(), and handle_exception().
|
static |
This function is called in case of invalid parameter which is signalled to module by throwing InvalidParam exception.
epp_ctx | Epp context. |
cdata | EPP data. |
exc | Data of thrown exception. |
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().
|
static |
This is common routine for all corba function calls (except hello call) executed at the end of command.
Structure response is freed in any case (success or failure).
epp_ctx | Epp context. |
cdata | Command input and output data. |
response | Response returned from CORBA call. |
References CLEAR_CERRNO, CORBA_INT_ERROR, CORBA_OK, epp_command_data::msg, epp_command_data::rc, epp_command_data::svTRID, and unwrap_str_req().
Referenced by epp_call_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_login(), epp_call_logout(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().
|
static |
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.
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) |
References epp_avail::avail, epps_check::avails, CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, create_dummy_answer(), epp_command_data::data, epilog_success(), EPP_ERROR, epp_malloc(), epplog(), handle_exception(), epps_check::ids, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), q_content, q_foreach, q_length, raised_exception, epp_avail::reason, RETR_SLEEP, unwrap_str(), wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
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.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Login ID of client. |
References EPP_ERROR, epplog(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, and RETR_SLEEP.
Referenced by call_corba(), and epp_process_connection().
corba_status epp_call_cmd | ( | epp_context * | epp_ctx, |
service_EPP | service, | ||
unsigned long long | loginid, | ||
const ccReg_TID | request_id, | ||
int | has_contact_mailing_address_extension, | ||
epp_command_data * | cdata | ||
) |
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.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Session identifier |
request_id | fred-logd request ID |
has_contact_mailing_address_extension | given capability is enabled |
cdata | Data from parsed xml command. |
References CORBA_INT_ERROR, epp_call_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), epp_call_update_nsset(), EPP_DEBUG, epplog(), epp_command_data::noresdata, and epp_command_data::type.
Referenced by call_corba().
|
static |
EPP create contact.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
has_contact_mailing_address_extension | has to check presence of contact's mailing address |
cdata | Data from xml request. |
References epp_discl::addr, epps_create_contact::authInfo, epp_postalInfo::cc, epp_postalInfo::city, epp_mailingAddr::City, CLEAR_CERRNO, epp_command_data::clTRID, convDiscl(), convIdentType(), CORBA_INT_ERROR, CORBA_REMOTE_ERROR, epp_mailingAddr::CountryCode, epps_create_contact::crDate, epp_command_data::data, epps_create_contact::discl, epp_discl::email, epps_create_contact::email, epilog_success(), epp_ext_item::ext, epp_ext_item::ext_mailing_addr, epps_create_contact::extensions, epp_ext_item::extType, epp_discl::fax, epps_create_contact::fax, epp_discl::flag, handle_exception(), epps_create_contact::id, epp_discl::ident, epps_create_contact::ident, epps_create_contact::identtype, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_postalInfo::name, epp_discl::name, epps_create_contact::notify_email, epp_discl::notifyEmail, epp_postalInfo::org, epp_discl::org, epp_postalInfo::pc, epps_create_contact::pi, epp_mailingAddr::PostalCode, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, epp_postalInfo::sp, epp_mailingAddr::StateOrProvince, epp_mailingAddr::Street1, epp_mailingAddr::Street2, epp_mailingAddr::Street3, epp_postalInfo::streets, unwrap_str_req(), epp_discl::vat, epps_create_contact::vat, epp_discl::voice, epps_create_contact::voice, wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP create domain.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epps_create_domain::admin, epps_create_domain::authInfo, CLEAR_CERRNO, epp_command_data::clTRID, convDiscl(), CORBA_INT_ERROR, epps_create_domain::crDate, epp_command_data::data, epilog_success(), epps_create_domain::exDate, epp_ext_item::ext, epp_ext_item::ext_enum, epp_ext_enum::ext_enumval, epps_create_domain::extensions, epp_ext_item::extType, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, epps_create_domain::keyset, MAX_RETRIES, epps_create_domain::name, epps_create_domain::nsset, epps_create_domain::period, epp_ext_enum::publish, q_content, q_foreach, q_length, raised_exception, epps_create_domain::registrant, RETR_SLEEP, epps_create_domain::unit, unwrap_str_req(), wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP create keyset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epp_dnskey::alg, epps_create_keyset::authInfo, CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epps_create_keyset::crDate, epp_command_data::data, epilog_success(), epp_dnskey::flags, handle_exception(), epps_create_keyset::id, IS_NOT_COMM_FAILURE_EXCEPTION, epps_create_keyset::keys, MAX_RETRIES, epp_context::pool, epp_dnskey::protocol, epp_dnskey::public_key, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, epps_create_keyset::tech, unwrap_str(), wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP create nsset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epp_ns::addr, epps_create_nsset::authInfo, CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epps_create_nsset::crDate, epp_command_data::data, epilog_success(), handle_exception(), epps_create_nsset::id, IS_NOT_COMM_FAILURE_EXCEPTION, epps_create_nsset::level, MAX_RETRIES, epp_ns::name, epps_create_nsset::ns, epp_context::pool, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, epps_create_nsset::tech, unwrap_str(), wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
Retrieve information about available credit of registrar.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epp_zonecredit::credit, epp_command_data::data, epilog_success(), epp_malloc(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), raised_exception, RETR_SLEEP, unwrap_str(), epp_command_data::xml_in, epp_zonecredit::zone, and epps_creditInfo::zonecredits.
Referenced by epp_call_cmd().
|
static |
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.
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) |
References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
"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.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, create_dummy_answer(), epilog_success(), EPP_ERROR, epp_strcat(), epplog(), err_epp2idl(), epp_command_data::errors, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_command_data::noresdata, epp_context::pool, q_content, q_foreach, q_length, raised_exception, epp_command_data::rc, epp_error::reason, RETR_SLEEP, epp_error::spec, unwrap_str(), and wrap_str().
Referenced by epp_call_cmd().
|
static |
Get results of info search.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_list::handles, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), raised_exception, RETR_SLEEP, unwrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
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.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
version | Output parameter version string. |
curdate | Output parameter current date. |
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(), and epp_request_loop().
|
static |
Info functions handler.
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. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epps_info::count, epp_command_data::data, epilog_success(), epps_info::handle, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP info contact.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
has_contact_mailing_address_extension | has to return information about mailing address of contact |
cdata | Data from xml request. |
References epp_discl::addr, epps_info_contact::authInfo, epp_postalInfo::cc, epp_postalInfo::city, epp_mailingAddr::City, CLEAR_CERRNO, epps_info_contact::clID, epp_command_data::clTRID, CORBA_INT_ERROR, epp_mailingAddr::CountryCode, epps_info_contact::crDate, epps_info_contact::crID, epp_command_data::data, epps_info_contact::discl, epp_discl::email, epps_info_contact::email, epilog_success(), epp_malloc(), epp_ext_item::ext, epp_ext_item::ext_mailing_addr, epps_info_contact::extensions, epp_ext_item::extType, epp_discl::fax, epps_info_contact::fax, epp_discl::flag, epps_info_contact::handle, handle_exception(), epps_info_contact::id, epp_discl::ident, epps_info_contact::ident, ident_BIRTHDAY, ident_ICO, ident_MPSV, ident_OP, ident_PASSPORT, ident_UNKNOWN, epps_info_contact::identtype, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_postalInfo::name, epp_discl::name, epps_info_contact::notify_email, epp_discl::notifyEmail, epp_postalInfo::org, epp_discl::org, epp_postalInfo::pc, epps_info_contact::pi, epp_context::pool, epp_mailingAddr::PostalCode, q_add(), raised_exception, RETR_SLEEP, epps_info_contact::roid, epp_postalInfo::sp, epp_mailingAddr::StateOrProvince, epps_info_contact::status, epp_mailingAddr::Street1, epp_mailingAddr::Street2, epp_mailingAddr::Street3, 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, epp_discl::vat, epps_info_contact::vat, epp_discl::voice, epps_info_contact::voice, and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP info domain.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), info_domain_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epps_info_domain::name, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP info keyset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_info_keyset::id, info_keyset_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP info nsset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_info_nsset::id, info_nsset_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
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.
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). |
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_list::handles, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_context::pool, q_add(), raised_exception, RETR_SLEEP, unwrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
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 * | fingerprint, | ||
epp_command_data * | cdata | ||
) |
Call corba login function, which sets up a session variables.
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. |
References epps_login::clID, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), EPP_DEBUG, epplog(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, epps_login::lang, MAX_RETRIES, epps_login::newPW, epp_command_data::noresdata, epps_login::pw, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.
Referenced by call_login().
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.
epp_ctx | Epp context (pool, connection and session id). |
service | EPP service. |
loginid | Session identifier (may change inside). |
request_id | fred-logd request ID |
cdata | Data from parsed xml command. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epilog_success(), EPP_DEBUG, epplog(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_command_data::noresdata, raised_exception, RETR_SLEEP, and epp_command_data::xml_in.
Referenced by call_corba().
|
static |
EPP poll acknowledge.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epps_poll_ack::count, epp_command_data::data, epilog_success(), handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epps_poll_ack::msgid, epps_poll_ack::newmsgid, epp_context::pool, raised_exception, RETR_SLEEP, unwrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP poll request.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References CLEAR_CERRNO, epp_command_data::clTRID, CORBA_INT_ERROR, epps_poll_req::count, epp_command_data::data, epilog_success(), EPP_ERROR, epp_malloc(), epplog(), handle_exception(), epps_poll_req::hd, epps_poll_req::hdt, info_domain_data_copy(), info_keyset_data_copy(), info_nsset_data_copy(), IS_NOT_COMM_FAILURE_EXCEPTION, epps_poll_req::lc, MAX_RETRIES, epps_poll_req::msg, epps_poll_req::msgid, epp_context::pool, pt_delete_contact, pt_delete_domain, pt_delete_keyset, pt_delete_nsset, pt_expiration, pt_impexpiration, pt_impvalidation, pt_lowcredit, pt_outzone, pt_request_fee_info, pt_techcheck, pt_transfer_contact, pt_transfer_domain, pt_transfer_keyset, pt_transfer_nsset, pt_update_domain, pt_update_keyset, pt_update_nsset, pt_validation, q_add(), epps_poll_req::qdate, raised_exception, RETR_SLEEP, epps_poll_req::rfi, epps_poll_req::tc, epps_poll_req::type, unwrap_str(), epps_poll_req::upd, epps_poll_req::upk, epps_poll_req::upn, and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP renew domain.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References CLEAR_CERRNO, epp_command_data::clTRID, convDiscl(), CORBA_INT_ERROR, epps_renew::curExDate, epp_command_data::data, epilog_success(), epps_renew::exDate, epp_ext_item::ext, epp_ext_item::ext_enum, epp_ext_enum::ext_enumval, epps_renew::extensions, epp_ext_item::extType, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epps_renew::name, epps_renew::period, epp_ext_enum::publish, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, epps_renew::unit, unwrap_str_req(), wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
SendAuthInfo command.
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). |
References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_sendAuthInfo::id, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
Issue technical test on nsset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_test::id, IS_NOT_COMM_FAILURE_EXCEPTION, epps_test::level, MAX_RETRIES, epps_test::names, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
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.
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). |
References epps_transfer::authInfo, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_transfer::id, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, raised_exception, RETR_SLEEP, wrap_str(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP update contact.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
has_contact_mailing_address_extension | has to check presence of contact's mailing address |
cdata | Data from xml request. |
References epp_discl::addr, epps_update_contact::authInfo, epp_postalInfo::cc, epp_postalInfo::city, epp_mailingAddr::City, epp_command_data::clTRID, convDiscl(), convIdentType(), CORBA_INT_ERROR, epp_mailingAddr::CountryCode, epp_command_data::data, epps_update_contact::discl, epp_discl::email, epps_update_contact::email, epilog_success(), epp_ext_item::ext, epp_ext_item::ext_mailing_addr, epps_update_contact::extensions, epp_ext_item::extType, epp_discl::fax, epps_update_contact::fax, epp_discl::flag, handle_exception(), epps_update_contact::id, epp_discl::ident, epps_update_contact::ident, epps_update_contact::identtype, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_postalInfo::name, epp_discl::name, epps_update_contact::notify_email, epp_discl::notifyEmail, epp_postalInfo::org, epp_discl::org, epp_postalInfo::pc, epps_update_contact::pi, epp_mailingAddr::PostalCode, q_content, q_foreach, q_length, raised_exception, RETR_SLEEP, epp_postalInfo::sp, epp_mailingAddr::StateOrProvince, epp_mailingAddr::Street1, epp_mailingAddr::Street2, epp_mailingAddr::Street3, epp_postalInfo::streets, epp_discl::vat, epps_update_contact::vat, epp_discl::voice, epps_update_contact::voice, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP update domain.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epps_update_domain::add_admin, epps_update_domain::authInfo, epp_command_data::clTRID, convDiscl(), CORBA_INT_ERROR, epp_command_data::data, epilog_success(), epp_ext_item::ext, epp_ext_item::ext_enum, epp_ext_enum::ext_enumval, epps_update_domain::extensions, epp_ext_item::extType, handle_exception(), IS_NOT_COMM_FAILURE_EXCEPTION, epps_update_domain::keyset, MAX_RETRIES, epps_update_domain::name, epps_update_domain::nsset, epp_ext_enum::publish, q_content, q_foreach, q_length, raised_exception, epps_update_domain::registrant, epps_update_domain::rem_admin, epps_update_domain::rem_tmpcontact, RETR_SLEEP, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP update keyset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epps_update_keyset::add_dnskey, epps_update_keyset::add_tech, epp_dnskey::alg, epps_update_keyset::authInfo, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), epp_dnskey::flags, handle_exception(), epps_update_keyset::id, IS_NOT_COMM_FAILURE_EXCEPTION, MAX_RETRIES, epp_dnskey::protocol, epp_dnskey::public_key, q_content, q_foreach, q_length, raised_exception, epps_update_keyset::rem_dnskey, epps_update_keyset::rem_tech, RETR_SLEEP, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
EPP update nsset.
epp_ctx | Epp context. |
service | EPP service. |
loginid | Session identifier. |
request_id | fred-logd request ID |
cdata | Data from xml request. |
References epps_update_nsset::add_ns, epps_update_nsset::add_tech, epp_ns::addr, epps_update_nsset::authInfo, epp_command_data::clTRID, CORBA_INT_ERROR, epp_command_data::data, epilog_success(), handle_exception(), epps_update_nsset::id, IS_NOT_COMM_FAILURE_EXCEPTION, epps_update_nsset::level, MAX_RETRIES, epp_ns::name, q_content, q_foreach, q_length, raised_exception, epps_update_nsset::rem_ns, epps_update_nsset::rem_tech, RETR_SLEEP, wrap_str(), wrap_str_upd(), and epp_command_data::xml_in.
Referenced by epp_call_cmd().
|
static |
Translate error code from mod_eppd's code to IDL code.
eppcode | mod_eppd's code. |
References error_translator.
Referenced by epp_call_dummy().
|
static |
Translate error code from IDL code to mod_eppd's code.
idlcode | IDL code. |
References error_translator.
Referenced by epilog_failure().
|
static |
Common code for handling exceptions from corba calls.
epp_ctx | Epp context. |
cdata | Epp data. |
ev | Exception. |
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_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_delete(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_info(), epp_call_info_contact(), epp_call_info_domain(), epp_call_info_keyset(), epp_call_info_nsset(), epp_call_list(), epp_call_login(), epp_call_logout(), epp_call_poll_ack(), epp_call_poll_req(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().
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.
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::ext_enum, epp_ext_enum::ext_enumval, epps_info_domain::extensions, epp_ext_item::extType, epps_info_domain::handle, epps_info_domain::keyset, epps_info_domain::nsset, epp_context::pool, epp_ext_enum::publish, 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.
Referenced by epp_call_info_domain(), and epp_call_poll_req().
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.
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.
Referenced by epp_call_info_keyset(), and epp_call_poll_req().
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.
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.
Referenced by epp_call_info_nsset(), and epp_call_poll_req().
|
static |
Function unwraps strings passed through CORBA - empty strings are transformed to NULL strings.
pool | Memory pool to allocate memory from. |
str | Input string. |
cerrno | Set to 1 if malloc failed. |
References epp_strdup().
Referenced by epp_call_check(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_creditinfo(), epp_call_dummy(), epp_call_getInfoResults(), epp_call_hello(), epp_call_info_contact(), epp_call_list(), epp_call_poll_ack(), epp_call_poll_req(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().
|
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.
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. |
References EPP_ERROR, epp_strdup(), epplog(), epp_context::pool, and wrap_str().
Referenced by epilog_failure(), epilog_success(), epp_call_create_contact(), epp_call_create_domain(), epp_call_info_contact(), epp_call_renew_domain(), handle_exception(), info_domain_data_copy(), info_keyset_data_copy(), and info_nsset_data_copy().
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().
str | Input string. |
Referenced by epp_call_check(), epp_call_create_contact(), epp_call_create_domain(), epp_call_create_keyset(), epp_call_create_nsset(), epp_call_dummy(), epp_call_info(), epp_call_login(), epp_call_renew_domain(), epp_call_sendauthinfo(), epp_call_test_nsset(), epp_call_transfer(), epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), epp_call_update_nsset(), and unwrap_str_req().
|
static |
Function works the same way as wrap_str(), but empty strings are substituted by IDL-defined string with special meaning.
In update functions we need to distinguish between empty string and NULL.
str | Input string. |
Referenced by epp_call_update_contact(), epp_call_update_domain(), epp_call_update_keyset(), and epp_call_update_nsset().