Fix expired certificates and bugs in SSL test