-
Notifications
You must be signed in to change notification settings - Fork 23
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
Conversation
There was a problem hiding this 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 ?
const reservedByte = Buffer.from([0x00]); | ||
const publicKey = convertCOSEPublicKeyToRawPKCSECDHAKey(authenticatorData.COSEPublicKey); | ||
const publicKey = ConvertCOSEPublicKeyToRawPKCSECDHAKey( |
There was a problem hiding this comment.
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]); |
There was a problem hiding this comment.
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')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pascal case
packages/server/src/utils.js
Outdated
|
||
/** | ||
* Convert binary certificate or public key to an OpenSSL-compatible PEM text format. | ||
*/ | ||
exports.convertASN1toPEM = pkBuffer => { | ||
exports.ConvertASN1toPEM = pkBuffer => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pascal case
packages/server/src/utils.js
Outdated
* @param {Buffer} cosePublicKey - COSE encoded public key | ||
* @return {Buffer} - RAW PKCS encoded public key | ||
*/ | ||
exports.ConvertCOSEPublicKeyToRawPKCSECDHAKey = cosePublicKey => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pascal case
4e8ce1a
to
671ffc2
Compare
671ffc2
to
6f4f119
Compare
follow #2