配置:
1、cd $ORACLE_HOME
2、mkdir -p wallets
3、cd wallets
4、将证书上传至$ORACLE_HOME/wallets目录下
5、orapki wallet create -wallet . -pwd password -auto_login
6、orapki wallet add -wallet . -trusted_cert -cert $ORACLE_HOME/wallets/xxxx.cer -pwd password
7、orapki wallet add -wallet . -trusted_cert -cert $ORACLE_HOME/wallets/DigiCertGlobalRootCA.cer -pwd password
8、orapki wallet add -wallet . -trusted_cert -cert $ORACLE_HOME/wallets/GeoTrustCNRSACAG1.cer -pwd password
9、orapki wallet display -wallet . -pwd password
使用:
IF g_ws_setting_rec.http = 'https://' THEN
sys.dbms_system.get_env('ORACLE_HOME',
l_env_val);
IF l_env_val IS NULL THEN
x_return_status := 'E';
x_return_msg := '地址ORACLE_HOME查找失败' || substrb(SQLERRM,
1,
100);
process_log(p_log_id => x_log_id,
p_sn => p_sn,
p_ws_name => p_ws_name,
p_function_code => p_function_code,
p_response_xml => x_response_data,
p_process_status => x_return_status,
p_process_msg => x_return_msg);
RETURN;
END IF;
l_wallet_file_path := 'file:' || l_env_val || '/wallets';
SELECT fnd_profile.value('自定义配置文件')
INTO l_wallet_password
FROM dual;
IF l_wallet_password IS NULL THEN
x_return_status := 'E';
x_return_msg := '服务:https钱包设置具有安全性,请设置访问帐号密码';
RETURN;
END IF;
utl_http.set_wallet(path => l_wallet_file_path, --证书导入服务器地址
password => l_wallet_password); --证书导入密码
END IF;