openssl
OpenSSL is an open-source cryptography toolkit implementing the SSL and TLS network protocols and the related cryptography standards required by them. It is a command-line tool for using the various cryptography functions of OpenSSL’s crypto-library from the shell. OpenSSL can be used for the creation and management of private keys, public keys, and parameters; public-key cryptographic operations; creation of x509 certificates, CSRs, and CRLs; etc.
table of contents
LIST
FROM [[]]
WHERE parent = this.file.link
Docs
Links
- OpenSSL - Calculating Digest Value
- OpenSSL - Generating PSK
- OpenSSL - Installation
- generation
- OpenSSL - get fingerprint from certificate
- openssl - get certificate from URL
- openssl - Common Algorithms
- openssl - file encryption
Flags
Generation of x509 certificates
View certificate information
openssl x509 \
--in server.crt \
-text \
--noout
View p7b chain
openssl pkcs7 -in yourfile.p7b -print_certs -noout
PEM file
openssl x509 -in server.pem -noout -text
Converting to PEM file from CRT and KEY
openssl x509 -inform DER -outform PEM -in server.crt -out server.crt.pem
cat server.crt server.key > server.includesprivatekey.pem
Debugging
openssl s_client -connect localhost:8081
Reference
Generating Fullchain certificate
OpenSSL create certificate chain with Root & Intermediate CA | GoLinuxCloud
Private key to pem
openssl rsa -in server.key -text > privatekey.pem
P12/PFX to P7B
openssl pkcs12 -in yourfile.pfx -out yourfile.pem -nodes
openssl crl2pkcs7 -nocrl -certfile yourfile.pem -out yourfile.p7b
P12/PFX to CRT
openssl pkcs12 -in $PFX -clcerts -nokeys -out $CRT
Installation in ios - forums
- ios - Installing OpenSSL library for Xcode - Stack Overflow
- Easy inclusion of OpenSSL into iOS projects
Reading public keys
Format wars
xcode linker flags
-lcrypto
-L/opt/homebrew/opt/[email protected]/lib
Build Settings > Search Path
/opt/homebrew/opt/[email protected]/include/openssl
Create PFX from CRT and Key
openssl pkcs12 -export -out tls.pfx -inkey tls.key -in tls.crt
Concat full chain
https://gist.github.com/singhabhinav/132b8196abac026b43fa
P12 to CER
openssl pkcs12 -in ca-client.p12 -clcerts -nokeys -out ca-client.cer