Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

certificate regex check the "subject CN=" sub string doing so harsh. #2082

Closed
CoNETProject opened this issue Sep 14, 2017 · 1 comment
Closed
Labels

Comments

@CoNETProject
Copy link

async function extractCommonNameUsingOpenssl(password: string, certPath: string): Promise<string> {

Hello,

My certificate subject have string that is not end with CN=(xxxxx).
It looks have a lot of information string in the subject line like /C= /OU= /O= ...
I saw your winPackager.js have regex match it looks need a /CN=() string be the end of the line.

const match = result.match(/^subject.*\/CN=([^\/]+)$/m);

I changed it then I got perfect running.

// const match = result.match(/^subject.*\/CN=([^\/]+)$/m);
const match = result.match(/^subject.*\/CN=([^\/]+)/m);

Thanks!

Peter
That code looks can't pass all certificate

@develar develar added the bug label Sep 14, 2017
@develar
Copy link
Member

develar commented Sep 14, 2017

Fix will be applied 22 September.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants