Handling certificates for establishing connection to Oracle using the go-ora driver

37 Views Asked by At

We can establish an SSL-based connection to the Oracle using go-ora driver, by including the SSL and SSL verify in the connection string. But should certificate handling be included to the code? For example, mysql has "RegisterTLSConfig" and mongoDB has "SetTLSConfig". What does oracle have in similar to the above?

I have tried using RegisterTLSConfig but it is undefined for go-ora driver.

1

There are 1 best solutions below

2
MT0 On

Use an Oracle Wallet.

go_ora contains the NewWallet function to:

create new wallet object from file path

From the Oracle Wallet Manager documentation:

6.1.1 What Is Oracle Wallet Manager?

You can use Oracle Wallet Manager to manage public key security credentials on Oracle clients and servers. The wallets it creates can be read by Oracle Database, Oracle Application Server, and the Oracle Identity Management infrastructure.

Oracle Wallet Manager enables wallet owners to manage and edit the security credentials in their Oracle wallets. A wallet is a password-protected container used to store authentication and signing credentials, including private keys, certificates, and trusted certificates needed by SSL. You can use Oracle Wallet Manager to perform the following tasks: