Where does dcmtkcrypto and dcmtkssl come from?

Compilation and installation of DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
zzzhhh
Posts: 12
Joined: Tue, 2018-07-03, 11:08

Where does dcmtkcrypto and dcmtkssl come from?

#1 Post by zzzhhh »

Linking OpenSSL is actually linking dcmtkcrypto and dcmtkssl libraries. But they are clearly not part of OpenSSL. I couldn't find the two names in the bundle of projects in the DCMTK solution (Visual Studio sorts all projects in the Solution Explorer so I would not miss them). I failed to find their sources anywhere in https://dicom.offis.de/dcmtk either. So, where does dcmtkcrypto and dcmtkssl come from? What do I do to build them and where are the sources to download in the first place?

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Where does dcmtkcrypto and dcmtkssl come from?

#2 Post by Jan Schlamelcher »

zzzhhh wrote:Linking OpenSSL is actually linking dcmtkcrypto and dcmtkssl libraries. But they are clearly not part of OpenSSL.
Wrong, these are the OpenSSL libraries. We just renamed them to prevent collisions with existing OpenSSL libraries (e.g. in C:\Windows\System32) from a different OpenSSL version. Code excerpt from our build script:

Code: Select all

string(REGEX REPLACE "lib(crypto|ssl)([^ \n\t\r]*\\.)(lib|def)" "dcmtk\\1_o\\2\\3" MAKEFILE "${MAKEFILE}")
string(REGEX REPLACE "lib(crypto|ssl)([^ \n\t\r]*\\.)(dll|pdb)" "dcmtk\\1\\2\\3" MAKEFILE "${MAKEFILE}")
string(REGEX REPLACE "LIBRARY lib(crypto|ssl)" "LIBRARY dcmtk\\1" MAKEFILE "${MAKEFILE}")

zzzhhh
Posts: 12
Joined: Tue, 2018-07-03, 11:08

Re: Where does dcmtkcrypto and dcmtkssl come from?

#3 Post by zzzhhh »

Good to hear that. I downloaded a pre-compiled binary of OpenSSL from https://wiki.openssl.org/index.php/Binaries -> https://slproweb.com/products/Win32OpenSSL.html (the first link) -> Win64 OpenSSL v1.1.0h. After installing it under C:\OpenSSL-Win64, the files under lib sub-directory are:
capi.lib
dasync.lib
libcrypto-1_1-x64.def
libcrypto.lib
libssl-1_1-x64.def
libssl.lib
openssl.lib
ossltest.lib
padlock.lib
Does libcrypto.lib correspond to dcmtkcrypto? Which one corresponds to dcmtkssl, libssl.lib or openssl.lib? I guess it is libssl.lib. Could you please confirm it? Thanks.

Jan Schlamelcher
OFFIS DICOM Team
OFFIS DICOM Team
Posts: 318
Joined: Mon, 2014-03-03, 09:51
Location: Oldenburg, Germany

Re: Where does dcmtkcrypto and dcmtkssl come from?

#4 Post by Jan Schlamelcher »

Yes, libssl, as you can see in the regex code that I had posted.

zzzhhh
Posts: 12
Joined: Tue, 2018-07-03, 11:08

Re: Where does dcmtkcrypto and dcmtkssl come from?

#5 Post by zzzhhh »

Yes, after renaming libcrypto.lib and libssl.lib to dcmtkcrypto_o.lib and dcmtkssl_o.lib respectively, OpenSSL works now for building DCMTK. Thank you very much!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest