Sunday 15 February 2015

php - Oracle OCI parallel connection to an encrypted and non-encrypted Oracle instance -


At the same PHP script I need to connect to two separate Oracle database, which requires an encrypted connection and which is not. The problem is that which requires encrypted connection is not a mandate on the server side, so I 'need' set on the client side.

I can do this by creating a sqlnet.ora file my $ ORACLE_HOME:

SQLNET.CRYPTO_CHECKSUM_TYPES_CLIENT = (MD5)
SQLNET.ENCRYPTION_TYPES_CLIENT = (RC 4_256)
SQLNET.ENCRYPTION_CLIENT = required
SQLNET.CRYPTO_CHECKSUM_CLIENT = required

the problem is that my other connections will also require encryption, so it will fail. I need two connections in the same script, so I just can not set a different ORACLE_HOME for two, because they are part of the same script.

Anyone have any idea how to solve this? Shall be possible to set up encryption on the connection level, so I can set as a 'need' and other 'no'? Is it possible to have two different ORACLE_HOMEs in the same script for two different connections?

Required connection will fail if the other party rejects (no encryption) Not specified, or if there is no corresponding algorithm on the other side.

You need to use Requested The second aspect of the connection specifies either accepted, expected, or requested, and on the other hand available relevant algorithms are available (encryption) Will be activated while using; It would otherwise be inactive (but wont fail).

Source:


No comments:

Post a Comment