Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why do I have "Checksum fail" on every bad SQL request in Oracle when Native Encryption (ASO) is enabled?

We recently configured our Oracle database to be in so-called native encryption (Oracle Advanced Security Option).

As development goes on, some SQL queries are sometimes badly-written and so an error should be returned by the JDBC driver (ojdbc7 v12.1.0.2). Instead of that, a Checksum Fail IOException is raised.

So the problem is that we do not have anymore any syntax or database integrity error at all. The problem is the same in SQL GUI editors, like DBeaver, SQLDeveloper or SQuirrel.

like image 236
Cyrille Pontvieux Avatar asked May 19 '16 12:05

Cyrille Pontvieux


2 Answers

With driver ojdbc7 12.1.0.1 the correct VM parameter names are as follows:

-Doracle.net.crypto_checksum_client=REQUIRED
-Doracle.net.crypto_checksum_types_client=SHA1
like image 158
Ralf Zimmerer Avatar answered Nov 15 '22 05:11

Ralf Zimmerer


Driver version 12.1 and earlier have a bug in SHA-2 functions If able force the server to handshake with SHA-1

-Doracle.net.crypto_checksum_client=REQUIRED
-Doracle.net.crypto_checksum_types=SHA1

This is fixed in ojdbc8.jar version 12.2

like image 34
Tazz Avatar answered Nov 15 '22 07:11

Tazz