Branch: Tag:

2004-01-15

2004-01-15 22:04:40 by H. William Welliver III <bill@welliver.org>

HTTPS server works again, with added benefit of chained server certificates.

Rev: lib/modules/Protocols.pmod/HTTP.pmod/Server.pmod/SSLPort.pike:1.5

25:   //! An optional SSL secret key, provided in binary format, such   //! as that created by @[Standards.PKCS.RSA.private_key()].   //! @param certificate - //! An optional SSL certificate, provided in binary format. + //! An optional SSL certificate or chain of certificates with the host + //! certificate first, provided in binary format.   void create(function(Request:void) _callback,    void|int _portno, -  void|string _interface, void|string key, void|string certificate) +  void|string _interface, void|string key, void|string|array certificate)   {    portno=_portno;    if (!portno) portno=443; // default HTTPS port
61:   //! The port accept callback   static void new_connection()   { -  Stdio.File fd=port->accept(); +  SSL.SSLFile fd=port->accept();    Request r=request_program();    r->attach_fd(fd,this,callback);   }
142:    }      //! - void set_certificate(string certificate) + void set_certificate(string|array certificate)   { -  +  if(arrayp(certificate)) +  certificates = certificate; +  else    certificates = ({ certificate });   }