зеркало из https://github.com/mozilla/gecko-dev.git
bug 807435 telemetry for server TLS NPN support r=bsmith r=honzab
This commit is contained in:
Родитель
4b227908ba
Коммит
dd26863620
|
@ -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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче