Skip to Main Content

ODP.NET

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

BUG: Oracle.ManagedDataAccess can't parse valid wallet file

Louis HaußknechtJan 6 2020 — edited Jan 8 2020

This took quite a bit of effort to figure out...

I'm connecting to my DB with tcps. I configured the WallettLocation like this:

   OracleConfiguration.WalletLocation = @"(SOURCE=(METHOD= File)(METHOD_DATA = (DIRECTORY = /app/ )))";

When connecting to the DB an exception is thrown: "TCPS: Invalid SSL Wallet (Magic)".

After spending hours of trying to configure the wallet location I started dotPeek and looked for the exception message in the assembly. It turned out, that in OracleInternal.Secure.Network.WalletReader there is a magic number defined  - which has a typo!

The correct magic number for a wallet should be 

A1 F8 4E 37 (161, 248, 78, 55)

But the client is expecting the following:

internal static byte[] a = new byte[4]

    {

      (byte) 161,

      (byte) 248,

      (byte) 78,

      (byte) 54

    };

I manually patched the wallet file and wrote a 37 to byte 3 and now it's working.

I found this in Oracle.ManagedDataAccess version 2.18.3 but it's also in the current version 2.19.60.

Comments

Processing

Post Details

Added on Jan 6 2020
8 comments
943 views