test all jwk fields

This commit is contained in:
AJ ONeal 2016-08-02 18:03:03 -04:00
parent 37d96b61e7
commit 0085fcdf0f
1 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,9 @@ if (privkeyPemRef !== refs.privPem2) {
//
//
console.log('PEM -> JWK ?', privkeyJwkRef.n === refs.privJwk.n);
if (privkeyJwkRef.n !== refs.privJwk.n) {
if (![ 'kty', 'n', 'e', 'p', 'q', 'dp', 'dq', 'qi', 'd' ].every(function (k) {
return privkeyJwkRef[k] === refs.privJwk[k];
})) {
console.log('REF:');
console.log(privkeyJwkRef);
console.log('GEN:');