Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

tls: wrap tls inside tls using legacy API #6261

Closed
wants to merge 1 commit into from

Conversation

indutny
Copy link
Member

@indutny indutny commented Sep 24, 2013

Allow wrapping TLSSocket inside another TLSSocket, emulate it using
SecurePair in legacy APIs.

fix #6204

/cc @TooTallNate @bnoordhuis

Allow wrapping TLSSocket inside another TLSSocket, emulate it using
SecurePair in legacy APIs.

fix nodejs#6204

if (!options.socket) {
assert(!legacy);
var connect_opt = (options.path && !options.port) ? {path: options.path} : {
Copy link
Member

Choose a reason for hiding this comment

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

For readability's sake, can you change this into if/then/else statements?

@bnoordhuis
Copy link
Member

test/simple/test-tls-inception.js

Har har. :-)

LGTM at a quick glance. I'd like @TooTallNate to take a peek / test it, too.

var legacy;
var result;
if (options.socket instanceof TLSSocket) {
console.log('legacy connect');

Choose a reason for hiding this comment

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

remove

Choose a reason for hiding this comment

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

or change to a debug() call...

Copy link
Member Author

Choose a reason for hiding this comment

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

That was supposed to be debug() call, forgot to change it back :)

@indutny
Copy link
Member Author

indutny commented Sep 24, 2013

Thanks, landed with small fix in 42acbf8.

@indutny indutny closed this Sep 24, 2013
@indutny indutny deleted the fix/gh-6204 branch September 24, 2013 16:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants