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

[RFR] Complete lib #3

Merged
merged 8 commits into from
Apr 30, 2019
Merged

[RFR] Complete lib #3

merged 8 commits into from
Apr 30, 2019

Conversation

ThieryMichel
Copy link
Contributor

follow #2

Copy link

@djhi djhi left a comment

Choose a reason for hiding this comment

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

Nice refactoring! Can you use ticks for names in the README ?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
const reservedByte = Buffer.from([0x00]);
const publicKey = convertCOSEPublicKeyToRawPKCSECDHAKey(authenticatorData.COSEPublicKey);
const publicKey = ConvertCOSEPublicKeyToRawPKCSECDHAKey(
Copy link

Choose a reason for hiding this comment

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

pascal case

]);

const PEMCertificate = convertASN1toPEM(authenticatorKey.attStmt.x5c[0]);
const PEMCertificate = ConvertASN1toPEM(authenticatorKey.attStmt.x5c[0]);
Copy link

Choose a reason for hiding this comment

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

pascal case

]);

const publicKey = convertASN1toPEM(Buffer.from(key.publicKey, 'base64'));
const publicKey = ConvertASN1toPEM(Buffer.from(key.publicKey, 'base64'));
Copy link

Choose a reason for hiding this comment

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

pascal case


/**
* Convert binary certificate or public key to an OpenSSL-compatible PEM text format.
*/
exports.convertASN1toPEM = pkBuffer => {
exports.ConvertASN1toPEM = pkBuffer => {
Copy link

Choose a reason for hiding this comment

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

pascal case

* @param {Buffer} cosePublicKey - COSE encoded public key
* @return {Buffer} - RAW PKCS encoded public key
*/
exports.ConvertCOSEPublicKeyToRawPKCSECDHAKey = cosePublicKey => {
Copy link

Choose a reason for hiding this comment

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

pascal case

@djhi djhi merged commit 8138c02 into wallix:master Apr 30, 2019
@ThieryMichel ThieryMichel mentioned this pull request May 2, 2019
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.

2 participants