Specific TLS version for STARTTLS in node.js

How can I specify the TLS version with tls.createSecurePair or crypto.createCredentials?

I am asking b/c I want to add STARTTLS server support to this starttls node lib.

Actually you don't need a starttls module with node v0.8+. However to specify the TLS/SSL version, you do need node v0.10+. Here's how you'd do it to force TLSv1 for example:

// `sock` is your tcp socket
var encryptedSock = tls.connect({
  socket: sock,
  secureProtocol: 'TLSv1_method'
}, function() {
  // socket upgraded!
});

secureProtocol could also be 'SSLv3_method' or 'SSLv2_method'.