shinyoshiaki / werift-webrtc

WebRTC Implementation for TypeScript (Node.js), includes ICE/DTLS/SCTP/RTP/SRTP/WEBM/MP4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

alert 80 when using safari as dtls client and werift as dtls server

koush opened this issue · comments

alert:

{
  "level": 2,
  "description": 80
}

The AlertDesc indicates it's an internal error, and from what I've seen this can either be packet loss or malformed data. Potentially a cipher suite or cert issue.

I tried using a hard coded local certificate that failed, and found that even with the static certificate, it would randomly succeed/fail. Here's a dump of the dtls session on failure

-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgjFCslxO+w1CBA3hG
wo0P8iYh2Z9MG8zgXjXKj0C8A92hRANCAAQQIfGXilDC+L9C0aTD1+7ZgfGTvFyw
Uww/FZqXnW7pqGHpQoLRLdJ3IJjTZrWlSwuMHmVWpOydxKLG+Z4gTIYj
-----END PRIVATE KEY----- -----BEGIN CERTIFICATE-----
MIIBgjCCASigAwIBAgII7NGvbcClDMUwCgYIKoZIzj0EAwIwRTELMAkGA1UEBhMC
QVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdp
dHMgUHR5IEx0ZDAeFw0yMjA5MTQxODI0MTdaFw0zMjA5MTQxODI0MTdaMEUxCzAJ
BgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5l
dCBXaWRnaXRzIFB0eSBMdGQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQQIfGX
ilDC+L9C0aTD1+7ZgfGTvFywUww/FZqXnW7pqGHpQoLRLdJ3IJjTZrWlSwuMHmVW
pOydxKLG+Z4gTIYjowIwADAKBggqhkjOPQQDAgNIADBFAiEA1r81+8g/WKzNpZvc
9UJNHrn7PJdritA5P9XxHYdnUjYCIFnbAek9NUKmKJCb4CAlfv0WFse7ystExkxG
c+O9HzsU
-----END CERTIFICATE----- {signature: 3, hash: 4}
sig change have-local-offer
iceGatheringStateChange gathering
iceConnectionStateChange completed
iceGatheringStateChange complete
sig change stable
connectionStateChange completed
start server
iceConnectionStateChange checking
handleHandshakes (1) [1]
send flight2
RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
curves (3) [29, 23, 24]
curve selected 29
hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
srtp profiles (3) [1, 8, 7]
srtp profile selected 7
cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
selected cipherSuite 49195
iceConnectionStateChange connected
fa1fc4488e handleHandshakes (1) [1]
fa1fc4488e send flight2
fa1fc4488e RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
fa1fc4488e curves (3) [29, 23, 24]
fa1fc4488e curve selected 29
fa1fc4488e hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
fa1fc4488e srtp profiles (3) [1, 8, 7]
fa1fc4488e srtp profile selected 7
fa1fc4488e cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
fa1fc4488e selected cipherSuite 49195
3a8e76a597 handleHandshakes (1) [1]
3a8e76a597 send flight2
3a8e76a597 RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
3a8e76a597 curves (3) [29, 23, 24]
3a8e76a597 curve selected 29
3a8e76a597 hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
3a8e76a597 srtp profiles (3) [1, 8, 7]
3a8e76a597 srtp profile selected 7
3a8e76a597 cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
3a8e76a597 selected cipherSuite 49195
97770b27f4 handleHandshakes (1) [1]
97770b27f4 send flight2
97770b27f4 RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
97770b27f4 curves (3) [29, 23, 24]
97770b27f4 curve selected 29
97770b27f4 hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
97770b27f4 srtp profiles (3) [1, 8, 7]
97770b27f4 srtp profile selected 7
97770b27f4 cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
97770b27f4 selected cipherSuite 49195
a3161c8aab handleHandshakes (1) [1]
a3161c8aab send flight2
a3161c8aab RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
a3161c8aab curves (3) [29, 23, 24]
a3161c8aab curve selected 29
a3161c8aab hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
a3161c8aab srtp profiles (3) [1, 8, 7]
a3161c8aab srtp profile selected 7
a3161c8aab cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
a3161c8aab selected cipherSuite 49195
79b2d4bdf1 handleHandshakes (1) [1]
79b2d4bdf1 send flight2
79b2d4bdf1 RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
79b2d4bdf1 curves (3) [29, 23, 24]
79b2d4bdf1 curve selected 29
79b2d4bdf1 hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
79b2d4bdf1 srtp profiles (3) [1, 8, 7]
79b2d4bdf1 srtp profile selected 7
79b2d4bdf1 cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
79b2d4bdf1 selected cipherSuite 49195
d9158f64b0 handleHandshakes (1) [1]
d9158f64b0 send flight2
d9158f64b0 RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
d9158f64b0 curves (3) [29, 23, 24]
d9158f64b0 curve selected 29
d9158f64b0 hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
d9158f64b0 srtp profiles (3) [1, 8, 7]
d9158f64b0 srtp profile selected 7
d9158f64b0 cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
d9158f64b0 selected cipherSuite 49195
d1fa3354f0 handleHandshakes (1) [1]
d1fa3354f0 send flight2
d1fa3354f0 RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
d1fa3354f0 curves (3) [29, 23, 24]
d1fa3354f0 curve selected 29
d1fa3354f0 hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
d1fa3354f0 srtp profiles (3) [1, 8, 7]
d1fa3354f0 srtp profile selected 7
d1fa3354f0 cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
d1fa3354f0 selected cipherSuite 49195

successful attempt

-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgZmERNxx+mlBxSR89
YruBpOmCTvJO4k9KArfqS/rEWCGhRANCAAQU/o/uYtnkiG4+AlISkeWlP2h85OLg
65L4uFc1G+5vE3e3Gt7JsyS8aA1pn/DWAwHKAQIuCcP3ySkDA+Gjq3zc
-----END PRIVATE KEY----- -----BEGIN CERTIFICATE-----
MIIBgTCCASigAwIBAgIIN3vqk3sBzNUwCgYIKoZIzj0EAwIwRTELMAkGA1UEBhMC
QVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdp
dHMgUHR5IEx0ZDAeFw0yMjA5MTQxODI1MzJaFw0zMjA5MTQxODI1MzJaMEUxCzAJ
BgNVBAYTAkFVMRMwEQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5l
dCBXaWRnaXRzIFB0eSBMdGQwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQU/o/u
YtnkiG4+AlISkeWlP2h85OLg65L4uFc1G+5vE3e3Gt7JsyS8aA1pn/DWAwHKAQIu
CcP3ySkDA+Gjq3zcowIwADAKBggqhkjOPQQDAgNHADBEAiBaPwRXFY96MRaEk12I
IAKdIQAJKmplKM0d/pnELBmF6AIgBoMu+Mz12QXzpSpmmXYrlIc3jdI11Lf9WYCO
IRtbBWs=
-----END CERTIFICATE----- {signature: 3, hash: 4}
sig change have-local-offer
iceGatheringStateChange gathering
sig change stable
connectionStateChange new
start server
iceConnectionStateChange checking
handleHandshakes (1) [1]
send flight2
RenegotiationIndication Buffer(1) [0, buffer: ArrayBuffer(132), byteLength: 1, byteOffset: 72, length: 1, Symbol(Symbol.toStringTag): 'Uint8Array']
curves (3) [29, 23, 24]
curve selected 29
hash,signature (9) [{…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}]
srtp profiles (3) [1, 8, 7]
srtp profile selected 7
cipher suites (11) [52393, 52392, 49195, 49199, 49161, 49171, 49162, 49172, 156, 47, 53]
selected cipherSuite 49195
b19a8c4b54 handleHandshakes (1) [1]
b19a8c4b54 send flight4
b19a8c4b54 handleHandshakes (1) [16]
b19a8c4b54 handleHandshakes (1) [20]
b19a8c4b54 dtls connected