Score:0

Understanding openssl. Where is the cert file?

de flag

I am using the command ...

openssl s_client -showcerts -connect reds-cluster-01:443

And I get the output:

depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA
verify return:1
depth=1 C = US, O = DigiCert Inc, CN = RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1
verify return:1
depth=0 CN = *.my-co-example.com
verify return:1
CONNECTED(00000003)
---
Certificate chain
 0 s:/CN=*.my-co-example.com
   i:/C=US/O=DigiCert Inc/CN=RapidSSL TLS DV RSA Mixed SHA256 2020 CA-1
-----BEGIN CERTIFICATE-----
MIIGnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgkqhkiG9w0BAQsFADBZ
...

I assume that means somewhere on the filesystem of my server there would be a file somewhere that has the string ...

MIIGnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgkqhkiG9w0BAQsFADBZ

... in it. How can I find that file without having to execute something like?

sudo grep -sr MIIGnxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxgkqhkiG9w0BAQsFADBZ /
vidarlo avatar
ar flag
If you're wondering where your server keeps it certificate, read the *config files* and documentation for the server! Certificates may be stored in binary form as well.
Red Cricket avatar
de flag
There are a lot of config files. Which ones?
vidarlo avatar
ar flag
If you don't know which service listens on port 443, that's your problem - not certificates.
Red Cricket avatar
de flag
@vidarlo `lsof -i :443` on my server tells me that `nginx` is listening on port 443. And looking at nginx conf tells me where the file is! Thanks
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.