Skip to main content

Testing SSL Connectivity

You can follow the instructions in this section to test that everything has been configured appropriately up to this point. The instructions are to be performed on a Key Manager back end.

The procedures in this section are optional.

  1. Append the following lines to the /etc/sysconfig/sshmgr file:

    # Environment variables for Oracle SSL connectivity
    ORACLE_HOME=/usr/lib/oracle/11.2/client64
    TNS_ADMIN=/etc/sshmgr/oracle_config
    export ORACLE_HOME
    export TNS_ADMIN
  2. Apply the variables using source:

    # source /etc/sysconfig/sshmgr
  3. Connectivity can be tested using python. Start the python command line used by the Key Manager

    # source /opt/sshmgr/.runtime/bin/activate
    # python

    In the python command line, run the following commands (replace username, password, and instance_name with the database user account, the password of that account, and the database instance name):

    >>> import cx_Oracle
    >>> connection = cx_Oracle.connect('username/password@instance_name')
    >>> cursor = connection.cursor()
    >>> cursor.execute('select * FROM v$encryption_wallet')
    >>> rows = cursor.fetchall()
    >>> print rows
    >>> connection.close()

    If the configurations have been set correctly, the print rows command should output something like the following:

    [('file','/home/oracle-db/u01/app/oracle/product/\
    11.2.0/dbhome_1/owm/wallets/oracle','OPEN')]