Estoy firmando paquetes en algunos códigos Java y quiero verificar las firmas en un servidor C. Quiero bifurcar openssl para este propósito (siempre puedo utilizar las funciones de la biblioteca más tarde ... cuando sé que openssl puede verificar las firmas); Sin embargo, es no hacerlo:verificar una firma de archivo con openssl dgst
openssl dgst -verify cert.pem -signature file.sha1 file.data
- todo lo que dice es "No se puede cargar archivo de clave"
El certificado dice:
openssl verify cert.pem
cert.pem: /C=....
error 20 at 0 depth lookup:unable to get local issuer certificate
Sin embargo , Específicamente no me importa verificar el certificado, solo quiero verificar la firma de un determinado ¡archivo!
La salida de openssl x509 -in cert.pem -noout -text
es:
Certificate:
Data:
Version: 1 (0x0)
Serial Number:
...
Signature Algorithm: sha1WithRSAEncryption
Issuer: C=...
Validity
Not Before: Feb 1 15:22:44 2010 GMT
Not After : Jun 19 15:22:44 2037 GMT
Subject: C=...
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
RSA Public Key: (2048 bit)
Modulus (2048 bit):
00:cc:cc:f9:c7:3a:00:0f:07:90:55:d9:fb:a9:fe:
...
32:cc:ee:7f:f2:01:c7:35:d2:b5:9b:35:dd:69:76:
00:a9
Exponent: 65537 (0x10001)
Signature Algorithm: sha1WithRSAEncryption
39:d6:2c:6b:6a:00:74:b5:81:c2:b8:60:d6:6b:54:11:41:8d:
...
8f:3e:3f:5d:b3:f8:dd:5e
Creo que hay algún problema con cert.pem. ¿Qué significa "openssl x509 -in cert.pem -noout -text"? –
@Anders Lindahl lo he agregado a la pregunta – Will