#1 2012-10-29 19:04:33

selizondo
Member
Registered: 2012-10-29
Posts: 2

mORMot and Https

Hi,

I'm developing a service with the mORMot Framework and I'm trying to enable SSL comunications.

function AddUrl(const aRoot, aPort: TSockData; Https: boolean=false; const
aDomainName: TSockData='*'): integer;

  fServer := THttpApiServer.Create(false); 
  fServer.AddUrl('INFO',aPort,TRUE,'*');

I'm deploying the service on Windows XP and when I specify the https parameter to false I get the data sent by the service with no problem.

In order to use de https option I've generated a SSL certificate and bind it to the IP and Port of the service with the httpcfg tools on Windows XP.

When I init the service with the https option to true I get this error net::ERR_SSL_PROTOCOL_ERROR.

> httpcfg query ssl
    IP                      : 192.168.0.123:8088
    Hash                    : 9b463010b673fbc9d8e2ad50fab1c1337a52e21b
    Guid                    : {00000000-0000-0000-0000-000000000000}
    CertStoreName           : (null)
    CertCheckMode           : 0
    RevocationFreshnessTime : 0
    UrlRetrievalTimeout     : 0
    SslCtlIdentifier        : (null)
    SslCtlStoreName         : (null)
    Flags                   : 2

Did I miss something when I'm adding the URL?

Is the frameWork able to work with SSL comunications?

King regards,
Santi Elizondo

Offline

#2 2012-10-30 13:04:52

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: mORMot and Https

If you  register ( THttpApiServer.AddUrlAuthorize ) your URL with HTTPS=false you must unregister it with HTTPS= FALSE and register again with HTTPS= true

so call
THttpApiServer.AddUrlAuthorize('INFO',aPort, FALSE {UseHTTPS} ,'*', true {OnlyDelete});
and when
THttpApiServer.AddUrlAuthorize('INFO',aPort, TRUE {UseHTTPS} ,'*', FALSE {OnlyDelete});

Hope it's help

Last edited by mpv (2012-10-30 13:05:32)

Offline

#3 2012-10-31 11:34:03

selizondo
Member
Registered: 2012-10-29
Posts: 2

Re: mORMot and Https

Hi,

Thx for the answer.

I've tried to unregister the URL like you said but I still having this problem.

Is there another way to configure the SSL comunications besides using the httpcfg utility?

We're creating the SSL certificate with makecert utility and binding to the service with the httpcfg command.

King regards,
Santi Elizondo

Offline

#4 2012-11-01 10:55:37

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,662
Website

Re: mORMot and Https

Are you using XP SP3 on the server side?
I think there is a bug with this OS, according to http://www.shunra.com/shunrablog/index. … erver-api/

There are several tutos in the web for using https using http.sys
Did not http://blogs.msdn.com/b/jpsanders/archi … erver.aspx suit you?

Offline

Board footer

Powered by FluxBB