Home » RDBMS Server » Security » oracle wallet creation and accessing (Oracle 11g)
oracle wallet creation and accessing [message #569515] Mon, 29 October 2012 00:10
abirami.thirunavukkarasu
Messages: 28
Registered: August 2012
Location: Bangalore
Junior Member
Recently we got google apis license to translate into different language.
It is an SSL protocal and we have to use wallet configuration in our code.
Initially we had created the certificate from site.

But we are struck up with an error => ERROR at line 1: ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-28759: failure to open file ORA-06512: at line 1

Full access is given to the wallet folder. Also in one of the forum, i had seen like 'we have to pass the password as null for 11g. did that also but I was left out with error. Please help !!

1) creating the wallet

F:\app\Administrator\product\11.2.0\dbhome_1>orapki wallet create  -wallet F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\Google -pwd Password123 -auto_login
Oracle PKI Tool : Version 11.2.0.1.0 - Production
Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.


2) Importing the wallet

F:\app\Administrator\product\11.2.0\dbhome_1>orapki wallet add -wallet F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\Google  -trusted_cert -cert "E:\GoogleAPICerts_Base64 (1)\Imported\1GeoTrust.cer" -pwd Password123
Oracle PKI Tool : Version 11.2.0.1.0 - Production
Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.


F:\app\Administrator\product\11.2.0\dbhome_1>orapki wallet add -wallet F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\Google  -trusted_cert -cert "E:\GoogleAPICerts_Base64 (1)\Imported\2InternetAuth.cer" -pwd Password123
Oracle PKI Tool : Version 11.2.0.1.0 - Production
Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.


F:\app\Administrator\product\11.2.0\dbhome_1>orapki wallet add -wallet F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\Google  -trusted_cert -cert "E:\GoogleAPICerts_Base64 (1)\Imported\3GoogleApi.com.cer" -pwd Password123
Oracle PKI Tool : Version 11.2.0.1.0 - Production
Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.


3) Displaying the wallet


F:\app\Administrator\product\11.2.0\dbhome_1>orapki wallet display -wallet F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\Google 
Oracle PKI Tool : Version 11.2.0.1.0 - Production
Copyright (c) 2004, 2009, Oracle and/or its affiliates. All rights reserved.

Requested Certificates:
User Certificates:
Trusted Certificates:
Subject:        CN=*.googleapis.com,O=Google Inc,L=Mountain View,ST=California,C
=US
Subject:        CN=Google Internet Authority,O=Google Inc,C=US
Subject:        OU=Class 1 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US
Subject:        OU=Secure Server Certification Authority,O=RSA Data Security\, Inc.,C=US
Subject:        OU=Equifax Secure Certificate Authority,O=Equifax,C=US
Subject:        CN=GTE CyberTrust Global Root,OU=GTE CyberTrust Solutions\, Inc.,O=GTE Corporation,C=US
Subject:        OU=Class 3 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US
Subject:        OU=Class 2 Public Primary Certification Authority,O=VeriSign\, Inc.,C=US
 



ACL declaration in sys account


begin
  dbms_network_acl_admin.create_acl (
    acl         => 'utlhttp.xml',
    description => 'HTTP Access',
    principal   => 'GODS',
    is_grant    => TRUE,
    privilege   => 'connect',
    start_date  => null,
    end_date    => null
  );

  dbms_network_acl_admin.add_privilege (
    acl        => 'utlhttp.xml',
    principal  => 'GODS',
    is_grant   => TRUE,
    privilege  => 'resolve',
    start_date => null,
    end_date   => null
  );

  dbms_network_acl_admin.assign_acl (
    acl        => 'utl_http.xml',
    host       => '*.googleapis.com',

    lower_port => 443,
    upper_port => 443
  );
  commit;
end; 

SQL> exec DBMS_NETWORK_ACL_ADMIN.ASSIGN_WALLET_ACL('utl_http.xml','file:F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets');

SQL> SELECT utl_http.request('https://www.googleapis.com/language/translate/v2?alt=json&key=AIzaSyARz9W_D3HAFrNx6W7m4ur_9xS69bVPVsg&prettyPrint=true&q=_Translate%20this_?&source=de&target=en', '', 'file:F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets', 'Password123') FROM dual;




conn - GODS/GODS@TEST

SQL> select utl_http.request('https://www.googleapis.com/', NULL,'file:F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets\GoogleAPI',NULL) from dual;
       *
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-28759: failure to open file
ORA-06512: at line 1
 
SQL> SELECT utl_http.request('https://www.googleapis.com/language/translate/v2?alt=json&key=AIzaSyARz9W_D3HAFrNx6W7m4ur_9xS69bVPVsg&prettyPrint=true&q=_Translate%20this_?&source=de&target=en', '', 'file:F:\app\Administrator\product\11.2.0\dbhome_1\BIN\owm\wallets', 'Password123') FROM dual;

ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1722
ORA-28759: failure to open file
ORA-06512: at line 1



Previous Topic: Accounting: Cause of Oracle user being locked.
Next Topic: Differenece between grant all on any table and grant all on table_name
Goto Forum:
  


Current Time: Tue Sep 02 22:30:35 CDT 2014

Total time taken to generate the page: 0.09697 seconds