You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During TLS handshake with the Data Service, if the node certificate
requires more than 8192 bytes to transmit then the handshake can fail
with the following error:
WARNING 634: ERROR: SSL_accept returned -1 with error 3
INFO 634 Closing connection [ 1.2.3.4:55555 - 5.6.7.8:11207 (not authenticated) ] due to read error: Connection reset by peer
This is caused by KV-Engine SSL handshake code failig to handle one of
the possible temporary status codes from SSL_accept(), namely
SSL_ERROR_WANT_WRITE which occurs when OpenSSL has consumed the BIO
send buffer but still has more data it wishes to write. Given the BIO
buffer size is 8192 bytes, if sending the node certificate requires
more than 8192B then SSL_ERROR_WANT_WRITE is returned by OpenSSL.
Node certificates which are in excess of 8kB - for example those which
contain a large number of Subject Alternative Names (SANs) - can
encounter this problem.
Fix by checking for SSL_ERROR_WANT_WRITE being returned from
SSL_accept(), and flushing the read/write BIOs and retrying.
Change-Id: Ic248c47a1bb22f6de64263a3edeb85818d2fc35f
Reviewed-on: http://review.couchbase.org/c/kv_engine/+/139826
Tested-by: Build Bot <[email protected]>
Reviewed-by: Trond Norbye <[email protected]>
Reviewed-by: James Harrison <[email protected]>
Well-Formed: Build Bot <[email protected]>
0 commit comments