Skip to content

Stop OpenSSL from inserting empty fragments - #820

Merged
arthurschreiber merged 1 commit into
masterfrom
arthur/fix-encrypted-connections
Nov 2, 2018
Merged

arthurschreiber merged 1 commit into
masterfrom
arthur/fix-encrypted-connections

Conversation

@arthurschreiber

Copy link
Copy Markdown
Collaborator

SQLServer versions running on older Windows versions that have a buggy
SSL/TLS implementation don't play well with the BEAST countermeasure
implemented by OpenSSL, and cause the connection process to hang during
the SSL/TLS handshake.

Due to the nature of the BEAST attack (it's specific to web browsers),
we can safely disable the counter measures to fix the connection
process, without jeopardizing security. 🎉

SQLServer versions running on older Windows versions that have a buggy 
SSL/TLS implementation don't play well with the BEAST countermeasure 
implemented by OpenSSL, and cause the connection process to hang during 
the SSL/TLS handshake.

Due to the nature of the BEAST attack (it's specific to web browsers), 
we can safely disable the counter measures to fix the connection 
process, without jeopardizing security.
Comment thread src/message-io.js
import type { Socket } from 'net';

// $FlowFixMe
const constants = require('constants');

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason, Flow does not know about this module. 🤷‍♂️

Comment thread src/message-io.js
}

startTls(credentialsDetails: Object, hostname: string, trustServerCertificate: boolean) {
const credentials = tls.createSecureContext ? tls.createSecureContext(credentialsDetails) : crypto.createCredentials(credentialsDetails);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tls.createSecureContext is available in all Node.js versions that we support, so I removed this conditional here.

@arthurschreiber

Copy link
Copy Markdown
Collaborator Author

🎉 This PR is included in version 4.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@arthurschreiber
arthurschreiber deleted the arthur/fix-encrypted-connections branch January 8, 2019 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant