How setup a certificate using Newman?

Hi!

I’ve a collection of requests that are successfully executed on Postman. For these to work, I had to load a PFX certificate on the settings menu of Postman as well as to set up the passphrase. In addition, on each request, I had also to fill the Basic Authentication fields with a username and password. Well, no problem here.

Now, when I try to run the same collection on Newman I get the below error message:

write EPROTO 24504:error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1546:SSL alert number 42

I assume this is related with the certificate but I don’t know how to deal with this in Newman.
Can someone help me?

Thanks in advance!
Best regards

I’ve created a json file with the details of my certificate as I present below but got no joy.
I used the command line with the following command:

newman run BasicOperations.postman_collection.json --ssl-client-cert-list certificate.json

but I got the same error:

[errored]
     write EPROTO 26504:error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1546:SSL alert number 42
.

Below the content of the JSON certificate:

[
{
“name”: “My certificate”,
“matches”: [“https://testapi.xpto.com”],
“pfx”: {
“src”: “/C:/Users/xpto/OneDrive/#01Folder/API/certificate_file_api.p12”,
“passphrase”: “password_xpto”
}
}
]

Any help here?