Ver Mensaje Individual
  #231  
Antiguo 02-10-2010
edgaronfo edgaronfo is offline
Miembro
 
Registrado: jul 2007
Posts: 33
Reputación: 0
edgaronfo Va por buen camino
Talking Liiissto!

Cita:
Empezado por Morrismx Ver Mensaje
Edgar, asegurate de hacer los cambios a la funcion

Código Delphi [-]
function GetNoCertificado(const AFileName: string): string;
var
bp: pBIO;
fn: PAnsiChar;
x: pX509;
x509: pX509;
bn: pBIGNUM;
num: array [0..19] of AnsiChar;  <<==== Este es el cambio
begin
InitOpenSSL;
fn := PAnsiChar(ansistring(AFileName));
bp := BIO_new(BIO_s_file());
BIO_read_filename(bp, Pchar(fn));
x := X509_new;
x509 := PEM_read_bio_X509(bp, x, nil, nil);
bn := ASN1_INTEGER_to_BN(X509_get_serialNumber(x509), nil);
BN_bn2bin(bn, @num[0]);
BN_free(bn);
X509_free(x509);
BIO_free(bp);
Result := num;
EVP_cleanup;
end;

el resto de la funcion no cambia, solo reemplza Char por AnsiChar y listo

dejame saber si te funciona

saludos
Morris

CLARO!!!!!! Aaaaarg qué coraje!!!! qué ciego estaba!

Ya está!

Chihuahua! Un día entero buscando la solución y en mis narices estuvo todo el tiempo! jajajaja, a veces eso pasa verdad?...

MUCHISISISISÍSIMAS GRACIAS MORRIS!!!!

Eso era.

Gracias y Saludos!!!!!
Responder Con Cita