Fix README's SSL example
This commit is contained in:
parent
4fe8b5108f
commit
c3bcc8f445
@ -55,10 +55,10 @@ Here we create a new fr::TcpListener, which is used to listen for incoming conne
|
|||||||
#include <SSLContext.h>
|
#include <SSLContext.h>
|
||||||
#include <SSLListener.h>
|
#include <SSLListener.h>
|
||||||
|
|
||||||
std::shared_ptr<fr::SSLContext> ssl_context(new fr::SSLContext("certs.crt")); //Creates a new 'SSL' context. This stores certificates and is shared between SSL enabled objects.
|
std::shared_ptr<fr::SSLContext> ssl_context(new fr::SSLContext()); //Creates a new 'SSL' context. This stores certificates and is shared between SSL enabled objects.
|
||||||
ssl_conext->load_ca_certs_from_file(filepath); //This, or 'load_ca_certs_from_memory' should be called on the context, to load your SSL certificates.
|
ssl_conext->load_ca_certs_from_file(filepath); //This, or 'load_ca_certs_from_memory' should be called on the context, to load your SSL certificates.
|
||||||
|
|
||||||
fr::SSLListener listener(ssl_context, "crt_path", "pem_path", "private_key_path"); //This is the SSL equivilent to fr::TcpListener
|
fr::SSLListener listener(ssl_context, "pem_path", "private_key_path"); //This is the SSL equivilent to fr::TcpListener
|
||||||
|
|
||||||
fr::SSLSocket socket(ssl_context); //This is the SSL equivilent to fr::TcpSocket
|
fr::SSLSocket socket(ssl_context); //This is the SSL equivilent to fr::TcpSocket
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user