Skip to content

Instantly share code, notes, and snippets.

@GitarPlayer
GitarPlayer / cert.md
Created March 4, 2022 08:57
verify tls key and cert match
openssl x509 -noout -modulus -in server.crt| openssl md5
openssl rsa -noout -modulus -in server.key| openssl md5
# really cool feature of openssl
openssl s_server -cert server.crt -key server.key
# if the keys don't match you will get an error message
@GitarPlayer
GitarPlayer / grep.md
Last active March 4, 2022 08:51
grep that compares two configs a and b and finds all config lines present in file a and not in b. Of course a diff could do that, but sometimes you don't want to deal with the order or the differences of whitespaces. between the configs.
cat a
a
b
c
d
e
cat b
c
d