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

Added operation Parse X509 Certificate Bundles #954

Closed
wants to merge 3 commits into from

Conversation

nehagopinath
Copy link

The operation ParseX.509Certificate parses a single X.509 certificate and displays the parsed certificate information. The newly added operation ParseX.509CertificateBundles, parses X.509 certificate bundles and displays the information (Validity, Issuer, Subject, Extensions) of each parsed certificate one after another.
This operation helps parsing certificate bundles also as a PEM file.

Copy link
Member

@n1474335 n1474335 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you remove the .idea directory from this PR please?

@@ -137,6 +137,7 @@
"nodom": "^2.4.0",
"notepack.io": "^2.2.0",
"nwmatcher": "^1.4.4",
"openssl-nodejs": "^1.0.5",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is imported but never used.

run(input, args) {

if (!input.length) {
return "No input";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use throw new OperationError(msg) instead of simply returning a string. This has repercussions for the NodeAPI.

}

while ((m = regex2.exec(input)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These regexes can't hit on zero-width matches, so this check is unnecessary.

let count = 0;

while ((m = regex1.exec(input)) !== null) {
// This is necessary to avoid infinite loops with zero-width matches
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These regexes can't hit on zero-width matches, so this check is unnecessary.


// Extensions
try {
// extensions =cert.getInfo();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line

}

count++;
res += "\nCertificate:\n" + parseCert("-----BEGIN CERTIFICATE-----" + "\n" + m[1] + "\n" + "-----END CERTIFICATE-----");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CLAassistant
Copy link

CLAassistant commented Mar 9, 2020

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Neha Gopinath seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@a3957273
Copy link
Member

This was reviewed and never updated over four years ago, so I'm going to close this PR for now!

@a3957273 a3957273 closed this Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants