mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 807435 telemetry for server TLS NPN support r=bsmith r=honzab
This commit is contained in:
parent
db47e11909
commit
37f5399c50
@ -921,16 +921,18 @@ void HandshakeCallback(PRFileDesc* fd, void* client_data) {
|
||||
status->mSecretKeyLength = encryptBits;
|
||||
status->mCipherName.Assign(cipherName);
|
||||
|
||||
// Get the NPN value. Do this on the stack and copy it into
|
||||
// a string rather than preallocating the string because right
|
||||
// now we expect NPN to fail more often than it succeeds.
|
||||
// Get the NPN value.
|
||||
SSLNextProtoState state;
|
||||
unsigned char npnbuf[256];
|
||||
unsigned int npnlen;
|
||||
|
||||
if (SSL_GetNextProto(fd, &state, npnbuf, &npnlen, 256) == SECSuccess &&
|
||||
state == SSL_NEXT_PROTO_NEGOTIATED)
|
||||
infoObject->SetNegotiatedNPN(reinterpret_cast<char *>(npnbuf), npnlen);
|
||||
if (SSL_GetNextProto(fd, &state, npnbuf, &npnlen, 256) == SECSuccess) {
|
||||
if (state == SSL_NEXT_PROTO_NEGOTIATED)
|
||||
infoObject->SetNegotiatedNPN(reinterpret_cast<char *>(npnbuf), npnlen);
|
||||
else
|
||||
infoObject->SetNegotiatedNPN(nullptr, 0);
|
||||
mozilla::Telemetry::Accumulate(Telemetry::SSL_NPN_TYPE, state);
|
||||
}
|
||||
else
|
||||
infoObject->SetNegotiatedNPN(nullptr, 0);
|
||||
|
||||
|
@ -711,6 +711,11 @@
|
||||
"n_values": 16,
|
||||
"description": "SSL Version (0=ssl3, 1=tls1, 2=tls1.1, 3=tls1.2)"
|
||||
},
|
||||
"SSL_NPN_TYPE": {
|
||||
"kind": "enumerated",
|
||||
"n_values": 16,
|
||||
"description": "NPN Results (0=none, 1=negotiated, 2=no-overlap)"
|
||||
},
|
||||
"WEBSOCKETS_HANDSHAKE_TYPE": {
|
||||
"kind": "enumerated",
|
||||
"n_values": 16,
|
||||
|
Loading…
Reference in New Issue
Block a user