Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: Delphi, Indy 10 and Open SSL. Sign messages



Permlink Replies: 2 - Last Post: Oct 24, 2017 9:22 AM Last Post By: Remy Lebeau (Te...
Pablo Romero

Posts: 21
Registered: 9/28/00
Delphi, Indy 10 and Open SSL. Sign messages
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 23, 2017 3:47 PM
Hi

I have a question

I usually use to sign tickets to negotiate with a webservice, an old
library called "OpenSSL for Delphi". I use it this way:

      fsigner  := TMessageSigner.Create;
      try
        fsigner.LoadPrivateKey( strPrivateKey, strPasswordKey );
        fsigner.LoadCertificate( strCertificado );
        fsigner.PlainMessage := fticket.text; //file with XML
 
        fsigner.MIMESign; <--- internally, calls the OpenSSL PKCS7_SIGN 
and SMIME_write functions...
 
        s := fsigner.SignedMessage;
 
        if s = '' then
           raise Exception.Create('(OpenSSL fsigner.MIMESign)');
 
      except
         on e:Exception do  // posible error OpenSSL
         begin
            TicketAFIP.Errores := 'Se produjo un error al firmar el 
ticket de acceso al webservice de autenticación de AFIP (WSAA).' + #13 + 
'Descripción Técnica:' + e.Message;
         end;
       end;


My question is: Does Indy 10 (in Delphi XE3/XE7 and 10.2) have similar
functions? If so, how do I use them?

Regards

Pablo Romero
Cordoba, Argentina
Pablo Romero

Posts: 21
Registered: 9/28/00
Re: Delphi, Indy 10 and Open SSL. Sign messages
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 24, 2017 6:52 AM   in response to: Pablo Romero in response to: Pablo Romero
Nevermind. It'as a matter of signing. I need something to sign messages
like LockBox3 -undocummented and very hard-. Or something that uses
OpenSSL inside Delphi. Indy does not natively support encryption and
signing of packages.

Regards

El 23/10/2017 a las 19:47, Pablo Romero escribió:

Hi

I have a question

I usually use to sign tickets to negotiate with a webservice, an old
library called "OpenSSL for Delphi". I use it this way:

       fsigner  := TMessageSigner.Create;
       try
         fsigner.LoadPrivateKey( strPrivateKey, strPasswordKey );
         fsigner.LoadCertificate( strCertificado );
         fsigner.PlainMessage := fticket.text; //file with XML
 
         fsigner.MIMESign; <--- internally, calls the OpenSSL PKCS7_SIGN
and SMIME_write functions...
 
         s := fsigner.SignedMessage;
 
         if s = '' then
            raise Exception.Create('(OpenSSL fsigner.MIMESign)');
 
       except
          on e:Exception do  // posible error OpenSSL
          begin
             TicketAFIP.Errores := 'Se produjo un error al firmar el
ticket de acceso al webservice de autenticación de AFIP (WSAA).' + #13 +
'Descripción Técnica:' + e.Message;
          end;
        end;


My question is: Does Indy 10 (in Delphi XE3/XE7 and 10.2) have similar
functions? If so, how do I use them?

Regards

Pablo Romero
Cordoba, Argentina
Remy Lebeau (Te...


Posts: 9,447
Registered: 12/23/01
Re: Delphi, Indy 10 and Open SSL. Sign messages
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 24, 2017 9:22 AM   in response to: Pablo Romero in response to: Pablo Romero
Pablo Romero wrote:

My question is: Does Indy 10 (in Delphi XE3/XE7 and 10.2) have
similar functions?

No, it does not. Indy does not support SMIME at this time.

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02