Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using wallet generated with OPENSSL in Oracle XE

Luis CabralMay 11 2013 — edited May 22 2013
Hi there,

I think this is related to oracle security in general rather than XE, that is why I am posting this here.

I am using Oracle XE 11g on Ubuntu 12.04.2 and I need to send emails from APEX using SSL.

As Oracle XE doesn't have a wallet manager, I manually created a wallet using openssl. All seems to have gone well but when I try to use utl_smtp using SSL I get the cryptic error message ORA-28788: user provided invalid information, or an unknown error.

See below the code I used to create the wallet and the utl_smpt call that is generating the error. Any ideas to fix this?

Thanks
Luis
* Generate wallet in linux shell using openssl *

openssl genrsa -out self.key 2048

openssl req -new -config /usr/lib/ssl/openssl.cnf -key self.key -out self.csr

openssl x509 -req -days 1450 -in self.csr -signkey self.key -out self.crt

cat self.key self.crt > self.pem

openssl pkcs12 -export -in self.pem -out  self.p12 -name self-test

cp self.p12 /u01/app/oracle/ewallet.p12
SQL> declare
  2      l_connection utl_smtp.connection;
  3  begin
  4      l_connection := utl_smtp.open_connection(
  5                          host => 'smtp.gmail.com',
  6                          port => 587,
  7                          wallet_path => 'file:/u01/app/oracle',
  8                          wallet_password => 'password01',
  9                          secure_connection_before_smtp => TRUE);
 10      utl_smtp.close_connection(l_connection);
 11  end;
 12  /
declare
    l_connection utl_smtp.connection;
begin
    l_connection := utl_smtp.open_connection(
                        host => 'smtp.gmail.com',
                        port => 587,
                        wallet_path => 'file:/u01/app/oracle',
                        wallet_password => 'password01',
                        secure_connection_before_smtp => TRUE);
    utl_smtp.close_connection(l_connection);
end;
ORA-28788: user provided invalid information, or an unknown error
ORA-06512: at "SYS.UTL_TCP", line 59
ORA-06512: at "SYS.UTL_TCP", line 284
ORA-06512: at "SYS.UTL_SMTP", line 174
ORA-06512: at "SYS.UTL_SMTP", line 197
ORA-06512: at line 4

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 19 2013
Added on May 11 2013
1 comment
2,354 views