diff --git a/doc/api/tls.md b/doc/api/tls.md index 80cd2e87263566..20599c3161adfd 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -1149,6 +1149,40 @@ For example: console.log(tls.getCiphers()); // ['AES128-SHA', 'AES256-SHA', ...] ``` +## tls.parseCertString(str) + + +* `str` {string} A Cert in [`ini`][] format. + +Returns the parsed object. + +For example: + +```js +tls.parseCertString(`C=US +ST=CA +L=SF +O=Joyent +OU=Node.js +CN=ca1 +emailAddress=ry@clouds.org`); +``` + +This will return — + +```js +{ C: 'US', + ST: 'CA', + L: 'SF', + O: 'Joyent', + OU: 'Node.js', + CN: 'ca1', + emailAddress: 'ry@clouds.org' } +``` + ## tls.DEFAULT_ECDH_CURVE