Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jacobbubu/openssl-dn-parser

Non-strict openssl style distinguished name parser.
https://github.com/jacobbubu/openssl-dn-parser

Last synced: 15 days ago
JSON representation

Non-strict openssl style distinguished name parser.

Awesome Lists containing this project

README

        

# openssl-dn-parser

This is a non-strict openssl style distinguished name parser.

## Usage

``` bash
npm i openssl-dn-parser --save
```

``` js
var dnParser = require('./lib/parser');
var subject = '/C=CN/ST=Beijing Shi/O=SkinAT/OU=web/CN=\\xE8\\xAF\\x97\\xE4\\xBE\\xAC/[email protected]';
console.log(dnParser(subject));

/*
{ C: 'CN',
ST: 'Beijing Shi',
O: 'SkinAT',
OU: 'web',
CN: '诗侬',
emailAddress: '[email protected]' }
*/
```

I've not found the specification of OpenSSL distinguished name, just write the parser by guessing. I'd really appreciate that anyone can give me a clue about the spec..