# H5 AppBroker SSL

**URL:** <https://clarionhub.com/t/h5-appbroker-ssl/2626>\
**Category:** H5\
**Tags:** h5\
**Created:** [May 24, 2019, 12:18pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626 "2019-05-24T12:18:43Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [May 24, 2019, 12:18pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/1 "2019-05-24T12:18:44Z")

</div>

We are using H5 with SSL  
Host: Running on Windows 2016 server with no Web services.  
Mobile devices: Cell Phones.  
additional Java Script: Quagga.js BarCode script to access the Phone Camera to Scan an EAN13 type Barcode  
Purpose: Scan a Ticket to verify entry to an event.

Must use SSL to access Camera via Chrome.  
SSL working fine; all web browsers are happy with the purchased SSL stored in the .pem file.

The whole process works well. But every day the SSL port stops working. The AppBroker Service still running. The portal on NON SSL port (8080) is working still, but the SSL port (8443) fails.

Only way to recover is it to restart the AppBroker Service; which takes unusually long to restart-30 seconds compared to general 2 seconds restart.

We are running H5 AppBroker on another site without SSL- an we have not restarted in 6 months.  
The two log files - ipreject.log and appbroker.log don’t give much- unless I just do not understand the log.

Any ideas?

---

<div class="post-metadata">

**Author:** ![jkuijt](https://clarionhub.com/user_avatar/clarionhub.com/jkuijt/32/6168_2.png) [@jkuijt](https://clarionhub.com/u/jkuijt)\
**Post date:** [May 24, 2019, 2:07pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/2 "2019-05-24T14:07:04Z")

</div>

Hi,

Which Clarion version?  
Which AppBroker version?

Best regards  
Jeffrey

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [May 24, 2019, 2:26pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/3 "2019-05-24T14:26:04Z")

</div>

Hello,  
Clarion EE 11.0.13401  
AppBroker: According to Setup\_AppBroker- **11.13401**

---

<div class="post-metadata">

**Author:** ![jkuijt](https://clarionhub.com/user_avatar/clarionhub.com/jkuijt/32/6168_2.png) [@jkuijt](https://clarionhub.com/u/jkuijt)\
**Post date:** [May 24, 2019, 3:36pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/4 "2019-05-24T15:36:21Z")

</div>

Hi,

So you’re using the latest version. This is a very strange issue. I think it’s best to contact Diego about this.

Best regards  
Jeffrey

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [May 26, 2019, 2:54pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/5 "2019-05-26T14:54:32Z")

</div>

Hello,  
(I am hoping Diego will ask the necessary questions during this post-or how does one get hold of him/them)  
I wander if a cause could be that the IP-driver version, which is installed in the same folder, is not the latest.

App Broker version: 11.13401  
IP Driver version: ver11.0.13185

---

<div class="post-metadata">

**Author:** ![jkuijt](https://clarionhub.com/user_avatar/clarionhub.com/jkuijt/32/6168_2.png) [@jkuijt](https://clarionhub.com/u/jkuijt)\
**Post date:** [May 26, 2019, 5:59pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/6 "2019-05-26T17:59:24Z")

</div>

Hi,

You could try:  
diego at softvelocity dot com

Best regards  
Jeffrey

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [May 31, 2019, 4:09pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/7 "2019-05-31T16:09:36Z")

</div>

Hello,  
Thought I would report that after using a Previous version of only the “AppBroker.exe”, the SSL portion has **not** died once.  
Working version: Setup\_AppBroker-10.12799

I do not know why.

---

<div class="post-metadata">

**Author:** ![SerhatSatir](https://clarionhub.com/user_avatar/clarionhub.com/serhatsatir/32/1953_2.png) [@SerhatSatir](https://clarionhub.com/u/SerhatSatir)\
**Post date:** [June 11, 2019, 12:59pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/8 "2019-06-11T12:59:14Z")

</div>

How did you integrate Quagga.js with Clarion? Do you have a simple example?

Kind Regards,

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [June 11, 2019, 1:34pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/9 "2019-06-11T13:34:30Z")

</div>

Hello,  
See example.

attached. [ClarionBarCodeMobileHTTPExample.zip](https://clarionhub-uploads.s3.dualstack.eu-north-1.amazonaws.com/original/2X/9/9fbbeeefb4b7e9e7200af1acc8850fe537cee23b.zip) (78.3 KB)

---

<div class="post-metadata">

**Author:** ![franky](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/958977/32.png) [@franky](https://clarionhub.com/u/franky)\
**Post date:** [September 23, 2019, 7:44pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/10 "2019-09-23T19:44:26Z")

</div>

any example to load camera and save photo ???

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [September 11, 2020, 12:03pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/11 "2020-09-11T12:03:45Z")

</div>

I know this is an old post, but related.

Does anyone have a batch file to automatically go and fetch SSL certificate from LetsEncrypt and generate a **server.pem** for use with H5?

I know NetTalk does this with ease…

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [October 4, 2020, 3:14pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/12 "2020-10-04T15:14:34Z")

</div>

Trust me to make a mountain out of this. It was easy. 😉  
The steps I used to obtain an SSL (lets-encrypt) and generate a PEM file to work with AppBroker (H5)

Instruction partly extracted from: [https://certbot.eff.org/lets-encrypt/windows-webproduct](https://certbot.eff.org/lets-encrypt/windows-webproduct)

1. Download CertBot  
[https://dl.eff.org/certbot-beta-installer-win32.exe](https://dl.eff.org/certbot-beta-installer-win32.exe)

2. Install on the server/workstation that hosts the AppBroker.

3. Open firewall ports and do a port forwarding (TCP) to port 80 and 443 from the router to the server/workstation.

4. Make sure the unique DNS name points to your public IP. I.e. **myapp**.mydomain.co.za (or use a free DynDns to point to your router/hosting partner)

5. Stop AppBroker service. (CertBot starts a web-service and does some foot work)

6. Follow steps to obtain the SSL certificate. See Step 5 in the documentation.  
Yes, it will ask for email address and a few other simple questions such the domain/dns name you need the SSL certificate for: myapp.mydomain.co.za

7. Once done without errors, the SSL keys will be placed in a “linked” file/folder.

8. Then an elevated CMD command:  
copy “C:\Certbot\archive\myapp.mydomain.co.za\privkey1.pem” + “C:\Certbot\archive\myapp.mydomain.co.za\fullchain1.pem” C:\AppBroker\server.PEM

9. Start AppBroker

Once CertBot installed, Steps 5 - 9 only need to be repeated every 80 or so days.  
In December when this certificate expires I plan to make a complete batch file to automate the process. Then schedule that to run every 80 days. Hope to share it.

Hope this will help someone.

---

<div class="post-metadata">

**Author:** ![FoucheRabie](https://clarionhub.com/letter_avatar_proxy/v4/letter/f/7cd45c/32.png) [@FoucheRabie](https://clarionhub.com/u/FoucheRabie)\
**Post date:** [January 10, 2021, 7:03pm UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/13 "2021-01-10T19:03:34Z")

</div>

It appears that the folder c:\certbot\archive is used to store part(s) of the original/private keys.  
Here is the batch file that seems to have worked well.

```
@echo prep ssl pem file
@echo stopping AppBroker...
net stop "Clarion Application Broker"
@echo starting certbot via powershell.
Powershell.exe -Command "certbot renew"
@echo ready to copy file
Pause
REM: Make a backup of the current one, just in case. 
DEL C:\AppBroker\CEC3old.PEM
Ren C:\AppBroker\CEC3tmp.PEM C:\AppBroker\CEC3old.PEM
Ren C:\AppBroker\CEC3.PEM C:\AppBroker\CEC3tmp.PEM
copy "C:\Certbot\live\myapp.mydomain.co.za\privkey.pem" + "C:\Certbot\live\myapp.mydomain.co.za\fullchain.pem" C:\AppBroker\CEC3.PEM

@echo starting AppBroker...
net start "Clarion Application Broker"
pause

```

Hope it will be of help.

---

<div class="post-metadata">

**Author:** ![jkuijt](https://clarionhub.com/user_avatar/clarionhub.com/jkuijt/32/6168_2.png) [@jkuijt](https://clarionhub.com/u/jkuijt)\
**Post date:** [January 11, 2021, 10:07am UTC](https://clarionhub.com/t/h5-appbroker-ssl/2626/14 "2021-01-11T10:07:47Z")

</div>

Thank you very much!

Best regards  
Jeffrey
