OpenSSL

인증서/CSR/PRI 짝 맞춰보기

openssl x509 -in file.crt -pubkey -noout -outform pem | sha256sum
openssl req -in file.csr -pubkey -noout -outform pem | sha256sum
openssl pkey -in file.pri -pubout -outform pem | sha256sum
openssl x509 -noout -modulus -in file.crt | openssl md5
openssl rsa -noout -modulus -in file.pri | openssl md5
openssl req -noout -modulus -in file.csr | openssl md5

Finger print

  • openssl x509 -noout -fingerprint -SHA256 -inform pem -in 'some.crt'

Random Key Generate

OpenSSL Base64 Key generate 출처

# Base64
# Generates 32 random bytes (256bits) in a base64 encoded output:
openssl rand -base64 32
# Plaintext
# Generates 32 random characters (256bits):
openssl rand 32