Skip to content
New issue

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

Add DTRACE points to measure request timings. #11245

Merged
merged 18 commits into from
Mar 20, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DTrace working.
  • Loading branch information
neunhoef committed Mar 4, 2020
commit 213263d8b222fc63e7541c02ae6c970b9acce597
12 changes: 10 additions & 2 deletions arangod/GeneralServer/SslServerFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ SslServerFeature::SslServerFeature(application_features::ApplicationServer& serv
_sslProtocol(TLS_GENERIC),
_sslOptions(asio_ns::ssl::context::default_workarounds |
asio_ns::ssl::context::single_dh_use),
_ecdhCurve("prime256v1") {
_ecdhCurve("prime256v1"),
_allowHttpProtocolNegotiation(true) {
setOptional(true);
startsAfter<application_features::AqlFeaturePhase>();
}
Expand Down Expand Up @@ -116,6 +117,11 @@ void SslServerFeature::collectOptions(std::shared_ptr<ProgramOptions> options) {
"--ssl.ecdh-curve",
"SSL ECDH Curve, see the output of \"openssl ecparam -list_curves\"",
new StringParameter(&_ecdhCurve));

options->addOption(
"--ssl.allow-http-protocol-negotiation",
"Allows that the TLS handshake negotiates the HTTP protocol version",
new BooleanParameter(&_allowHttpProtocolNegotiation));
}

void SslServerFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
Expand Down Expand Up @@ -334,7 +340,9 @@ std::shared_ptr<asio_ns::ssl::context> SslServerFeature::createSslContext() {

sslContext->set_verify_mode(SSL_VERIFY_NONE);

SSL_CTX_set_alpn_select_cb(sslContext->native_handle(), alpn_select_proto_cb, NULL);
if (_allowHttpProtocolNegotiation) {
SSL_CTX_set_alpn_select_cb(sslContext->native_handle(), alpn_select_proto_cb, NULL);
}

return sslContext;
} catch (std::exception const& ex) {
Expand Down
1 change: 1 addition & 0 deletions arangod/GeneralServer/SslServerFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ class SslServerFeature : public application_features::ApplicationFeature {
uint64_t _sslProtocol;
uint64_t _sslOptions;
std::string _ecdhCurve;
bool _allowHttpProtocolNegotiation;

private:
std::string stringifySslOptions(uint64_t opts) const;
Expand Down