client.cc revision 8d51ab70
18d51ab70SShuo Chen#include "TlsConfig.h" 28d51ab70SShuo Chen#include "TlsStream.h" 38d51ab70SShuo Chen 48d51ab70SShuo Chenint main(int argc, char* argv[]) 58d51ab70SShuo Chen{ 68d51ab70SShuo Chen TlsConfig config; 78d51ab70SShuo Chen config.setCaFile("ca.pem"); 88d51ab70SShuo Chen TlsStreamPtr stream = TlsStream::connect(&config, "localhost:4433", "Test Server Cert"); 98d51ab70SShuo Chen if (stream) 108d51ab70SShuo Chen { 118d51ab70SShuo Chen LOG_INFO << "OK"; 128d51ab70SShuo Chen } 138d51ab70SShuo Chen} 14