EldoS | Feel safer!

Software components for data protection, secure storage and transfer

String sign

Also by EldoS: CallbackRegistry
A component to monitor and control Windows registry access and create virtual registry keys.
Posted: 07/07/2010 12:49:10
by Ken Ivanov (EldoS Corp.)

Could you please post two signatures, one created by OpenSSL (either under Windows or Linux) and another created with your TFileStream-based revision of the code here?
Posted: 07/07/2010 13:34:48
by Guilherme Soares (Standard support level)
Joined: 01/09/2008
Posts: 6

Now its running,

the solution is writing on a temp file the string i want to sign, and sign the file

        //also tried with ascii < 32 and no problem
        StringStream := TStringStream.Create( 'Message to sign "" etc.');

        FileStream := TFileStream.Create( FilePath+'filetosign'  , fmCreate );
        FileStream.Write( StringStream , StringStream.Size );

        FileStream := TFileStream.Create( FilePath+'filetosign'  , fmOpenRead );

        Crypto.SignDetached( FileStream , SignStringStream );


        inputbox( '' , '' , SignStringStream.DataString );

running on linux
cat filetosign | openssl dgst -sha1 -sign privatekey.pem | openssl enc -base64

on windows
type filetosign | openssl dgst -sha1 -sign privatekey.pem | openssl enc -base64

Now all gives the same result

Thank you



Topic viewed 4465 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!