Starting mountebank with HTTPS and certs failing

64 views
Skip to first unread message

P C

unread,
May 31, 2024, 8:05:42 PM5/31/24
to mountebank-discuss
We are using venafi for our certificates

{
            "name": "Mountebank Service",
            "port": 8443,
            "protocol": "https",
            "mutualAuth": true,
            "key": "-----BEGIN RSA PRIVATE KEY-----\nkeyvalue\n-----END RSA PRIVATE KEY-----",
            "cert": "-----BEGIN CERTIFICATE-----\ncertvalue\n-----END CERTIFICATE-----",
            "defaultResponse":{
                "statusCode": 403,
                "body": {
                    "Message": "Route not found"
                },
                "headers": {
                    "content-type": "application/json"
                }
            },
            <% include imposters/imposters.ejs %>
        }

mountebank unable to start

error: [mb:2525] error creating imposter: {"opensslErrorStack":["error:0688010A:asn1 encoding routines::nested asn1 error","error:068000A8:asn1 encoding routines::wrong tag","error:0688010A:asn1 encoding routines::nested asn1 error","error:068000A8:asn1 encoding routines::wrong tag"],"library":"DECODER routines","reason":"unsupported","code":"ERR_OSSL_UNSUPPORTED","message":"error:1E08010C:DECODER routines::unsupported","name":"Error","stack":"Error: error:1E08010C:DECODER routines::unsupported\n    at setKey (node:internal/tls/secure-context:93:11)\n    at configSecureContext (node:internal/tls/secure-context:204:7)\n    at Object.createSecureContext (node:_tls_common:116:3)\n    at Server.setSecureContext (node:_tls_wrap:1486:27)\n    at Server (node:_tls_wrap:1350:8)\n    at new Server (node:https:75:3)\n    at Object.createServer (node:https:133:10)\n    at Object.createNodeServer (C:\\Users\\USER\\AppData\\Roaming\\npm\\node_modules\\mountebank\\src\\models\\https\\httpsServer.js:32:40)\n    at create (C:\\Users\\ USER  \\AppData\\Roaming\\npm\\node_modules\\mountebank\\src\\models\\http\\baseHttpServer.js:71:33)\n    at Object.createServer (C:\\Users\\ USER  \\AppData\\Roaming\\npm\\node_modules\\mountebank\\src\\models\\protocols.js:35:34)"}
info: [http:30000 Claims Mocking Service] Open for business...
Error: 400
{
  "errors": [
    {
      "opensslErrorStack": [
        "error:0688010A:asn1 encoding routines::nested asn1 error",
        "error:068000A8:asn1 encoding routines::wrong tag",
        "error:0688010A:asn1 encoding routines::nested asn1 error",
        "error:068000A8:asn1 encoding routines::wrong tag"
      ],
      "library": "DECODER routines",
      "reason": "unsupported",
      "code": "ERR_OSSL_UNSUPPORTED"
    }
  ]
}
    at IncomingMessage.<anonymous> (C:\Users\ USER  \AppData\Roaming\npm\node_modules\mountebank\src\cli\api.js:32:28)
    at IncomingMessage.emit (node:events:531:35)
    at endReadableNT (node:internal/streams/readable:1696:12)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

anyone has an idea on the error?
The cert is valid per our cert team
Reply all
Reply to author
Forward
0 new messages