[SOLVED] Migrating from COMODO to LE: file equivalents?

I was previously with COMODO, and I have a simple http-proxy script like this:

var httpProxy = require('http-proxy')
var fs = require("fs")

var files = [
    "COMODORSADomainValidationSecureServerCA.crt",
    "COMODORSAAddTrustCA.crt",
    "AddTrustExternalCARoot.crt"
]

var caChain = []
files.forEach(file => {
    caChain.push(
        fs.readFileSync('./trusktr.io.cert/'+file)
    )
})

var options = {
    https: {
        ca: caChain,
        key: fs.readFileSync('./trusktr.io.key/trusktr.io.key', 'utf8'),
        cert: fs.readFileSync('./trusktr.io.cert/STAR_trusktr_io.crt', 'utf8')
    },
    // ...
}

httpsProxy.createServer(options).listen(443)

I’m wondering how to migrate from the COMODO files, which are

crts/
    AddTrustExternalCARoot.crt
    COMODORSAAddTrustCA.crt
    COMODORSADomainValidationSecureServerCA.crt
    STAR_trusktr_io.crt
key/
    trusktr.io.key

to the Let’s Encrypt files, which are

/etc/letsencrypt/keys/
    0000_key-letsencrypt.pem
/etc/letsencrypt/live/trusktr.io/
    cert.pem
    chain.pem
    fullchain.pem
    privkey.pem

. Any insights on what I might need to do? I wonder if I can use the .pem files, or if I’ll need to convert to .crt.

No need to convert anything, .crt and .key refer to PEM files containing certs and keys respectively. With LE the configuration will be a lot simpler as you’ll only need 3 files instead of 5:

  • trusktr.io.key -> privkey.pem
  • STAR_trusktr_io.crt -> cert.pem
  • The other 3 -> chain.pem

So you get get rid of var files and var caChain since that’s all just 1 file.

2 Likes

Thanks! Worked like a charm.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.