# HTTP module accepting expired, self-signed and untrusted SSL certificates

**URL:** <https://forums.unrealengine.com/t/http-module-accepting-expired-self-signed-and-untrusted-ssl-certificates/443346>\
**Category:** Community & Industry Discussion\
**Tags:** httprequest, unreal-engine, http, certificate, question\
**Created:** [February 15, 2019, 2:45pm UTC](https://forums.unrealengine.com/t/http-module-accepting-expired-self-signed-and-untrusted-ssl-certificates/443346 "2019-02-15T14:45:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CHD\_Gaming](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CHD\_Gaming](https://forums.unrealengine.com/u/CHD_Gaming)\
**Post date:** [February 15, 2019, 2:45pm UTC](https://forums.unrealengine.com/t/http-module-accepting-expired-self-signed-and-untrusted-ssl-certificates/443346/1 "2019-02-15T14:45:03Z")

</div>

While testing requests to my own API, I noticed that the built-in HTTP module accepts invalid SSL certificates despite bVerifyPeer being true.

I sent some POST requests to [badssl.com](http://badssl.com) for testing purposes.

## wrong host

Request URL: “[https://wrong.host.badssl.com/](https://wrong.host.badssl.com/)”

As expected, the request is not successful in this case:

```
subjectAltName does not match wrong.host.badssl.com

```

## expired certificate

Request URL: “[https://expired.badssl.com/](https://expired.badssl.com/)”

The request is successful.

```
SSL certificate verify result: certificate has expired (10), continuing anyway.

```

## self-signed certificate

Request URL: “[https://self-signed.badssl.com/](https://self-signed.badssl.com/)”

The request is successful.

```
SSL certificate verify result: self signed certificate (18), continuing anyway.

```

## untrusted root certificate

Request URL: “[https://untrusted-root.badssl.com/](https://untrusted-root.badssl.com/)”

The request is successful.

```
SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.

```

## revoked certificate

Request URL: “[https://revoked.badssl.com/](https://revoked.badssl.com/)”

The fact that the certificate is revoked is not detected.

```
SSL certificate verify ok.

```

Why are expired, self-signed and untrusted certificates accepted even if they are detected as invalid? This behavior is unacceptable and insecure. Is this a bug or is it possible to change this?

bVerifyPeer is already true, OS is Windows.

---

<div class="post-metadata">

**Author:** ![Jeff\_A](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jeff\_A](https://forums.unrealengine.com/u/Jeff_A)\
**Post date:** [February 15, 2019, 9:50pm UTC](https://forums.unrealengine.com/t/http-module-accepting-expired-self-signed-and-untrusted-ssl-certificates/443346/2 "2019-02-15T21:50:19Z")

</div>

Hello,

We’ve recently made a switch to a new bug reporting method using a more structured form. Please visit the link below for more details and report the issue using the new Bug Submission Form. Feel free to continue to use this thread for community discussion around the issue.

[https://epicsupport.force.com/unrealengine/s/](https://epicsupport.force.com/unrealengine/s/)

Thanks

---

<div class="post-metadata">

**Author:** ![PlayerOneBo](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@PlayerOneBo](https://forums.unrealengine.com/u/PlayerOneBo)\
**Post date:** [June 27, 2019, 8:01am UTC](https://forums.unrealengine.com/t/http-module-accepting-expired-self-signed-and-untrusted-ssl-certificates/443346/3 "2019-06-27T08:01:33Z")

</div>

Hi @CHD Gaming, can you please shed some light on how are you adding the SSL certificates to your https requests? I’m having troubles HTTPs requests using OS installed certificates. (All my requests return invalid certificate, even tho the certs are installed within windows and other API testing tools are able to perform valid requests using the OS certs) Thanks in advance!

---

<div class="post-metadata">

**Author:** ![chris-gong](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chris-gong/32/1106462_2.png) [@chris-gong](https://forums.unrealengine.com/u/chris-gong)\
**Post date:** [February 6, 2022, 5:32pm UTC](https://forums.unrealengine.com/t/http-module-accepting-expired-self-signed-and-untrusted-ssl-certificates/443346/4 "2022-02-06T17:32:03Z")

</div>

Just an update on this in 2022 with UE5, seems that peer verification fails with all the scenarios listed in OP’s question except for the last one with regards to a revoked certificate. So expired, self-signed, and untrusted certificates are rejected but I guess revoked certificates are still accepted.
