diff --git a/ccsrc/security/src/security_externals.cc b/ccsrc/security/src/security_externals.cc index e129ea7a0b935d598f908f901948fb9210de8347..5150be2a4289e5358d8fb2b078ea3f30c228b722 100644 --- a/ccsrc/security/src/security_externals.cc +++ b/ccsrc/security/src/security_externals.cc @@ -129,7 +129,7 @@ OCTETSTRING LibSecurity__Hash::fx__hash(const OCTETSTRING& p_to_be_hashed, const return hash; } -OCTETSTRING LibSecurity__Signature::fx__enc__xmldsig__signed__info(const http__www__w3__org__2000__09__xmldsig::Signature_signedInfo& s) { // FIXME Use enc/dec TITAN function external function f_enc_value(in Value x) return bitstring with { extension "prototype(convert) encode(abc)" } +BITSTRING LibSecurity__Signature::fx__enc__xmldsig__signed__info(const http__www__w3__org__2000__09__xmldsig::Signature_signedInfo& s) { // FIXME Use enc/dec TITAN function external function f_enc_value(in Value x) return bitstring with { extension "prototype(convert) encode(abc)" } loggers::get_instance().log(">>> fx__enc__xmldsig__signed__info"); TTCN_EncDec::clear_error(); @@ -147,10 +147,10 @@ OCTETSTRING LibSecurity__Signature::fx__enc__xmldsig__signed__info(const http__w OCTETSTRING os = char2oct(CHARSTRING(str.c_str())); loggers::get_instance().log_msg("fx__enc__xmldsig__signed__info: os: ", os); - return os; + return oct2bit(os); } -OCTETSTRING LibSecurity__Signature::fx__enc__xmldsig(const http__www__w3__org__2000__09__xmldsig::Signature& s) { // FIXME Use enc/dec TITAN function external function f_enc_value(in Value x) return bitstring with { extension "prototype(convert) encode(abc)" } +BITSTRING LibSecurity__Signature::fx__enc__xmldsig(const http__www__w3__org__2000__09__xmldsig::Signature& s) { // FIXME Use enc/dec TITAN function external function f_enc_value(in Value x) return bitstring with { extension "prototype(convert) encode(abc)" } loggers::get_instance().log(">>> fx__enc__xmldsig"); TTCN_EncDec::clear_error(); @@ -168,10 +168,10 @@ OCTETSTRING LibSecurity__Signature::fx__enc__xmldsig(const http__www__w3__org__2 OCTETSTRING os = char2oct(CHARSTRING(str.c_str())); loggers::get_instance().log_msg("fx__enc__xmldsig: os: ", os); - return os; + return oct2bit(os); } -INTEGER LibSecurity__Signature::fx__dec__xmldsig(const BITSTRING& bs, http__www__w3__org__2000__09__xmldsig::Signature& s) { // FIXME Use enc/dec TITAN function external function f_enc_value(in Value x) return bitstring with { extension "prototype(convert) encode(abc)" } +INTEGER LibSecurity__Signature::fx__dec__xmldsig(BITSTRING& bs, http__www__w3__org__2000__09__xmldsig::Signature& s) { // FIXME Use enc/dec TITAN function external function f_enc_value(in Value x) return bitstring with { extension "prototype(convert) encode(abc)" } loggers::get_instance().log(">>> fx__dec__xmldsig"); std::string str(static_cast(oct2char(bit2oct(bs)))); diff --git a/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn b/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn index 767bc83a4c5a9b4cfe2e69a18acd50920571d223..9d0271ce2f0e121fb0888da37a9e8c7d31442b27 100644 --- a/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn +++ b/ttcn/LibHttp/ttcn/LibHttp_TestSystem.ttcn @@ -22,19 +22,18 @@ module LibHttp_TestSystem { inout HttpMessage; } - type component HttpComponent extends SelfSyncComp { // FIXME To be rename into HttpTest + type component HttpComponent extends SelfSyncComp { port HttpPort httpPort; port HttpPort httpPort_notif; // timers timer tc_wait := PX_TWAIT; timer tc_ac := PX_TAC; timer tc_noac := PX_TNOAC; - } // End of component HttpComponent - type component HttpTestAdapter { // FIXME To be rename into HttpTestSystem + type component HttpTestAdapter { port HttpPort httpPort; port HttpPort httpPort_notif; - } // End of component TestAdapter + } // End of component HttpTestAdapter } // End of module LibHttp_TestSystem diff --git a/ttcn/LibSecurity/ttcn/LibSecurity_Signature.ttcn b/ttcn/LibSecurity/ttcn/LibSecurity_Signature.ttcn index bf2b5e19fa689ab8e2ddacdb53930e94b3740b98..1d0b524d3d5608d1bb632a834533b2216396a553 100644 --- a/ttcn/LibSecurity/ttcn/LibSecurity_Signature.ttcn +++ b/ttcn/LibSecurity/ttcn/LibSecurity_Signature.ttcn @@ -2,15 +2,14 @@ module LibSecurity_Signature { import from http_www_w3_org_2000_09_xmldsig all; - external function fx_enc_xmldsig_signed_info(in Signature.signedInfo s) return octetstring; // Use encvalue decoration - //external function fx_enc_PullRequest_1(in PullRequest p_pull_request) return bitstring with {extension "prototype(convert) encode(XML)"} - //external function fx_dec_PullRequest_1(inout bitstring b, out PullRequest p_pull_request)return integer with {extension "prototype(sliding) decode(XML)"} + external function fx_enc_xmldsig_signed_info(in Signature.signedInfo s) return bitstring + with {extension "prototype(convert) encode(XML)"}; - external function fx_enc_xmldsig(in Signature s) return octetstring; // Use encvalue decoration - //external function fx_enc_PullRequest_1(in PullRequest p_pull_request) return bitstring with {extension "prototype(convert) encode(XML)"} - //external function fx_dec_PullRequest_1(inout bitstring b, out PullRequest p_pull_request)return integer with {extension "prototype(sliding) decode(XML)"} + external function fx_enc_xmldsig(in Signature s) return bitstring + with {extension "prototype(convert) encode(XML)"}; - external function fx_dec_xmldsig(in bitstring bs, out Signature s) return integer; + external function fx_dec_xmldsig(inout bitstring bs, out Signature s) return integer + with {extension "prototype(sliding) decode(XML)"}; /** * @desc Sign message