Branch: Tag:

2016-03-04

2016-03-04 09:53:42 by Henrik Grubbström (Grubba) <grubba@grubba.org>

SSL: Restore the port options before using them.

Fixes some SSL options not having the intended effect at server start.

Fixes main part of [bug 7657 (#7657)].

1537:      mapping get_port_options( string key )   //! Get the options for the key 'key'. - //! The intepretation of the options is protocol specific. + //! The interpretation of the options is protocol specific.   {    return (query( "port_options" )[ key ] || ([]));   }      void set_port_options( string key, mapping value )   //! Set the options for the key 'key'. - //! The intepretation of the options is protocol specific. + //! The interpretation of the options is protocol specific.   {    mapping q = query("port_options");    q[ key ] = value;
2594:       set_up_ssl_variables( this_object() );    +  // NB: setup() calls restore() which initializes the variables +  // created above. +  ::setup(pn, i); +    #if constant(SSL.Constants.PROTOCOL_TLS_MAX)    set_version();   #endif       filter_preferred_suites();    -  ::setup(pn, i); -  +     certificates_changed (0, ignore_eaddrinuse);       // Install the change callbacks here to avoid duplicate calls