discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebServer using https


From: David Wetzel
Subject: Re: WebServer using https
Date: Wed, 22 May 2013 23:25:53 -0400

Hi

You could run it on localhost on some non privileged port and redirect the 
https port to that. 

David

Von meinem iPhone gesendet

Am 22.05.2013 um 08:40 schrieb Richard Frith-Macdonald 
<richardfrithmacdonald@gmail.com>:

> 
> On 22 May 2013, at 11:24, Martin Waschbüsch IT-Dienstleistungen 
> <service@waschbuesch.it> wrote:
> 
>> Hi everyone,
>> 
>> I hope I subscribed to the right list for this sort of question. If not, 
>> please point me to the correct one.
>> 
>> Anyway, for a project I am working on, I am planning to provide a RESTful 
>> web service. Since said service is targeted at IOS devices, I thought it 
>> would make sense to develop the API using Objective-C, too.
>> So, I set up GNUstep on a box running Debian Wheezy and compiled the 
>> WebServer library / package.
>> 
>> The testWebServer application worked fine and after looking at the code in 
>> testWebServer.m, I attempted to switch from http to https by changing:
>> 
>> [server setPort: [defs stringForKey: @"Port"] secure: nil];
>> 
>> to
>> 
>> [server setPort: @"443" secure: [NSDictionary dictionaryWithObjectsAndKeys:
>>             @"/tmp/server.pem", @"CertificateFile",
>>             @"/tmp/server.key", @"KeyFile",
>>             @"somepassword", @"Password",nil]];
>> 
>> 
>> From what I saw in the documentation and sources, that is how I understood 
>> the syntax and compilation showed no errors.
>> However, the application always responds with a line like this:
>> 
>> 2013-05-22 12:13:13.516 testWebServer[15071] Failed to listen on port 443
>> 
>> The weird thing is that, it does not even matter if I give a filename or 
>> not, so the problem must occur before the NSFileHandle is created on that 
>> file.
>> There is no other service listening on said port, and although I run the 
>> test as root, I also tried a higher port (>1024) - just in case. 
>> I double-checked that binary is linked against libgnutls, libgcrypt, etc. 
>> which it is and am at a loss now as to what I may be missing?
>> 
>> Thanks for any and all pointers,
> 
> Acting as a server on port 443 (or indeed any port lower than 1024) is 
> typically prevented by the operating system unless a process is running as 
> root.
> If your process isn't running as root, you could try changing it to run as 
> root (not something I'd generally recommend) or use a different port.
> 
> 
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep



reply via email to

[Prev in Thread] Current Thread [Next in Thread]