OpenSSL generar certificado der

Iniciado por Servia, 15 Agosto 2012, 12:50 PM

0 Miembros y 1 Visitante están viendo este tema.

Servia

Hola!

Estoy haciendo una app para google Chrome y para compilarla necesito generar una cert .pub y un .der.
Lo único que he encontrado respeto al tema son estos comandos:
openssl genrsa -out key.pub -des 1024
openssl req -new -x509 -key key.pub -out openssl_crt.pem -outform pem -config openssl.cnf
openssl x509 -in openssl_crt.pem -inform pem -out openssl_crt.der -outform der


Pero allí se generan archivos como el .conf y no entiendo muy bien que acaban haciendo, sólo veo que hace un key pair y luego convierte el pem a der pero el resultado aplicado en la app resulta como inválido.

Alguien puede guiarme en el tema o decirme como generar los citados archivos? Ni que sea un .exe que lo haga.

el-brujo

Openssl por defecto lo genera en PEM y tu tienes que transformalo en DER

Te recomiendo usar algo más "fuerte":


openssl genrsa -aes256 -out <name of your certificate>.key 4096


des 1024 es muy flojo :(

Para crear el certificado ssl (https) del foro sólo se necesita crear el .key y el .csr, no he usado nunca el .pem ni el der.

CitarPEM

Can contain all of private keys (RSA and DSA), public keys (RSA and DSA) and (x509) certificates. It is the default format for OpenSSL. It stores data Base64 encoded DER format, surrounded by ascii headers, so is suitable for text mode transfers between systems.

DER

Can contain all of private keys, public keys and certificates. It stored according to the ASN1 DER format. It is headerless - PEM is text header wrapped DER. It is the default format for most browsers

Citarx509 certificates and RSA keys can be stored using a number of different formats. Two common formats are DER (a binary format used primarily by Java and Macintosh platforms) and PEM (a base64 representation of DER with header and footer information which is used primarily by UNIX and Linux platforms). There is also an obsolete NET (Netscape server) format which was used by earlier versions of IIS (up to and including 4.0) and various other less common formats which are not covered in this article.

Convert a PEM file to DER

openssl x509 -outform der -in certificate.pem -out certificate.der


Aqui explican algo más de la conversión:

http://gagravarr.org/writing/openssl-certs/general.shtml
http://support.citrix.com/article/CTX106631/

Servia

Y por qué si sabe convertirlo no da opción a crearlo? Me parece un fail bastante grande :S Gracias por la info!!