From 468110b3276007f445741b41c36beb0ef62d751c Mon Sep 17 00:00:00 2001 From: XadillaX Date: Fri, 8 Sep 2017 15:58:54 +0800 Subject: tls: deprecate parseCertString & move to internal `tls.parseCertString()` exposed by accident. Now move this function to `internal/tls` and mark the original one as deprecated. PR-URL: https://github.com/nodejs/node/pull/14249 Refs: https://github.com/nodejs/node/issues/14193 Reviewed-By: Refael Ackermann Reviewed-By: Ben Noordhuis Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater Reviewed-By: Sakthipriyan Vairamani --- lib/_tls_common.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/_tls_common.js') diff --git a/lib/_tls_common.js b/lib/_tls_common.js index 3c4f2e2bb9..fa31fd7de6 100644 --- a/lib/_tls_common.js +++ b/lib/_tls_common.js @@ -21,6 +21,7 @@ 'use strict'; +const { parseCertString } = require('internal/tls'); const tls = require('tls'); const errors = require('internal/errors'); @@ -202,11 +203,11 @@ exports.translatePeerCertificate = function translatePeerCertificate(c) { if (!c) return null; - if (c.issuer != null) c.issuer = tls.parseCertString(c.issuer); + if (c.issuer != null) c.issuer = parseCertString(c.issuer); if (c.issuerCertificate != null && c.issuerCertificate !== c) { c.issuerCertificate = translatePeerCertificate(c.issuerCertificate); } - if (c.subject != null) c.subject = tls.parseCertString(c.subject); + if (c.subject != null) c.subject = parseCertString(c.subject); if (c.infoAccess != null) { var info = c.infoAccess; c.infoAccess = Object.create(null); -- cgit v1.2.3