Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client Certificate, mTLS, ERR_OSSL_UNSUPPORTED #3398

Open
marc8405 opened this issue Nov 1, 2024 · 0 comments
Open

Client Certificate, mTLS, ERR_OSSL_UNSUPPORTED #3398

marc8405 opened this issue Nov 1, 2024 · 0 comments

Comments

@marc8405
Copy link

marc8405 commented Nov 1, 2024

Error:
ERR_OSSL_UNSUPPORTED

Topic
Client Certificate, mTLS,
I need to set Client Certificate

VERSION INFO:
Artillery: 2.0.21
Node.js: v18.20.2
OS: win32

Running this command:
artillery run _test4OpenSSLError.yaml

I expected to see this happen:
return Http200

Please validate:
key: 'C:\temp\mypem-key.pem'
cert: 'C:\temp\mypem-cert.pem'

Instead, this happened:

2024-11-01T06:59:18.324Z http RequestError: error:1E08010C:DECODER routines::unsupported
    at Request._makeRequest (C:\eplatform\tools\node\v18\node_modules\artillery\node_modules\got\dist\source\core\index.js:1191:19)
    at C:\eplatform\tools\node\v18\node_modules\artillery\node_modules\got\dist\source\core\index.js:334:28
    at setKey (node:internal/tls/secure-context:93:11)
    at configSecureContext (node:internal/tls/secure-context:200:7)
    at Object.createSecureContext (node:_tls_common:117:3)
    at Object.connect (node:_tls_wrap:1750:48)
    at HttpsAgent.createConnection (node:https:158:22)
    at HttpsAgent.createConnection (C:\eplatform\tools\node\v18\node_modules\artillery\node_modules\agentkeepalive\lib\https_agent.js:29:49)
    at HttpsAgent.createSocket (node:_http_agent:341:26)
    at HttpsAgent.addRequest (node:_http_agent:288:10)
    at new ClientRequest (node:_http_client:342:16)
    at request (node:https:366:10)

errors.ERR_OSSL_UNSUPPORTED: ................................................... 1
vusers.created: ................................................................ 1
vusers.created_by_name.0: ...................................................... 1
vusers.failed: ................................................................. 1

Request / Certificate / pem is ok with:
a) Postman
b) Artillery using customer.js, customer.js reads cert and key

Files being used:

config:
  target: 'https://mybaseurl:8443'
  tls:
    rejectUnauthorized: false
    key: 'C:\temp\mypem-key.pem'
    cert: 'C:\temp\mypem-cert.pem'
  http:
    defaults:
      headers:
        Context: 'eyJ0eXAiOiJKV…'
        Accept-Language: 'de'
        Content-Type: 'application/json'
custom.js
  // Define request options with mTLS and the selected Context value
  const options = {
    ...
    method: 'GET',
    key: fs.readFileSync('C:\\...'),
    cert: fs.readFileSync('C:\\...'),
    rejectUnauthorized: false, 
    headers: {
      'Context': ...,
      'Accept-Language': 'de',
      'Content-Type': 'application/json'
    }
  };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant