sijms / go-ora

Pure go oracle client
MIT License
771 stars 169 forks source link

Oralce 23c wallet support. #469

Closed gaozhiyu closed 7 months ago

gaozhiyu commented 8 months ago

There is an issue when connecting 23c oracle via wallet.

The log is :

asn1: structure error: tags don't match (4 vs {class:0 tag:16 length:44 isCompound:true}) {optional:false explicit:false application:false private:false defaultValue: tag: stringType:0 timeType:0 set:false omitEmpty:false} @2"

The wallet generating command :

\$ORACLE_HOME/bin/orapki wallet create -wallet \$ORACLE_HOME/owm/wallets/isva -pwd passw0rd -auto_login
\$ORACLE_HOME/bin/orapki wallet add -wallet \$ORACLE_HOME/owm/wallets/isva -pwd passw0rd -dn "CN=$HOSTNAME" -keysize 2048 -self_signed -sign_alg sha256 -validity 365
\$ORACLE_HOME/bin/orapki wallet export -wallet \$ORACLE_HOME/owm/wallets/isva -pwd passw0rd -dn "CN=$HOSTNAME" -cert \$HOME/oracle-ssl.pem

Here are the analysis we make:

  1. oracle 23c ssl wallet works with sqldevloper, but not work with go-ora
  2. oralce 23c works with non-ssl
  3. oracle12 ssl works with sqldevelper and go-ora.
sijms commented 8 months ago

I am downloading oracle version 23 to test the issue

gaozhiyu commented 8 months ago

There is some typo, but I think you got it.

"oracle 23c ssl wallet works with sqldevloper, but not work with go-ora" for the go-ora, we tried the go-ora latest version as well.

sijms commented 7 months ago

oracle 23c use different encryption algorithm I am working on to add it

gaozhiyu commented 7 months ago

Thanks

when I debug the code,asn1 could not parse the bytes.

https://github.com/sijms/go-ora/blob/39b9356c6650827d9482fc09b839b87a18b1f2b0/v2/wallet.go#L455.

When I am comparing the length of temp2[index].Data.Bytes between oracle12 and oracle23, they are different.

That is what I investigated so far. ^_^

sijms commented 7 months ago

would you please test last commit if it work I will make new release

gaozhiyu commented 7 months ago

@sijms ,

sure, I will

gaozhiyu commented 7 months ago

@sijms ,

I have tested the wallet on 12c and 23c, both it works.

Thank you.

Can you create a new release?

sijms commented 7 months ago

fixed in v2.7.25