Ver Mensaje Individual
  #7  
Antiguo 15-07-2015
[egostar] egostar is offline
Registrado
 
Registrado: feb 2006
Posts: 6.556
Reputación: 25
egostar Va camino a la fama
Cita:
Empezado por adripugliesso Ver Mensaje
En el firmado lo unico que hago es usar el shellExecute llamando a un Bat que lo que hace es ejecutar las lineas de Openssl.


Código Delphi [-]
procedure CreaXMLFirmado();
var p1: string;
    r: PAnsiChar;
begin
  memo1.Clear;
  memo1.Lines.Add('c:');
  memo1.Lines.Add('cd /');
  memo1.Lines.Add('cd OpenSSL-Win32');
  memo1.Lines.Add('cd bin');
  memo1.Lines.Add('openssl smime -sign -in ' + ruta + 'ticketsf.xml -out '+ ruta + 'ticketf.xml -inkey ' + ruta + 'cert.key -signer '+ruta +'cert.crt -outform PEM -nodetach ');
  memo1.Lines.SaveToFile(ruta + 'firmar.bat');
  memo1.Clear;

ShellExecute(0, 'open', PAnsiChar(ruta + 'firmar.bat'), 'param1 param2',
  nil,  SW_HIDE);
end;

tenes que tener instalado el Openssl en la ruta donde lo llamas
Muy interesante , muchas gracias.

Saludos
__________________
"La forma de empezar es dejar de hablar y empezar a hacerlo." - Walt Disney
Responder Con Cita