Jump to content
Bojan Gavrilovic

Signing and Encryption using OpenSSL-Win64 v3.1

Recommended Posts

Hello,

I just installed the ICS components and this is my first "touch" with them. My task is that on a system where OpenSSL-Win64 v3.1 is installed. from Delphi I execute the following commands whose scripts look like:

openssl cms -sign -md sha256 -in $inputfile -signer "$ssldestination\pair.pem" | openssl cms -encrypt -aes-256-cbc -outform DER -out $outputfile "$ssldestination\cert.pem"

pair.pem is in private key form
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
-----BEGIN CERTIFICATE-----

-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
….
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
….
-----END CERTIFICATE-----

Can someone direct me?

I can do this as a PS script, but I don't like that approach.

Both the key and all the certificates are valid, because as I said the execution using the PS script is correct.

Thanks in advance.

 

Bojan

Share this post


Link to post

Although we distribute OpenSsl.exe, it is not something we support, there are numerous online resources devoted to OpenSSL scripts, which many people use, but Delphi users normally write code with the APIs. 

 

You can test signing text and streams with the OverbyteIcsJoseTst sample, and the OverbyteIcsPemtool sample has some very old encryptions functions on the Extras menu, but there has never been demand for encryption using OpenSSL since there are native Delphi packages around.

 

Angus

 

 

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×