3

I am making an IoT device with the MKR1000.

As a part of the process, I would like to set up an HTTPS connection to https://hit.tl8.co/api/ping (this is a website I have made and control).

The problem is that client.connect(url, 443) is returning false. I have tried normal HTTP and the URL works on a browser. I can also access https://www.google.com. The code is a small variation of the example HTTP client.

As such, I believe that the TLS certificate I am using is not accessible by the MKR1000. Running this report shows that it is a RSA 2048 bits (e 65537) with SHA256withRSA certificate.

Is there a way to get the MKR1000 to accept this certificate? Failing that, what changes do I need to make to this certificate for it to work?

Is there a software solution to get this certificate working?

ocrdu
  • 1,673
  • 2
  • 9
  • 22
tl8
  • 131
  • 2

1 Answers1

0

You need to use connectSSL() instead of connect(), and possibly add your certificate to the MKR1000 as described on Hackster.

ocrdu
  • 1,673
  • 2
  • 9
  • 22
PowerStat
  • 200
  • 1
  • 9
  • `client` is already an `WiFiSSLClient` object. As such `connect()` and `connectSSL()` are the same. – tl8 Jun 14 '16 at 09:20
  • I am wondering about the documentation for the library which says: "This class allows to create a client that always connects in SSL to the specified IP address and port" .. also I can't find any specification about what SSL crypto-types will be supported .... – PowerStat Jun 14 '16 at 10:46
  • Ah ok, maybe this link resolves your issue: https://www.hackster.io/arichetta/add-ssl-certificates-to-mkr1000-93c89d – PowerStat Jun 14 '16 at 10:47
  • 2
    The second part of the answer is correct. – tl8 Jun 16 '16 at 09:34