This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 5a42382681452a6fe94c2224cd7a66047f417a96 Mon Sep 17 00:00:00 2001 | |
From: Rhys Jones <[email protected]> | |
Date: Tue, 23 Feb 2010 22:27:35 +0000 | |
Subject: [PATCH] Allow setSecure() to be called on an existing connection, to support STARTTLS handshaking | |
--- | |
deps/evcom/evcom.c | 22 ++++++++++++++++++++++ | |
deps/evcom/evcom.h | 1 + | |
src/node_net.cc | 3 +++ | |
3 files changed, 26 insertions(+), 0 deletions(-) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tcp = require("tcp"); | |
sys = require("sys"); | |
// Google smtp server | |
var client = tcp.createConnection(25, 'smtp.gmail.com'); | |
// Thawte Premium Server CA | |
var caPem = '-----BEGIN CERTIFICATE-----\n' | |
+ 'MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkEx\n' | |
+ 'FTATBgNVBAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYD\n' |