0

Im currently using Newman for automatically testing my Rest-API calls.

The problem is i can run all my tests in Postman without any problems, using the certificates (.pem and pkcs8) for ssl authorization within Postman is also not a problem. But when i try to load a Collection into Newman on the command-line, i cannot run the tests because the certificates - which are recommended correctly in Postman are not recommended corretly in Newman.

if i run:

newman run postman_collection.json --ssl-client-cert cert.pfx --ssl-client-passphrase passphrase

Then no request is executed. if I instead use:

newman run postman_collection.json --ssl-client-cert cert.crt --ssl-client-key key.pkcs8 client-passphrase passphrase

so Using the key and authorization certificate both separately (cert.crt, key.pkcs8) and not together in a .pfx file, then it executes requests but says that it "Couldnt validate first certificate", so every request returns an error.

How can i fix this?

1 Answer 1

0

You can workaround this using parameter --insecure instead parameters "--ssl-client-cert cert.crt --ssl-client-key key.pkcs8 client-passphrase passphrase"

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.