# Ignore certificate validation

**URL:** https://hub.mender.io/t/ignore-certificate-validation/2442
**Category:** General Discussions
**Created:** [September 14, 2020, 8:02am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442 "2020-09-14T08:02:17Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 8:02am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/1 "2020-09-14T08:02:17Z")

</div>

Hi all,

I’ve installed the Mender demo server on my own on a host and the client (dunfell branch, based on Yocto) on a Beaglebone Black board, both conntected to my local network and want to test the device binding.  
In my LAN, there’s no way to run a domain name server (I’m not the admin ^^).

I have two questions:

1. Is there a way to configure them to use with ip addresses?
2. And a way or any chance to ignore certificate validation for testing purposes?

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [September 14, 2020, 8:25am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/2 "2020-09-14T08:25:47Z")

</div>

One option is to temporarily add the domain and IP address to the local lookup system of the device/pc that wants to contact the server.

So on Linux that would your /etc/hosts file

Then you can contact the server using the domain name embedding in your certificate.

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 8:30am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/3 "2020-09-14T08:30:11Z")

</div>

The entry in the /etc/hosts file doesn’t work. But I’ll test it again.

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 8:47am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/5 "2020-09-14T08:47:12Z")

</div>

Client’s log:

```
Failure occurred while executing authorization request: &url.Error{Op:\"Post\", URL:\"https://myserver/api/devices/v1/authentication/auth_requests\", Err:(*net.OpError)(0x85a870)}

Authorization request error: dial tcp 192.168.50.32:443: connect: connection refused

Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization request: Post \"https://myserver/api/device
```

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 8:49am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/6 "2020-09-14T08:49:10Z")

</div>

Sorry, can’t fit all the message lines.

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [September 14, 2020, 9:26am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/7 "2020-09-14T09:26:29Z")

</div>

to my eyes it looks like it cannot open port 443 on 192.168.50.32.

can you telnet to that address and port to confirm that you can open a socket on that port?

telnet 192.168.50.32 443

you should get the following to indicate that you have opened a socket successfully

```
Trying 192.168.50.32...
Connected to 192.168.50.32.
Escape character is '^]'
```

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 9:28am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/8 "2020-09-14T09:28:16Z")

</div>

Yes, it works.

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 9:30am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/9 "2020-09-14T09:30:35Z")

</div>

Oh sorry, I forgot to run “./demo up” on the server. Now there are other logs. Just a sec…

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [September 14, 2020, 9:31am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/10 "2020-09-14T09:31:11Z")

</div>

you may be able to get more insight into the underlying issue by doing

`cat /var/log/kern.log | grep mender`

see discussion here: [Mender client testing on solidrun with Mender demo server](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505)

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 9:34am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/11 "2020-09-14T09:34:22Z")

</div>

“kern.log” doesn’t exist, but “messages”.  
The logs:

```
Sep 14 11:31:57 beaglebone-yocto user.err mender[171]: time="2020-09-14T11:31:57+02:00" level=error msg="Failure occurred while executing authorization request: &url.Error{Op:\"Post\", URL:\"https://myserver/api/devices/v1/authentication/auth_requests\", Err:x509.HostnameError
Sep 14 11:31:57 beaglebone-yocto user.err mender[171]: time="2020-09-14T11:31:57+02:00" level=error msg="Authorization request error: x509: certificate is valid for docker.mender.io, not myserver"
Sep 14 11:31:57 beaglebone-yocto user.err mender[171]: time="2020-09-14T11:31:57+02:00" level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization request: Post \"https://myserver/api/devices/v1/authen
```

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 9:36am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/12 "2020-09-14T09:36:56Z")

</div>

![2020-09-14_11-36](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/cfe3947c9ccec827b9b3db322c22149cf6cf4e6e.png)

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [September 14, 2020, 9:42am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/13 "2020-09-14T09:42:48Z")

</div>

the backend looks like its not configured with your own certificate and is expecting to be contacted on `docker.mender.io` domain and failing the domain name check.

Just like in the link i mentioned above. Double check the process for whether you are using demo setup or production setup.

you could just use `docker.mender.io` domain instead of myserver in you hosts file and mender config for the time being if its just a test.

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 9:51am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/14 "2020-09-14T09:51:29Z")

</div>

It is the demo mode, [https://192.168.50.32/ui/#/](https://192.168.50.32/ui/#/) told me. I’ll create a new certificate for “myserver”…

---

<div class="post-metadata">

### Author: ![thinstar](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@thinstar](https://hub.mender.io/u/thinstar)
#### Post date: [September 14, 2020, 10:03am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/15 "2020-09-14T10:03:27Z")

</div>

I ran

```
CERT_API_CN=myserver CERT_STORAGE_CN=myserver ./keygen
```

in Mender’s root directory and restarted the server with

```
./demo up
```

The messages on the client are the same as before. How can I tell the server to use “myserver” instead of “[docker.mender.io](http://docker.mender.io)”?

---

<div class="post-metadata">

### Author: ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)
#### Post date: [September 14, 2020, 10:20am UTC](https://hub.mender.io/t/ignore-certificate-validation/2442/16 "2020-09-14T10:20:06Z")

</div>

by adding your own certificate I believe you are now crossing over into the production-ready configuration of the mender server and would need to most likely follow these instructions.

> **[Production installation | Mender documentation](https://docs.mender.io/2.4/administration/production-installation)**

if you still want to use in demo mode then below are instructions for that.

> **[Install a Mender demo server | Mender documentation](https://docs.mender.io/2.4/getting-started/on-premise-installation/create-a-test-environment)**
