We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Basic what the title says, how can i create a connection with mutual authentication ?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
Given that you have your ca, client cert, etc setup already you can achieve this by:
auto config = oatpp::openssl::Config::createShared(); config->addContextConfigurer(std::make_shared<oatpp::openssl::configurer::CertificateFile>("path/to/server.pem")); config->addContextConfigurer(std::make_shared<oatpp::openssl::configurer::PrivateKeyFile>("path/to/server.key")); config->addContextConfigurer(std::make_shared<oatpp::openssl::configurer::PeerCertificateVerification>(oatpp::openssl::configurer::CertificateVerificationMode::EnabledStrong))); auto connectionProvider = oatpp::openssl::server::ConnectionProvider::createShared(config, {"localhost", 8443});
auto config = oatpp::openssl::Config::createShared(); config->addContextConfigurer(std::make_shared<oatpp::openssl::configurer::CertificateFile>("path/to/client.pem")); config->addContextConfigurer(std::make_shared<oatpp::openssl::configurer::PrivateKeyFile>("path/to/client.key")); config->addContextConfigurer(std::make_shared<oatpp::openssl::configurer::PeerCertificateVerification>(oatpp::openssl::configurer::CertificateVerificationMode::EnabledStrong))); auto connectionProvider = oatpp::openssl::client::ConnectionProvider::createShared(config, {"httpbin.org", 443});
oatpp::openssl::configurer::CertificateVerificationMode::EnabledStrong is important because this forces the opposite side to send a valid certificate.
Please have a look at the different configuration options under src/oatpp-openssl/configurer.
src/oatpp-openssl/configurer
Sorry, something went wrong.
No branches or pull requests
Basic what the title says, how can i create a connection with mutual authentication ?
Thanks.
The text was updated successfully, but these errors were encountered: