You receive "Encryption error 10011...Unable to load extension: (tkersa2)" when you use PROC PWENCODE with Oracle


When you use Oracle and PROC PWENCODE with method=sas003, an error similar to the following might occur:

ERROR: Encryption error 10011 (0x271b) occurred in R_CR_random_seed at line 749, the error message is "NOT_SUPPORTED"
{SAS002}123456789abcdefghijklmn
ERROR: Encryption error 10011 (0x271b) occurred in R_CR_random_seed at line 749, the error message is "NOT_SUPPORTED".
ERROR: Encryption run-time execution error
ERROR: Unable to load extension: (tkersa2)

Usually, the error "Unable to load extension: (tkersa2)" occurs because the LD_LIBRARY_PATH does not include the path to the SAS/SECURE® directory or adding a path before it, such as the Oracle path, causes a conflict with the Secure crypto modules. This problem occurs because SAS and Oracle use different versions of the RSA Crypto-C ME libraries.

To work around this problem, set TKERSA2_LIB_PATH to point to the SAS version of the libraries located in the SASHOME/Secure/sasexe: directory.

You can set the path in your equivalent of the SASHOME/SASFoundation/9.4/bin/sasenv_local file by adding the following:

export TKERSA2_LIB_PATH=SASHOME/Secure/sasexe

You can also set the path in a CONFIG file:

-set TKERSA2_LIB_PATH SASHOME/Secure/sasexe