Skip to content

Make sure that Node 6-8 is supported#41

Merged
ziluvatar merged 2 commits intomasterfrom
unknown repository
Feb 26, 2018
Merged

Make sure that Node 6-8 is supported#41
ziluvatar merged 2 commits intomasterfrom
unknown repository

Conversation

@gnarea
Copy link
Contributor

@gnarea gnarea commented Feb 26, 2018

We want to make sure that Node 6 and 8 are supported today, and as future changes are introduced.

Given the changes to the default encoding in the cryptographic functions introduced in Node 6, I wasn't sure if xmlenc.decryptKeyInfo() worked properly in Node 6.

@gnarea gnarea self-assigned this Feb 26, 2018
};

crypto.randomBytes(32, function(err, randomBytes) {
var plaintext = 'The quick brown fox jumps over the lazy dog';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's best to test this with a constant value that we can check across versions of Node.

@@ -182,15 +182,10 @@ function decryptKeyInfo(doc, options) {
}

function decryptKeyInfoWithScheme(encryptedKey, options, scheme) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the function I was concerned could be problematic in Node 6. This change is not strictly necessary, I just happened to notice it whilst reviewing it.

@gnarea
Copy link
Contributor Author

gnarea commented Feb 26, 2018

I just noticed that the build failed on Node 0.10 only, for reasons unrelated to my change, so maybe we should drop support for it?

@ziluvatar
Copy link

ziluvatar commented Feb 26, 2018

The failure seems to be in mocha usage, last master execution run with mocha@3.3.0, your run with mocha@5.0.1.

Can you set a fixed version of mocha: https://github.com/auth0/node-xml-encryption/blob/master/package.json#L5 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants