stream-ssl: Make changing keys and certificate at runtime reliable.
authorBen Pfaff <blp@nicira.com>
Thu, 5 Aug 2010 16:24:00 +0000 (09:24 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 5 Aug 2010 16:24:00 +0000 (09:24 -0700)
commit6f1e91b1d7c058d701145080c344bbc531b394ed
treee5fa86b7ff37d384b99399fe1d9ba9a409d541a0
parent55574bb0d21541c13fe67545a74448b36063e461
stream-ssl: Make changing keys and certificate at runtime reliable.

OpenSSL is picky about the order in which keys and certificates are
changed: you have to change the certificate first, then the key.  It
doesn't document this, but deep in the source code, in a function that sets
a new certificate, it has this comment:

    /* don't fail for a cert/key mismatch, just free
     * current private key (when switching to a different
     * cert & key, first this function should be used,
     * then ssl_set_pkey */

Brilliant, guys, thanks a lot.

Bug #2921.
lib/stream-ssl.c
lib/stream-ssl.h
ovsdb/ovsdb-server.c
vswitchd/bridge.c