Hi all,

when working on package updates for libica (to 3.0.2) and ibmca (to
1.3.0) in our distros I realized that they don't work well together.
libica is using "libica.so.3" as the runtime library name (actually a
symlink to libica.so.3.0.2), but ibmca expects "libica.so". ibmca is
using OpenSSL's DSO_load() function to load libica, with the default
"name translation", DSO_load("ica") gets translated to dlopen
("libica.so"), but it's the development symlink that's not installed
on production systems (part of libica-devel package). So currently I use

--- openssl-ibmca-1.3.0/src/e_ibmca.c.libica-soname     2015-12-01 
03:33:52.000000000 +0000
+++ openssl-ibmca-1.3.0/src/e_ibmca.c   2017-02-13 20:25:03.122555936 +0000
@@ -127,7 +127,7 @@ typedef struct ibmca_sha512_ctx {
 } IBMCA_SHA512_CTX;
 #endif

-static const char *LIBICA_NAME = "ica";
+static const char *LIBICA_NAME = "libica.so.3";

 #if defined(NID_aes_128_cfb128) && ! defined (NID_aes_128_cfb)
 #define NID_aes_128_cfb NID_aes_128_cfb128
@@ -1281,7 +1281,7 @@ static int ibmca_init(ENGINE * e)
        /* WJH XXX check name translation */

        ibmca_dso = DSO_load(NULL, LIBICA_NAME, NULL,
-                            /* DSO_FLAG_NAME_TRANSLATION */ 0);
+                            DSO_FLAG_NO_NAME_TRANSLATION);
        if (ibmca_dso == NULL) {
                IBMCAerr(IBMCA_F_IBMCA_INIT, IBMCA_R_DSO_FAILURE);
                goto err;

It needs reworking anyway because the DSO_*() API functions were removed
from OpenSSL 1.1 ...


                Dan

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opencryptoki-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech

Reply via email to