# Socket hang up error in Newman using PFX certificate

**URL:** <https://community.postman.com/t/socket-hang-up-error-in-newman-using-pfx-certificate/24723>\
**Category:** Help Hub\
**Tags:** newman-project, authentication\
**Created:** [June 9, 2021, 5:51pm UTC](https://community.postman.com/t/socket-hang-up-error-in-newman-using-pfx-certificate/24723 "2021-06-09T17:51:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sketha27](https://avatars.discourse-cdn.com/v4/letter/s/d78d45/32.png) [@Sketha27](https://community.postman.com/u/Sketha27)\
**Post date:** [June 9, 2021, 5:51pm UTC](https://community.postman.com/t/socket-hang-up-error-in-newman-using-pfx-certificate/24723/1 "2021-06-09T17:51:30Z")

</div>

> **Archived topic — this may be out of date.**  
> Newman has been replaced by the **[Postman CLI](https://learning.postman.com/docs/postman-cli/postman-cli-overview/)**, Postman’s official, signed command-line tool. It runs collections as Newman did, and also lints API specs, runs mocks and monitors, and syncs local files with Postman from your terminal, CI/CD pipeline or coding agent.  
> Working with an AI coding agent? The [Postman plugin](https://github.com/postmanlabs/postman-plugin) lets agents in Claude Code, Cursor, Codex and others design, mock, test and ship APIs with Postman.  
> For current help, see the [Postman docs](https://learning.postman.com/docs/), try the free [Postman tools](https://www.postman.com/tools) (no account needed), or join us on [Discord](https://discord.gg/58aNNsRBGR).

Hello Team,

I have a PFX certificate configured for my API and when I hit it from Postman I am able to view the response but when doing the same from Newman I getting a socket hang-up error.

the script which I have used for Newman is below

```auto
newman run testSample.postman_collection.json --ssl-client-cert-list certificate.json

```

the following was configured as certificate.json

```auto
[
  {
    "name": "localhost certificates",
    "matches": [
      "https://xxxxxxxxxxx.yyy.xxxxxx.com"
    ],
    "pfx": { "src": "/Users/xxxxxx/Documents/devclient.p12" },
    "passphrase": "password"
  }
]

```

Note: For matches, I have given the same values which were entered for the host in the certificate tab of the postman

I have also referred to the link below for assistance but no luck

> <https://github.com/postmanlabs/newman/issues/2165>
>
> Hi,
> 
> Please help me out here , am getting error \*\*error:0906D06C:PEM routines:…PEM\_read\_bio:no start line\*\* when pfx file is used with passphrase in newman. Same pfx file works fine in postman.
> 
> commandline used as below: 
> \*\*node newman.js run "collectionfile" -e "environmentfile" --insecure --ssl-client-cert "abc.pfx" --ssl-client-passphrase "abc" --reporters cli,html --reporter-html-export\*\*
> 
> 1. Newman Version: 4.5.5
> 2. OS details: Windows 7
> 3. Are you using Newman as a library, or via the CLI? CLI
> 3. Did you encounter this recently, or has this bug always been there: Tried this option recently
> 4. Expected behaviour: PFX with passphare should work
> 
> 
> Steps to reproduce the problem:
> 
> 1. extracted pfx file from jks keystore using keytool
> 2. Used --ssl-client-cert option to point to pfx and no key file option was given
> 3. Executing this in CLI throws error \*\*error:0906D06C:PEM routines:PEM\_read\_bio:no start line\*\*

Kindly let me know if I am missing something over here.
