Unable to verify the first certificate postman ошибка

Comments

@gduh

Describe the bug

When I try to send a HTTPS POST request from a desktop (Servers are in production environment) the following message is displayed inside the console :

Error: unable to verify the first certificate

To Reproduce

Steps to reproduce the behavior:

  1. POST request using HTTPS
  2. Authorization Type : Basic Auth (including Username and Password)
  3. Headers :
    • Content-Type application/x-www-form-urlencoded
    • Accept application/json
  4. Body, including some parameters
  5. Send request and get the error message instead of the server’s response

App information (please complete the following information):

Postman for Mac
Version 6.7.4
OS X 18.2.0 / x64

Additional context

If I try to send the same request with the same Headers, Authorization, Body… with CURL, I get the right response, moreover CURL verifies the certificate as valid.

jakezatecky, bernardodesousa, EngrMikolo, javentic, scheffershen, hosseinhayati128, AdamCaviness, keguigong, mikestaub, borbonch, and 9 more reacted with thumbs up emoji

@codenirvana

@gduh Looks like the server certificate is somehow invalid and it’s not possible to debug the root cause from the details you provided.

So, quick sanity to make sure this issue is related to SSL/TLS, try sending the request with the «SSL certificate verification» option disabled. (Settings -> General -> Request)

If the server requires client certificates to be sent with the request, configure appropriate client certificates. (Settings -> Certificates -> Client Certificates)

And if you are trying to request an untrusted host (e.g, localhost) add the CA certificate of the server. (Settings -> Certificates -> CA Certificates)

Also, check if there’s any warning/debug message when you make the request using curl with the -v flag.

Note: Update your Postman app to latest (v7.0.9)

MarcusBondezan, rmorrise, prathmesh-parmar, iwillrod, aniketgade, AmourLinux, Jehad1965, rubensvsx, hembk44, Jedarc, and 54 more reacted with thumbs up emoji
Stegnerd and kadamsukhada7 reacted with hooray emoji
husam-ebish and niharika68 reacted with heart emoji
jazelmett, 839998664, ninoid, huddlestonka, giovanni-orciuolo, miroprocessor, husam-ebish, Ufo8MyCat, and Jeniffen reacted with rocket emoji

@gduh

@codenirvana With the option «SSL certificate verification» disabled the request is ok and the answer corresponds to the expected result.

As mentioned in my first message, if I make the request using curl (with -v flag) not only the answer is OK, but also, curl says that SSL certificat verify ok and domain name matches certificate without any warning or issue !

In the same way, If I send the same request, using java code, it’s OK !

@gduh

I update my Postman to latest, but it’s the same.
If it can help you to investigate further, I can send you more information about the request but only in private, for that I need to create you an account in our server. Just tell me.

@gduh

On the server, there is no intermediate certificate, could that be an issue with Postman ?

@vol24pl

I’m having the same issue.

Env: MacOS Mojave 10.14.5 (18F132)

Simple dotnet core webApi on localhost:

dotnet new webapi

certificates are added:

$ dotnet dev-certs https --trust
Trusting the HTTPS development certificate was requested. If the certificate is not already trusted we will run the following command:
'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <<certificate>>'
This command might prompt you for your password to install the certificate on the system keychain.

GET: https://localhost:5001/api/items

On Postman Console: Error: unable to verify the first certificate
On Safari: Works, displays expected JSON.

After: Postman -> Preferences -> General -> SSL certificate validation -> OFF it works

AsimShakour, AmourLinux, yadavpa1, mciandre78, gblikas, vipinrana, maitrungduc1410, simoebenhida, atulsinha7, brightertools, and 39 more reacted with thumbs up emoji
maitrungduc1410, RusimbiPatrick, yasirmturk, Kolo7, and aavdiu reacted with laugh emoji
maitrungduc1410 and golcsa-renato reacted with hooray emoji
maitrungduc1410, Mnabawy, RusimbiPatrick, golcsa-renato, miyashita-hi-ts, kathysuarez24, and thangchung reacted with heart emoji
maitrungduc1410, Mnabawy, and golcsa-renato reacted with rocket emoji
maitrungduc1410, GeovaniDarcie, and DanielVenturini reacted with eyes emoji

@schinivision

Using Postman v7.2.0 I also have this problem….
Error: unable to verify the first certificate

Server Certificate is valid and can be verified… (by chrome for example) could it be that Postman only supports certificates that are delivered with the whole chain?

Setup is: GCP HTTPS Forwarding rule -> https proxy (terminate ssl) -> Loadbalancer -> Service

@jkshan

Any update on this issue, I’m facing this for service hosted under Digitcert with EV.

@AsimShakour

I’m having the same issue.

Env: MacOS Mojave 10.14.5 (18F132)

Simple dotnet core webApi on localhost:

dotnet new webapi

certificates are added:

$ dotnet dev-certs https --trust
Trusting the HTTPS development certificate was requested. If the certificate is not already trusted we will run the following command:
'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <<certificate>>'
This command might prompt you for your password to install the certificate on the system keychain.

GET: https://localhost:5001/api/items

On Postman Console: Error: unable to verify the first certificate
On Safari: Works, displays expected JSON.

After: Postman -> Preferences -> General -> SSL certificate validation -> OFF it works

Thank you @vol24pl that worked ^

@gblikas

I am still having this problem. Is it possible that it also depends on the type of SSL Certificate installed on the server?

@gblikas

@gduh So, solved it for the server I was trying to contact. You are correct, the intermediary certificates need to be in place.

Notes

Sites like https://www.namecheap.com/, often send the .crt files and the intermediaries separate. You should append all of them together, and re-deploy your server, in order to correct this problem.

In general, I think the error returned by PostMan, Error: unable to verify the first certificate is suitable, however, once SSL verification is off, SSL certificate verify ok is probably a misnomer and should be replaced with something else.

@patrickHub

@codenirvana With the option «SSL certificate verification» disabled the request is ok and the answer corresponds to the expected result.

As mentioned in my first message, if I make the request using curl (with -v flag) not only the answer is OK, but also, curl says that SSL certificat verify ok and domain name matches certificate without any warning or issue !

In the same way, If I send the same request, using java code, it’s OK !

It work for me thanks

@atulsinha7

I’m having the same issue.

Env: MacOS Mojave 10.14.5 (18F132)

Simple dotnet core webApi on localhost:

dotnet new webapi

certificates are added:

$ dotnet dev-certs https --trust
Trusting the HTTPS development certificate was requested. If the certificate is not already trusted we will run the following command:
'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain <<certificate>>'
This command might prompt you for your password to install the certificate on the system keychain.

GET: https://localhost:5001/api/items

On Postman Console: Error: unable to verify the first certificate
On Safari: Works, displays expected JSON.

After: Postman -> Preferences -> General -> SSL certificate validation -> OFF it works

Thanks. worked like a charm 👌

@joelrevans

I am having this issue with requests to all hosts, even to google. The following is a console error in response to a basic request to https://google.com. Ironically the request to http://google.com does not have this error.

image

Disabling the SSL certificate validation prevents this error.

@archfish

This is caused by the order in which the certificates are merged.
You should put domain certificate before the bundle.

like :

cat domain.my.crt bundle.crt > domain.my.chained.crt

Hope help!

@bernardodesousa

@archfish This is happening to me with a certificate made by the certbot program, by Let’s Encrypt. The bot creates the chainkey.pem to me. I didn’t cat them together.

If I simply open the chain with a text editor and swap the two certs inside, the server (Daphne in my case) complains the private key doesn’t match the chain and exits.

I suspect the order is correct in my case, since my chain was created by certbot. Any thoughts on other things that can cause the same error?

@archfish

@archfish This is happening to me with a certificate made by the certbot program, by Let’s Encrypt. The bot creates the chainkey.pem to me. I didn’t cat them together.

If I simply open the chain with a text editor and swap the two certs inside, the server (Daphne in my case) complains the private key doesn’t match the chain and exits.

I suspect the order is correct in my case, since my chain was created by certbot. Any thoughts on other things that can cause the same error?

@bernardodesousa Sorry to hear that i have no idea.

@kenvis

I had the same Issue I solve it going to: File->Settings->General — SSL Certificate Verification OFF
Postman SSL Certificate

dengere, Krishnabisht07, glaucohd, payhr2020, gmbalaa, BoukhariAyoub, Mustafatahir65, zadigus, jjbhatt, nkharlanova, and 3 more reacted with thumbs up emoji
igor9silva, JeroenBvbZo, WanderleiMonteiro, dsanders2, and brenthompson2 reacted with thumbs down emoji
Mustafatahir65, kaskazurek, nkharlanova, and darko998 reacted with heart emoji

@EngrMikolo

@gduh Looks like the server certificate is somehow invalid and it’s not possible to debug the root cause from the details you provided.

So, quick sanity to make sure this issue is related to SSL/TLS, try sending the request with the «SSL certificate verification» option disabled. (Settings -> General -> Request)

If the server requires client certificates to be sent with the request, configure appropriate client certificates. (Settings -> Certificates -> Client Certificates)

And if you are trying to request an untrusted host (e.g, localhost) add the CA certificate of the server. (Settings -> Certificates -> CA Certificates)

Also, check if there’s any warning/debug message when you make the request using curl with the -v flag.

Note: Update your Postman app to latest (v7.0.9)

This worked for me. Thanks.

@MSchreijen

I am having this exact issue. «SSL certificate validation» is turned off (I did turn it on and off a couple of times). I am developing an ASP.NET Core application, with a self signed certificate, which I have trusted in Microsoft Certification Manager.

@realFranco

I simply add a new header:

Content-Security-Policy: upgrade-insecure-requests

In any case, the issue it is from the server side, I miss some configurations while I install the SSL certificate.

@EngrMikolo

Thanks for the reply.

Sent from my iPad

On 1 Nov 2020, at 3:24 PM, Franco Gil ***@***.***> wrote:


I simply add a new header:

Content-Security-Policy: upgrade-insecure-requests

In any case, the issue it is from the server side, I miss some configurations while I install the SSL certificate.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.

@tsarkoff

If you have access to certificates management on your Web hosting, then instead of just root.crt — you shall assign the root-CA.crt (file) certificate, that consists of two certificates in single file = 1st intermediate cert string + 2nd root string. The 2nd cert must go after 1st one in the file starting new line w/o spaces.
I had the same POSTMAN problem and after re-assigning a correct intermediate+root cert = problem disappeared w/o turning Postman’s Sertificate validation option OFF.
Of course, if no way to correct root-CA.crt (like Google, etc) — then that Postman’s option = OFF.

@Pavesi99

I set the startup as it is and works fine,

public void ConfigureServices(IServiceCollection services)
      {
          services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_3_0);

          services.AddControllers();
          services.AddDbContext<AppDbContext>(options => {
              options.UseInMemoryDatabase("APIBlogs-in-memory");
          });
          services.AddScoped<IUserRepository, UserRepository>();
          services.AddScoped<IUserService, UserService>();
      }

      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }

          app.UseHttpsRedirection();
          app.UseRouting();

          app.UseAuthorization();

          app.UseEndpoints(endpoints =>
          {
              endpoints.MapControllers();
          });
      }

@gjd6640

Clarifying question:

There may be multiple use-cases in play among the folks having these problems. Potential options:

    1. My use-case: I’ve already configured Windows to trust my org’s self-signed certificates and just want Postman to mirror Windows’ CA certificate trust behaviors.
    1. Questionable use-case / seems to be what today’s functionality solves: Need is to independently specify what root certificates are to be trusted by Postman. Possibly to emulate trust circumstances that aren’t present in the local OS’s trust store.

Note that I’m not asserting that # 2 is a use-case that anyone actually has…

I’ve observed that Google Chrome uses the local OS’s trust store so that is a doable thing.

Please consider reviewing the use-case(s) that drove the current implementation of Postman’s CA trust functionality. You may find that simplifying the solution to address only use-case # 1 is an option.

@Udayta

When I try to send a HTTPS POST request from a desktop (Servers are in production environment) the following message is displayed inside the con: unable to verify the first certificate

Warning: Unable to verify the first certificate
Network
I unable to solve it after going to: File->Settings->General — SSL Certificate Verification OFF

@zingrx

Here you go the solution, see step 12
[https://forums.ivanti.com/s/article/Postman-responds-to-API-calls-with-Error-Unable-to-verify-the-first-certificate?language=en_US]

@mchallenger88

I’ve done all of the above including adding a cert and still get the same error:

Warning: Unable to verify the first certificate

@igor9silva

For everyone setting SSL Certificate Verification to OFF, this is NOT a solution. You’re just telling Postman to accept an insecure connection!

The root case is a misconfigured web server.

@Kirill

@igor9silva this not misconfigured web-server. It’s problem in Electron and other for root certificates witch use Let’s Encrypt… Browser work with this certificates well.

@igor9silva

@lucianobustos

@igor9silva
I know the risks and I want to connect anyway. (Is a development server). What can I do?? I’m facing this issue with Postman v9.0.5.
I’ve installed the Self Signed Certificate and Chrome works properly.
I think something is not working in postman. (also I’ve try to use the certs inside postman)

@igor9silva

@lucianobustos this

I had the same Issue I solve it going to: File->Settings->General — SSL Certificate Verification OFF
Postman SSL Certificate

@lucianobustos

@lucianobustos this

I had the same Issue I solve it going to: File->Settings->General — SSL Certificate Verification OFF
Postman SSL Certificate

Yes that options prompt automatically. I need to restart windows 😏
Thanks!

@DannyDainton
DannyDainton

changed the title
Error: unable to verify the first certificate (Basic auth)

Unable to verify the first certificate

Apr 28, 2022

@bpetty-interlace

Would it be possible for Postman to provide more verbose information as to why?
We ran into this on a customer site and I used postman to confirm it, even though Chrome said it was a valid cert.
Being a developer and not necessarily an expert in cert management, I didn’t know if Postman could more eloquently state why it felt the cert was invalid so that I could bubble up more information.

@HarpreetKaur333

I’ve done all of the above, still the same issue (SSL Certificate verification OFF)?

any hint please

Warning: Unable to verify the first certificate

@EngrMikolo

@HarpreetKaur333

@TianLanSky

unable to verify first certificate?
maybe it because of that web server need to provide all the certificates in certificate chain when ssl/tls negotiation

@entc

I have the same issue. The certificate is from a certificate organisation and it works with any other program: curl, browsers, etc… without an invalid certificate notation

@openHawkes

There does seem to be an IIS Express specific snafu here that might need some attention. As the OP of the SO question cited here remarked (and had upvoted 29 times)…

Everywhere you pointed i have turned off SSL certificate and error still showing up, i don’t understand why people giving -1 when somebody have uncommon issue.

Same deal in this thread — in this comment with five upvotes @MSchreijen mentions

I am having this exact issue. «SSL certificate validation» is turned off (I did turn it on and off a couple of times). I am developing an ASP.NET Core application, with a self signed certificate, which I have trusted in Microsoft Certification Manager.

That’s the boat I’m (and apparently a number of others) are in. Sounds like it might be a certificate ordering issue?

But the bottom line is that Postman is acting more temperamentally in this situation than any of the other apps we use to access these endpoints, and that would benefit from some sleuthing, I think.

I have my brand new .NET Core service with API and I want to get list of items inside it. It’s hosted on localhost and I always have this error:

16 ms
Warning: Unable to verify the first certificate
Network
Request Headers
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Postman-Token: e64e10c3-8e3a-4b47-9427-d994e2bdc9fd
Host: localhost:44397
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Request Body
Response Headers
Transfer-Encoding: chunked
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Tue, 19 Ja

n 2021 14:06:14 GMT
Response Body

How to fix it? I disabled/enabled SSL certification but it no helps.

TylerH's user avatar

TylerH

20.7k65 gold badges73 silver badges98 bronze badges

asked Jan 19, 2021 at 14:10

Obyi's user avatar

6

There are 3 places to disable ssl verification:

  1. Request level: make sure it is off

enter image description here

  1. Global level: (Request level will have precedence)

enter image description here

  1. Remove client and CA certificate, turn it to off :

enter image description here

answered Jan 19, 2021 at 15:09

PDHide's user avatar

PDHidePDHide

17.7k2 gold badges30 silver badges45 bronze badges

4

May be you forgotten to add this lines into Program.cs,

app.UseAuthentication();
app.UseAuthorization();

answered Jun 3, 2022 at 9:21

Mucahid Uslu's user avatar

1

First, your OS (Windows, Mac, Linux) must trust this certificate.

Then, in Postman, go to Settings > Certificates, and enable CA certification, then select the same trusted certificate.

answered Aug 15, 2021 at 6:21

zinger's user avatar

zingerzinger

3202 silver badges9 bronze badges

I had the same issue with the Postman unable to verify the first certificate. The same localhost endpoint worked within a browser, but not in Postman while running in debug in VS. In my case re-installing IIS Express fixed the problem.

answered Feb 25, 2022 at 19:45

samsu's user avatar

samsusamsu

637 bronze badges

upload the root ca of the certificate issuer in postman and it will work

answered Jul 7, 2022 at 14:18

Ramirez Xavior's user avatar

2

For me the issue was that my controller was annotated with a router template [Route("api/[controller]")] but my endpoints were not.
Adding endpoint annotations worked:

HttpGet("get")]
public string Get()
{
    return "get";
}

answered Mar 2 at 13:14

Stanimir Yakimov's user avatar

1

Postman

Loading

This blog article shows you one of the possible workarounds to the get rid of the error “unable to verify the first certificate”, especially when you send a POST message to .NET WebApi. I have downloaded a sample problem from the link at the end off this blog. When I was following the instruction to send a POST message using Postman to the WebApi I got the error.

My purpose is to test whether the code can run so whether it is http or https it does not matter to me. So, the workaround is right click the WebApi project select Properties.

Select Debug. Uncheck the Enable SSL.

Reference: https://codewithmukesh.com/blog/repository-pattern-in-aspnet-core/

About chanmingman

Since March 2011 Microsoft Live Spaces migrated to WordPress (http://www.pcworld.com/article/206455/Microsoft_Live_Spaces_Moves_to_WordPress_An_FAQ.html) till now, I have is over 1 million viewers. This blog is about more than 50% telling you how to resolve error messages, especial for Microsoft products. The blog also has a lot of guidance teaching you how to get stated certain Microsoft technologies. The blog also uses as a help to keep my memory. The blog is never meant to give people consulting services or silver bullet solutions. It is a contribution to the community. Thanks for your support over the years.

Ming Man is Microsoft MVP since year 2006. He is a software development manager for a multinational company. With 25 years of experience in the IT field, he has developed system using Clipper, COBOL, VB5, VB6, VB.NET, Java and C #. He has been using Visual Studio (.NET) since the Beta back in year 2000. He and the team have developed many projects using .NET platform such as SCM, and HR based applications. He is familiar with the N-Tier design of business application and is also an expert with database experience in MS SQL, Oracle and AS 400.

Once suspended, tanatip will not be able to comment or publish posts until their suspension is removed.

Once unsuspended, tanatip will be able to comment and publish posts again.

Once unpublished, all posts by tanatip will become hidden and only accessible to themselves.

If tanatip is not suspended, they can still re-publish their posts from their dashboard.

Note:

Once unpublished, this post will become invisible to the public and only accessible to Tanatip Siriprathum.

They can still re-publish the post if they are not suspended.

Thanks for keeping DEV Community safe. Here is what you can do to flag tanatip:

Make all posts by tanatip less visible

tanatip consistently posts content that violates DEV Community’s
code of conduct because it is harassing, offensive or spammy.

Unflagging tanatip will restore default visibility to their posts.

Discuss Istio

Loading

I have just started with Sitecore Commerce (10.1 with Sitecore 10.1) and Postman. When I try to bootstrap, it gives the error:

Unable to verify the first certificate

I was able to get the token and the SSL is also turned off.

enter image description here

  • sitecore-commerce

asked Mar 23, 2021 at 6:06

sukesh's user avatar

About chanmingman

Since March 2011 Microsoft Live Spaces migrated to WordPress (http://www.pcworld.com/article/206455/Microsoft_Live_Spaces_Moves_to_WordPress_An_FAQ.html) till now, I have is over 1 million viewers. This blog is about more than 50% telling you how to resolve error messages, especial for Microsoft products. The blog also has a lot of guidance teaching you how to get stated certain Microsoft technologies. The blog also uses as a help to keep my memory. The blog is never meant to give people consulting services or silver bullet solutions. It is a contribution to the community. Thanks for your support over the years.

Ming Man is Microsoft MVP since year 2006. He is a software development manager for a multinational company. With 25 years of experience in the IT field, he has developed system using Clipper, COBOL, VB5, VB6, VB.NET, Java and C #. He has been using Visual Studio (.NET) since the Beta back in year 2000. He and the team have developed many projects using .NET platform such as SCM, and HR based applications. He is familiar with the N-Tier design of business application and is also an expert with database experience in MS SQL, Oracle and AS 400.

Once suspended, tanatip will not be able to comment or publish posts until their suspension is removed.

Once unsuspended, tanatip will be able to comment and publish posts again.

Once unpublished, all posts by tanatip will become hidden and only accessible to themselves.

If tanatip is not suspended, they can still re-publish their posts from their dashboard.

Note:

Once unpublished, this post will become invisible to the public and only accessible to Tanatip Siriprathum.

They can still re-publish the post if they are not suspended.

Thanks for keeping DEV Community safe. Here is what you can do to flag tanatip:

Make all posts by tanatip less visible

tanatip consistently posts content that violates DEV Community’s
code of conduct because it is harassing, offensive or spammy.

Unflagging tanatip will restore default visibility to their posts.

Discuss Istio

Loading

I have just started with Sitecore Commerce (10.1 with Sitecore 10.1) and Postman. When I try to bootstrap, it gives the error:

Unable to verify the first certificate

I was able to get the token and the SSL is also turned off.

enter image description here

  • sitecore-commerce

asked Mar 23, 2021 at 6:06

sukesh's user avatar

sukeshsukesh

2,7973 gold badges23 silver badges64 bronze badges

2

  • I think you can ignore that warning message, just check if urls, variables and environment are setup correctly in postman, by clicking on EYE icon

    Mar 23, 2021 at 10:40

  • @qwerty did you ever get a resolution to this problem? I am seeing the exact same thing.

    Jul 9, 2021 at 14:35

Понравилась статья? Поделить с друзьями:
  • Unable to sign into xbox live ошибка
  • Unable to save file ошибка zbrush
  • Unable to restore idevice 1 ошибка
  • Unable to perform link c builder ошибка
  • Unable to open steam ошибка