[openssl-users] forking server question
jb-openssl at wisemo.com
Sun May 7 18:22:04 UTC 2017
On 06/05/2017 14:19, Salz, Rich via openssl-users wrote:
>> Please excuse what is a simple question: what is the proper way to clean up
>> in the parent and child when writing a forking server using OpenSSL?
> It's not simple.
> Can you have the parent just do socket stuff, and then accept/fork and have the child do all the OpenSSL calls?
That would violate best security practice regarding chroot()
calls and loading of private keys. (Because the secure sequence
is load private keys (possibly with one-time external decryption
assistance), bind to privileged port (such as 443 or 25),
chroot/drop all privileges, accept connection, fork(), handshake,
Things become even more complicated if a program wants to do a
second level of per message privilege drops, as seen in the exim4
> Having two processes, both with OpenSSL state, are going to be hard to handle.
Make that N processes, and understand why this should be a FAQ.
Jakob Bohm, CIO, Partner, WiseMo A/S. http://www.wisemo.com
Transformervej 29, 2860 Soborg, Denmark. Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded
More information about the openssl-users