<commit_before># openssl

> OpenSSL is a cryptography toolkit.

- Check an SSL connection

`openssl s_client -connect {{domain}}:{{port}}`

- Generate new private key and CSR

`openssl req -out {{path/to/CSR.csr}} -new -newkey rsa:2048 -nodes -keyout {{path/to/pivate.key}}`

- Read contents of certificate, private key and CSR file

`openssl x509 -text -noout -in {{path/to/certificate.crt}}`
`openssl rsa -check -in {{path/to/pivate.key}}`
`openssl req -text -noout -verify -in {{path/to/CSR.csr}}`

- Check if certificate, private key and CSR have the same MD5 hash

`openssl x509 -noout -modulus -in {{path/to/certificate.crt}} | openssl md5`
`openssl rsa -noout -modulus -in {{path/to/pivate.key}} | openssl md5`
`openssl req -noout -modulus -in {{path/to/CSR.csr}} | openssl md5`<commit_msg>one command code per description<commit_after># openssl

> OpenSSL is a cryptography toolkit.

- Check an SSL connection

`openssl s_client -connect {{domain}}:{{port}}`

- Generate new private key and CSR

`openssl req -out {{path/to/CSR.csr}} -new -newkey rsa:2048 -nodes -keyout {{path/to/pivate.key}}`

- Read contents of a certificate

`openssl x509 -text -noout -in {{path/to/certificate.crt}}`

- Read contents of a private key

`openssl rsa -check -in {{path/to/pivate.key}}`

- Verify a CSR file

`openssl req -text -noout -verify -in {{path/to/CSR.csr}}`

- Check MD5 hash of a certificate

`openssl x509 -noout -modulus -in {{path/to/certificate.crt}} | openssl md5`

- Check MD5 hash of a private key

`openssl rsa -noout -modulus -in {{path/to/pivate.key}} | openssl md5`

- Check MD5 hash of a CSR file

`openssl req -noout -modulus -in {{path/to/CSR.csr}} | openssl md5`
{'fraction_non_alphanumeric': 0.1450653983353151, 'fraction_numerical': 0.0178359096313912, 'mean_word_length': 3.662049861495845, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7451506', 'n_tokens_mistral': 653, 'n_tokens_neox': 625, 'n_words': 205}