Hi Norikatsu, Below is a patch we'd previously accepted to opencryptoki to fix ld.so behavior on FreeBSD. Unfortunately it breaks our ability on linux to run 32 and 64 bit apps on the same system.
Based on the comment above the patch, it sounds like we'd have to carry some FreeBSD specific code to make this right, however, we don't have the abililty to test and verify the code on a FreeBSD system. We'd be happy to carry a patch for you if you can resubmit something specific to FreeBSD. In the meantime we're going to need to revert the patch for opencryptoki 2.4. Kent [root@r1745016 opencryptoki]# git show f22421a0ad7af61a28a89030adcd2527de9416bb commit f22421a0ad7af61a28a89030adcd2527de9416bb Author: Norikatsu Shigemura <[email protected]> Date: Sun Jan 2 19:45:09 2011 +0900 dlopen(3) assumes relative path, but... Hi Klaus. On openCryptoki, dlopen(3) assumes that resolve relative path by /etc/ld.so.conf.d/opencryptoki.conf. However, on FreeBSD, even if 'ldconfig -m /usr/local/lib/opencryptoki/stdll' (same as /etc/ld.so.conf.d/opencryptoki.conf), dlopen(3) doesn't resolve relative path (path name required .so.1 suffix). So libopencryptoki.so can't load STDLLs. I made a patch to fix this issue by absolute path instead of relative path. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/usr/sbin/pkcs_slot/pkcs_slot.in b/usr/sbin/pkcs_slot/pkcs_slot.in index a2bbce8..559f0f4 100644 --- a/usr/sbin/pkcs_slot/pkcs_slot.in +++ b/usr/sbin/pkcs_slot/pkcs_slot.in @@ -477,29 +477,29 @@ CFGFILE=@localstatedir@/lib/opencryptoki/pk_config_data if [ $DEPTH = "deep" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|$DEVICE|$DEEP4758_DLL_FN|$DEEP4758_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|$DEVICE|$DEEP4758_DLL|$DEEP4758_INIT" >>$CFGFILE elif [ $DEPTH = "ica" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$ICA_DLL_FN|$ICA_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$ICA_DLL|$ICA_INIT" >>$CFGFILE elif [ $DEPTH = "bcom" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$BCOM_DLL_FN|$BCOM_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$BCOM_DLL|$BCOM_INIT" >>$CFGFILE elif [ $DEPTH = "aep" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$AEP_DLL_FN|$AEP_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$AEP_DLL|$AEP_INIT" >>$CFGFILE elif [ $DEPTH = "cr" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CR_DLL_FN|$CR_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CR_DLL|$CR_INIT" >>$CFGFILE elif [ $DEPTH = "soft" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|FALSE|0|0|1|1|NONE|$SOFT_DLL_FN|$SOFT_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|FALSE|0|0|1|1|NONE|$SOFT_DLL|$SOFT_INIT" >>$CFGFILE elif [ $DEPTH = "tpm" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$TPM_DLL_FN|$TPM_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$TPM_DLL|$TPM_INIT" >>$CFGFILE elif [ $DEPTH = "cca" ] then -echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CCA_DLL_FN|$CCA_INIT" >>$CFGFILE +echo "TRUE|0|$SLOT_DESCRIPTION|$MANUFACTURER|TRUE|FALSE|TRUE|0|0|1|1|NONE|$CCA_DLL|$CCA_INIT" >>$CFGFILE fi @CHMOD@ -R g+wrX @localstatedir@/lib/opencryptoki ------------------------------------------------------------------------------ Achieve unprecedented app performance and reliability What every C/C++ and Fortran developer should know. Learn how Intel has extended the reach of its next-generation tools to help boost performance applications - inlcuding clusters. http://p.sf.net/sfu/intel-dev2devmay _______________________________________________ Opencryptoki-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opencryptoki-tech
