亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? client.cc

?? 開源CORBA中間件
?? CC
字號:
#include "account.h"#ifdef HAVE_UNISTD_H#include <unistd.h>#endifusing namespace std;CORBA::ORB_var orb;CORBA::Object_var securitymanager;SecurityLevel2::SecurityManager_var secman;intmain (int argc, char *argv[]) {  CORBA::ORB_var orb = CORBA::ORB_init (argc, argv, "mico-local-orb");  // Get SecurityManager  // The SecurityManager contains among others the Credentials  securitymanager = orb->resolve_initial_references ("SecurityManager");  secman = SecurityLevel2::SecurityManager::_narrow(securitymanager);  assert (!CORBA::is_nil (secman));  ////////////////////////////////////////////////////////////////////////////////////////////  //Mechanisms output  //to display all supported mechanisms availiable for orb	  Security::MechandOptionsList* p_mech_list = secman -> supported_mechanisms();  Security::MechandOptions mech_opt;    cout << "Mechanisms" << endl;  for (CORBA::ULong i=0; i < p_mech_list -> length(); i++) {    mech_opt = (*p_mech_list)[i];    cout << (char *)mech_opt.mechanism_type << endl;  }	    //setting of method (it is const)   Security::AuthenticationMethod our_method = (Security::AuthenticationMethod)SecurityLevel2::KeyCertCAPass;    //loading data for our method    Security::SSLKeyCertCAPass *method_struct;  method_struct = new Security::SSLKeyCertCAPass;  CORBA::Any* any_struct = secman -> get_method_data(our_method);  *any_struct >>= *method_struct;  method_struct -> key = "ClientKey.pem";  method_struct -> cert = "ClientCert.pem";  method_struct -> CAfile = "";  method_struct -> CAdir = "";  method_struct -> pass = "";    CORBA::Any* out_any_struct;  out_any_struct = new CORBA::Any;  *out_any_struct <<= *method_struct;	  cout << "///////////////////////////////////////////////////////////////////////////\n";    ////////////////////////////////////////////////////////////////////////////////////////    //authentiction process - Security Manager authenticates itself	by principal authenticator  //and sets own_credentials (it occurs within authenticate(...) method)	    SecurityLevel2::PrincipalAuthenticator_ptr pa = secman -> principal_authenticator();  //const char* mechanism = "";   const char* security_name = "ssl";   Security::AttributeList privileges;   SecurityLevel2::Credentials_ptr creds;   CORBA::Any* continuation_data;   CORBA::Any* auth_specific_data;    try    {      pa -> authenticate( our_method, "", security_name, *out_any_struct,privileges, creds,continuation_data,auth_specific_data);	    }  catch (...)    {      cout << "authentication failed" <<endl;      delete out_any_struct;      return 0;    }      delete out_any_struct;///////////////////////////////////////////////////////////////////////////////////////// //getting of own credentials (first from own credentials list)	    SecurityLevel2::Credentials_ptr own_cred;  own_cred = (*(secman -> own_credentials()))[0];	  //we can request own credentials attributes   Security::ExtensibleFamily fam1;  fam1.family_definer = 0;  fam1.family = 1;  Security::AttributeType at1;  at1.attribute_family = fam1;  at1.attribute_type = Security::AccessId;  Security::AttributeTypeList atl1;    atl1.length(1);  atl1[0]=at1;		  //getting  the attributes from the Credentials  Security::AttributeList_var al1 = own_cred->get_attributes(atl1);  //output	  cout << "Own credentials"        << (*al1).length() << " attributes\n";    for (CORBA::ULong ctr = 0; ctr < (*al1).length(); ctr++) {    cout        << "family = "			<< (*al1)[ctr].attribute_type.attribute_family.family << " "      << "type = "      << (*al1)[ctr].attribute_type.attribute_type << " "      <<  &(*al1)[ctr].value[0] << " "      << &(*al1)[ctr].defining_authority[0]      << endl;  }  cout << "///////////////////////////////////////////////////////////////////////////\n";  /////////////////////////////////////////////////////////////////////////////////////////   // Connect to the Bank  /*   * IOR is in Bank.ref in the local directory   */    char pwd[256], uri[300];  sprintf (uri, "file://%s/Bank.ref", getcwd(pwd, 256));  /*   * Connect to the Bank   */  CORBA::Object_var obj = orb->string_to_object (uri);  Bank_var bank = Bank::_narrow (obj);  assert (!CORBA::is_nil (bank));  // Get the Credentials  // The Credentials contains the security attributes of the server, but not  // directly. Normally they are just a reference to a object specific to   // the security mechanism.  /////////////////////////////////////////////////////////////////////////////////////////   //getting target credentials  //Get and print attributes of server  Security::ExtensibleFamily fam2;  fam2.family_definer = 0;  fam2.family = 1;  Security::AttributeType at;  at.attribute_family = fam2;  at.attribute_type = Security::AccessId;  Security::AttributeTypeList atl;  atl.length(2);  atl[0]=at;  Security::AttributeType at2;  fam2.family = 11;  at2.attribute_family = fam2;  at2.attribute_type = Security::PeerAddress;  atl[1]=at2;  SecurityLevel2::TargetCredentials_var tc = secman->get_target_credentials(bank);  SecurityLevel2::CredentialsList* init_creds = tc -> initiating_credentials();  SecurityLevel2::Credentials_var cred = (*init_creds)[0];	  // get the attributes from the initiating_credentials of tc  Security::AttributeList_var al = cred -> get_attributes(atl);  // and print them  cout << "Initiating credentials "        << (*al).length() << " attributes\n";    for (CORBA::ULong ctr = 0; ctr < (*al).length(); ctr++) {    cout        << "family = "			<< (*al)[ctr].attribute_type.attribute_family.family << " "      << "type = "      << (*al)[ctr].attribute_type.attribute_type << " "      <<  &(*al)[ctr].value[0] << " "      << &(*al)[ctr].defining_authority[0]      << endl;  }  cout << "///////////////////////////////////////////////////////////////////////////\n";  Security::AssociationOptions opt_used = tc -> association_options_used();  cout << "Association_options_used (target credentials)\n" ;      if (Security::NoDelegation == (opt_used & Security::NoDelegation))    cout << "NoDelegaion\n";  if (Security::SimpleDelegation == (opt_used & Security::SimpleDelegation))    cout << "SimpleDelegation\n";  if (Security::CompositeDelegation == (opt_used & Security::CompositeDelegation))    cout << "CompositeDelegation\n";  if (Security::NoProtection == (opt_used & Security::NoProtection))    cout << "NoProtection\n";  if (Security::Integrity == (opt_used & Security::Integrity))    cout << "Integrity\n";  if (Security::Confidentiality == (opt_used & Security::Confidentiality))    cout << "Confidentiality\n";  if (Security::DetectReplay == (opt_used & Security::DetectReplay))    cout << "DetectReplay\n";  if (Security::DetectMisordering == (opt_used & Security::DetectMisordering))    cout << "DetectMisordering\n";  if (Security::EstablishTrustInTarget == (opt_used & Security::EstablishTrustInTarget))    cout << "EstablishTrustInTarget\n";  if (Security::EstablishTrustInClient == (opt_used & Security::EstablishTrustInClient))    cout << "EstablishTrustInClient\n";	  cout << "///////////////////////////////////////////////////////////////////////////\n";  /////////////////////////////////////////////////////////////////////////////////////////   //PolicyCurrent output  cout << "PolicyCurrent" << endl;  CORBA::Object_var policy_current_obj = orb->resolve_initial_references ("PolicyCurrent");  SecurityLevel2::PolicyCurrent_var policy_current = SecurityLevel2::PolicyCurrent::_narrow(policy_current_obj);  assert (!CORBA::is_nil (policy_current));    CORBA::PolicyTypeSeq policy_types;  policy_types.length(0);   CORBA::PolicyList_var  policies = policy_current -> get_policy_overrides(policy_types);    for (CORBA::ULong i=0; i < policies -> length(); i++) {    CORBA::Policy_ptr policy = (*policies)[i];    CORBA::PolicyType type = policy -> policy_type();    if (type == Security::SecMechanismPolicy) {	cout << "MechanismPolicy" << endl;	SecurityLevel2::MechanismPolicy_ptr mp  = SecurityLevel2::MechanismPolicy::_narrow(policy);	Security::MechanismTypeList* mech = mp -> mechanisms();	for (CORBA::ULong i=0; i < mech -> length(); i++) 	    cout << (char *)((*mech)[i]) << endl;	continue;      }     if (type == Security::SecInvocationCredentialsPolicy){	cout << "InvocationCredentialsPolicy" << endl;	SecurityLevel2::InvocationCredentialsPolicy_ptr icp  = SecurityLevel2::InvocationCredentialsPolicy::_narrow(policy);	SecurityLevel2::CredentialsList* cred =  icp -> creds();	int len = cred -> length();	for (int i = 0; i < len; i++) {	  SecurityLevel2::Credentials_ptr own_cred;	  own_cred = (*cred)[i];	  	  Security::ExtensibleFamily fam1;	  fam1.family_definer = 0;	  fam1.family = 1;	  Security::AttributeType at1;	  at1.attribute_family = fam1;	  at1.attribute_type = Security::AccessId;	  Security::AttributeTypeList atl1;	  atl1.length(1);	  atl1[0]=at1;	  Security::AttributeList_var al1 = own_cred->get_attributes(atl1);	  cout << "Own " 	       << (*al1).length() << " attributes\n";	  	  for (CORBA::ULong ctr = 0; ctr < (*al1).length(); ctr++) {	    cout  	      << (*al1)[ctr].attribute_type.attribute_family.family << " "	      << (*al1)[ctr].attribute_type.attribute_type << " "	      <<  &(*al1)[ctr].value[0] << " "	      << &(*al1)[ctr].defining_authority[0]	      << endl;	  }	}	continue;      }	if (type == Security::SecQOPPolicy) {		  cout << "QOPPolicy" << endl;	  continue;      }     if (type == Security::SecDelegationDirectivePolicy) {	cout << "DelegationDirectivePolicy" << endl;	continue;      }     if (type == Security::SecEstablishTrustPolicy) {      SecurityLevel2::EstablishTrustPolicy_ptr etp  = SecurityLevel2::EstablishTrustPolicy::_narrow(policy);      if (etp -> trust().trust_in_client)	  cout << "EstablishTrustPolicy - trust in client" << endl;      else 	  cout << "EstablishTrustPolicy - trust in target" << endl;      continue;    }     cout << "Invalid type!!" << endl;  }	  cout << "///////////////////////////////////////////////////////////////////////////\n";  policy_current -> set_policy_overrides(policies,CORBA::SET_OVERRIDE);    //  // Open an account  //  Account_var account = bank->create ();  if (CORBA::is_nil (account)) {    cout << "oops: account is nil" << endl;    exit (1);  }  //  // Deposit and withdraw some money  //  // SecurityPolicies on IOR are not supported yet.  //  CORBA::Policy_var ior_policy = account->_get_policy(Security::SecTargetInvocationAccess);  cout << "deposit - 700\n";  account->deposit (700);  cout << "withdraw - 450\n";  account->withdraw (450);  cout << "Balance is " << account->balance () << "." << endl;  return 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
eeuss鲁一区二区三区| av亚洲精华国产精华精华| 国产黑丝在线一区二区三区| 欧美日韩一区久久| 亚洲欧美区自拍先锋| 国产激情视频一区二区三区欧美| 日韩一区二区三| 亚洲精品国产一区二区三区四区在线| 粉嫩aⅴ一区二区三区四区五区| 91精品国产综合久久久蜜臀图片 | 精品国产制服丝袜高跟| 亚洲.国产.中文慕字在线| 色综合视频在线观看| 亚洲激情综合网| 亚洲欧美激情小说另类| 国产精品毛片大码女人| 中文字幕一区二区5566日韩| 日韩精品中文字幕在线一区| 亚洲裸体在线观看| 国产一区二区毛片| 国产人妖乱国产精品人妖| 中文字幕 久热精品 视频在线| 久久99精品久久久久久| 日韩小视频在线观看专区| 无码av免费一区二区三区试看 | 国产成人综合在线播放| 国产精品系列在线| 国产亚洲一区二区三区| 777色狠狠一区二区三区| 日本一不卡视频| 日韩欧美二区三区| 久久亚洲捆绑美女| 不卡视频一二三| 视频在线观看一区二区三区| 欧美日韩国产一级| 蜜臀久久久久久久| 国产欧美精品一区aⅴ影院| 亚洲主播在线观看| 日韩一区二区精品葵司在线| 日韩电影一二三区| 亚洲视频一二三| 欧美一区二区久久| 91在线免费播放| 精品影视av免费| 精品视频资源站| 免费成人在线观看视频| 中文字幕日本不卡| 精品免费国产一区二区三区四区| 91麻豆免费视频| 日韩精品成人一区二区三区| 最新日韩av在线| 国产精品99久| 亚洲国产综合色| 国产精品视频你懂的| 精品久久一区二区| 91精品国产色综合久久不卡电影| 波多野洁衣一区| 风间由美一区二区三区在线观看 | 国产精品美女一区二区三区| 日韩美女主播在线视频一区二区三区 | 国产精品私人影院| 日韩美女在线视频| 日韩一区二区免费在线电影| 欧美不卡一二三| 午夜电影一区二区三区| 国产一区二区毛片| 亚洲自拍欧美精品| 中文字幕一区二区在线观看| 亚洲桃色在线一区| 亚洲丶国产丶欧美一区二区三区| 中文字幕不卡一区| 自拍偷拍欧美激情| 亚洲乱码国产乱码精品精的特点| 视频一区在线播放| 亚洲国产另类精品专区| 美女尤物国产一区| 国内精品国产成人国产三级粉色 | 久久综合色鬼综合色| 久久精品亚洲精品国产欧美kt∨ | 欧美国产一区二区在线观看| 亚洲国产激情av| 成人黄色av电影| 青青草原综合久久大伊人精品| 天堂av在线一区| thepron国产精品| 91精品国产综合久久蜜臀| 国产一区二区三区久久久 | 欧美专区亚洲专区| 国产精品午夜久久| 成人av网站在线观看免费| 六月丁香婷婷色狠狠久久| 99re视频这里只有精品| 久久久亚洲综合| 欧美精品第一页| 中文字幕精品—区二区四季| av在线免费不卡| 一级女性全黄久久生活片免费| 美女视频一区二区三区| 欧美性色综合网| 亚洲久草在线视频| 99久久久精品免费观看国产蜜| 国产精品一品二品| 欧美一级在线视频| 日韩精品欧美成人高清一区二区| 91麻豆免费视频| 亚洲人亚洲人成电影网站色| 国产69精品久久久久毛片 | 99久久99久久综合| 本田岬高潮一区二区三区| 精品粉嫩aⅴ一区二区三区四区| 91蝌蚪国产九色| 国产·精品毛片| 日日夜夜免费精品| 欧美一级xxx| 久久精品国产成人一区二区三区 | 日韩中文字幕不卡| 日韩一区二区精品| 成人久久18免费网站麻豆| 久久久久国产成人精品亚洲午夜| 韩国理伦片一区二区三区在线播放| 欧美一区二区三区啪啪| 国产一二精品视频| 日本一区二区三区视频视频| 中文字幕免费在线观看视频一区| 久久久精品黄色| 亚洲国产中文字幕| 亚洲品质自拍视频| 日韩一级片在线观看| 色婷婷综合久久久| 狠狠色2019综合网| 亚洲高清视频中文字幕| 欧美一区二区三区小说| 91日韩一区二区三区| 欧美a级理论片| 亚洲午夜精品17c| 久久久国产精品不卡| 欧美日韩一区高清| 精品一区二区国语对白| 国产精品久久久久久久久搜平片 | 日韩一级欧美一级| 在线不卡中文字幕播放| 欧美日韩和欧美的一区二区| 亚洲精品视频在线观看免费| 久久久久久97三级| 久久亚洲春色中文字幕久久久| 91精品国产综合久久久久久| 欧美日韩一区三区| 欧美日韩在线综合| 欧美唯美清纯偷拍| 精品视频一区 二区 三区| 欧美日韩激情在线| 日韩午夜精品视频| 欧美丝袜丝交足nylons图片| 波多野结衣在线aⅴ中文字幕不卡| 国产精品自在欧美一区| 国产91露脸合集magnet| 懂色av一区二区三区免费观看| 蜜臀久久99精品久久久久宅男 | 国产乱淫av一区二区三区| 日韩av电影免费观看高清完整版| 日本欧美在线看| 成人av高清在线| 欧美日韩一区二区三区不卡 | 久久精工是国产品牌吗| 成人小视频免费观看| 欧美美女一区二区| 久久精品一区二区三区av| 亚洲精品成人悠悠色影视| 精彩视频一区二区| 99久久伊人精品| 欧美一级国产精品| 亚洲免费观看在线视频| 日韩中文字幕一区二区三区| 日本韩国精品一区二区在线观看| 国产日韩欧美精品综合| 国产在线精品不卡| av电影在线不卡| 欧美精品一区在线观看| 亚洲综合一区二区三区| 国产精品夜夜爽| 欧美高清视频不卡网| 久久久不卡影院| 美女视频网站久久| 91久久精品一区二区二区| 久久精品亚洲精品国产欧美kt∨| 麻豆精品在线播放| 欧美日韩国产美女| 中文字幕五月欧美| 国产美女av一区二区三区| 精品国产伦一区二区三区免费| 亚洲精品国久久99热| 色综合久久综合网97色综合| 久久久精品综合| 欧美日本在线看| 国产不卡在线播放| 亚洲午夜久久久久久久久电影网| 欧美日韩国产色站一区二区三区| 亚洲午夜影视影院在线观看| 在线视频一区二区免费| 亚洲欧洲国产专区|