-
Notifications
You must be signed in to change notification settings - Fork 120
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
Incorrect function #15
Comments
And having this is not a good idea :) getIssuer() {
return this._cert.issuer.typesAndValues[0].value.valueBlock.value;
} It is not a good idea because no one could be 100% sure that first element in |
Thanks for the review and the feedback. I'll go back and make your recommended changes. I have to admit that trying to figure out how to interpret values from the certs has been a trial-and-error process. Half of that has been trying to understand the data structure created by |
Documentation for such a huge code would be a nightmare :) But I will consider this for sure. |
Looks like a good first issue for contributors - waiting for a PR |
* Add fixes for getIssuer and getSerial (#15) * Add search for commonName in getIssuer * Properly return serial number from _cert in getSerial * Use array.prototype.find instead of a for loop to find commonName * Remove static and private from searchForCommonName * Use for of loop in searchForCommonName * Add compatability to getSerial * Use double quotes in getSerial * Fix typo and suggest using getSerial("v2") in deprecation warning * Use cert.getCommonName to get serial in CertManager * Remove unnecessary param from getCommonName * Change names of variables / functions in CertManager to indicate that common name is used as a key instead of the serial number --------- Co-authored-by: James Cullum (Pseudonym) <[email protected]>
Seems you at least incorrectly named this function. And in order to get
serialNumber
would could use this code:or this one:
The text was updated successfully, but these errors were encountered: