OpenSSL

Материал из pNp Wiki
Версия от 11:10, 28 апреля 2020; Andy (обсуждение | вклад) (Конвертация p11 в pem)

(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Получение SSL сертификата с сервера

# openssl s_client -showcerts -connect ipa-01.example.com:636 < /dev/null 2> /dev/null | openssl x509 -outform PEM > /home/andy/ipa-01.example.com.pem

Конвертация p12 в pem

# openssl pkcs12 -in mycert.p12 -out file.key.pem -nocerts -nodes
# openssl pkcs12 -in mycert.p12 -out file.crt.pem -clcerts -nokeys

Получение отпечатка SSL сертификата с сервера

# openssl x509 -in /home/andy/example.pem -noout -md5 -fingerprint

Получение информации о SSL сертификате в человекочитаемом формате

# openssl x509 -in /home/andy/example.pem -text -noout

Получение crt и key из pfx

# openssl pkcs12 -in /home/andy/test.pfx -nocerts -nodes -out /home/andy/example.key
# openssl pkcs12 -in /home/andy/test.pfx -clcerts -nokeys -out /home/andy/example.crt

Получение SPKI pin для DNS-over-TLS

# openssl s_client -connect '145.100.185.16:853' < /dev/null 2> /dev/null | openssl x509 -pubkey -noout | openssl pkey -pubin -outform der | openssl dgst -sha256 -binary | openssl enc -base64

CertUtil

Добавление сертификата в базу NSS

# certutil -A -n win.example.com -t CTcu -d /etc/openldap/certs/ -a -i /root/win2012.win.example.com.cer

Получение информации о SSL сертификате в человекочитаемом формате

# certutil -L -n win.example.com -d /etc/openldap/certs/ -a | openssl x509  -text -noout


Ссылки

О сертификатах