# HTTPS server authentication

**URL:** <https://forum.sierrawireless.com/t/https-server-authentication/13745>\
**Category:** Legacy HL Series\
**Created:** [September 4, 2018, 11:14am UTC](https://forum.sierrawireless.com/t/https-server-authentication/13745 "2018-09-04T11:14:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Greg346](https://avatars.discourse-cdn.com/v4/letter/g/8797f3/32.png) [@Greg346](https://forum.sierrawireless.com/u/Greg346)\
**Post date:** [September 4, 2018, 11:14am UTC](https://forum.sierrawireless.com/t/https-server-authentication/13745/1 "2018-09-04T11:14:41Z")

</div>

Hello,

we are using HL8548 modules in our product. The documentation says that https is supported, but so far I could not get this work as expected.  
The encryption is alright, but when I enable the server authentication (sec\_level=2) I get a  
KHTTPS\_ERROR: \<session\_id\>,13  
Initialize SSL error.

A little background:  
Firstly we tried with our local server with a self-signed certificate and it was just fine even with authentication. But since we switched to the new bought certificate we always receive this error. I already tried different servers (like for example [google.com:443](http://google.com:443)) but this did not worked either.  
Should I set the intermediate certificate somehow?

Another issue: the documentation says that we should use DER encoded certificates but the module only approve PEM.

Does the module support the server authentication. I could not find a working example. Even in the documentation only the encryption is used, but we must use the server authentication.

Could you please send an example where https is working as expected or could you point me to a direction what could possibly go wrong with our project?

Regards,  
Greg

---

<div class="post-metadata">

**Author:** ![Sierra\_klin1](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@Sierra\_klin1](https://forum.sierrawireless.com/u/Sierra_klin1)\
**Post date:** [September 7, 2018, 10:57am UTC](https://forum.sierrawireless.com/t/https-server-authentication/13745/2 "2018-09-07T10:57:49Z")

</div>

Hi Greg,

Here is an example for your reference:  
AT+CCLK=“18/09/07,18:05:32+22”  
OK  
AT+KCNXCFG=1,“GPRS”,“3gnet”  
OK  
AT+KSSLCFG=0,0  
OK  
AT+KCERTSTORE=0,1220,0  
CONNECT  
OK  
AT+KCERTSTORE?  
+KCERTSTORE:  
root\_cert,0,1220  
-----BEGIN CERTIFICATE-----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7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo  
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ  
-----END CERTIFICATE-----  
root\_cert,1,0  
local\_cert,0,0  
local\_cert,1,0  
local\_cert,2,0  
local\_cert,3,0  
local\_cert,4,0  
local\_cert,5,0  
OK  
AT+KHTTPSCFG=1,“[www.howsmyssl.com](http://www.howsmyssl.com)”,443,2  
+KHTTPSCFG: 1  
OK  
+KCNX\_IND: 1,4,1  
+KCNX\_IND: 1,1,0  
+KHTTPS\_IND: 1,1  
AT+KHTTPSGET=1,"/"  
CONNECT  
HTTP/1.1 200 OK  
Content-Length: 8692  
Access-Control-Allow-Origin: \*  
Connection: close  
Content-Type: text/html;charset=utf-8  
Date: Fri, 07 Sep 2018 10:51:06 GMT  
Strict-Transport-Security: max-age=631138519; includeSubdomains; preload

 How's My SSL? (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ ...... --EOF--Pattern-- OK +KHTTPS\_IND: 1,3,8934,200,"OK" AT+KHTTPSCLOSE=1 OK +KCNX\_IND: 1,5,30 AT+KCNXDOWN=1,1 OK +KCNX\_IND: 1,3 AT+KHTTPSDEL=1 OK
