Bloque4-Tema9-OpenSSL Flashcards

1
Q

Ver info de CRL

A

openssl crl -inform PEM -text -in test.crl

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Ver solo encabezado

A

openssl crl -inform PEM -text -in test.crl | head

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Ver series de revocados

A

openssl crl -inform DER -text -in test.crl | grep ‘Serial|Revocation’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Buscar si un certificado está revocado (buscar serial)

A

openssl crl -inform DER -text -in test.crl | grep -A1 ‘numeroserial’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Crear clave privada y cert

A

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out test.pem -days 365

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Que es CSR(certificate Signing request)

A

En los sistemas de infraestructura de clave pública, una certificate signing request es un mensaje enviado por un solicitante a una autoridad de registro de la infraestructura de clave pública para solicitar un certificado de identidad digital.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Crear una privada y CSR

A

openssl req -newkey rsa:2048 -keyout PRIVATEKEY.key -out MYCSR.csr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Crear CSR de una privada ya existente

A

openssl req -new -key PRIVATEKEY.key -out MYCSR.csr

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Crear publica a partir de privada

A

openssl rsa -in mykey.pem -pubout > mykey.pub

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Crear publica a partir de csr

A

openssl req -in csr.txt -noout -pubkey -out publickey.pem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Ver info certificado

A

openssl x509 -in test.cer -text -noout

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Convertir DER a PEM

A

openssl x509 -inform der -in test.cer -out test.pem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Ver info de clave pública

A

openssl asn1parse -i -in test.pem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Validar que un cert corresponde a una CA

A

openssl verify -verbose -CAfile Intermediate.pem UserCert.pem

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Agregar password a una private key sin pass

A

openssl pkcs8 -topk8 -in source.key -out encrypted.key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Crear un certificado con una key de CA

A

openssl x509 -req -days 360 -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt

17
Q

Crear una clave privada

A

ssh ssh-keygen -f newkey.key -t rsa -b 4096

18
Q

crear una publica ssh a partir de una privada

A

ssh-keygen -y -f id_rsa

19
Q

Cambiar formato de publica de SSH2 a OpenSSH

A

ssh-keygen -i -f ssh2_pub_key > pub_key.pub

20
Q

Ver info de un jks/pfx/p12

A

keytool -list -keystore keystore.jks

21
Q

Exportar private key a partir de pfx

A

openssl pkcs12 -in certname.pfx -nocerts -out key.pem -nodes

22
Q

Exportar certificado a partir de pfx

A

openssl pkcs12 -in certname.pfx -nokeys -out cert.pem

23
Q

Crear pfx/p12 a partir de key y cert

A

openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt

24
Q

Encriptar simétrico

A

openssl enc -aes-256-cbc -a -salt -in archivoAEncriptar.txt -out archivoEncriptado.txt

25
Q

Encriptar asimétrico

A

openssl rsautl -encrypt -inkey public.pem -pubin -in archivoAEncriptar.txt -out archivoEncriptado.txt

26
Q

Decriptar asimétrico

A

openssl rsautl -decrypt -inkey priv.pem -in archivoEncriptado.txt -out archivoDecriptado

27
Q

Firmado.

A

openssl dgst -sha256 data.txt > hash
openssl rsautl -sign -inkey privatekey.pem -keyform PEM -in hash >signature

28
Q

verificar firma

A

openssl rsautl -verify -inkey publickey.pem -pubin -keyform PEM -in signature