1

I am using gdcmanon to anonimize dicom files like the following:

LD_LIBRARY_PATH=../lib ./gdcmanon --certificate CA_cert.cer -e ./dump ./dump/anon

But it gives the following error:

Error: In /home/travis/build/malaterre/GDCM/Source/Common/gdcmCryptoFactory.cxx, line 61, function static gdcm::CryptoFactory* gdcm::CryptoFactory::GetFactoryInstance(gdcm::CryptoFactory::CryptoLib) No crypto factory registered with id 1

Requested cryptoraphic library not configured.

How can I solve this?

Nafis Abdullah Khan
  • 2,062
  • 3
  • 22
  • 39
  • You have compiled the library yourself? You have set `GDCM_USE_SYSTEM_OPENSSL` to `NO`? – Bartłomiej Mar 08 '18 at 09:13
  • @Bartłomiej, I am using the binary release available in github. Now that you said about it, I tried with both GDCM_USE_SYSTEM_OPENSSL=NO and YES but same result. – Nafis Abdullah Khan Mar 08 '18 at 11:40
  • If a compiled version fails too, than I guess that it is more likely a problem of openssl. – Bartłomiej Mar 08 '18 at 19:35
  • @Bartłomiej, After compiling, now it shows only "Requested cryptoraphic library not configured" – Nafis Abdullah Khan Mar 08 '18 at 20:00
  • Do you have `libssl-dev` package installed? And if you compile, `GDCM_USE_SYSTEM_OPENSSL` should be `YES`. – Bartłomiej Mar 08 '18 at 20:38
  • @Bartłomiej, Few moments ago I found this link and installed them and now compiling again. https://bitcoin.stackexchange.com/a/49429 – Nafis Abdullah Khan Mar 08 '18 at 20:40
  • @Bartłomiej, Alright! It worked! But does that mean it will have to be compiled on every PC that I will use the binaries on? – Nafis Abdullah Khan Mar 08 '18 at 21:18
  • There should be no problem if you use binaries from the repository (`libgdcm-tools` on Ubuntu). The binary version you have obtained must have had dependencies unresolved. – Bartłomiej Mar 08 '18 at 21:34
  • I wish you said that before. Also that requires cmake version less than 3 I think – Nafis Abdullah Khan Mar 08 '18 at 21:47
  • Well, that is the point of discussion - 12 hours ago I wasn't aware of everything that I do know right now. :-) Also, it is strange what you say about CMake. In my opinion, the newest version should be fine on Linux. – Bartłomiej Mar 08 '18 at 22:04
  • Not for the one you suggested (libgdcm-tools on Ubuntu). Not sure 100% though. But yeah, you've been of great help without any doubt. Feel free to give an answer, if you won't may be I will few days later. :D – Nafis Abdullah Khan Mar 08 '18 at 22:06
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/166560/discussion-between-bartlomiej-and-nafis). – Bartłomiej Mar 09 '18 at 19:33

1 Answers1

0

The error is because of binaries you use, it looks like SSL dependencies are not satisfied.

As a solution (workaround?), you can get the binaries via apt system. For Ubuntu 16.04 Xenial distribution, there is version 2.6.3 of libgdcm-tools package.

Another possibility is to compile gdcm from scratch, but you need development files of OpenSSL (apt install libssl-dev). Moreover, to use anonymisation with certificates, in CMake system set GDCM_USE_SYSTEM_OPENSSL=YES.

Bartłomiej
  • 1,068
  • 1
  • 14
  • 23