Skip to content

Commit

Permalink
Uniform single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
larabr committed Dec 14, 2020
1 parent a523ec0 commit f466c2c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Expand Up @@ -5,4 +5,4 @@ test/lib/
test/typescript/definitions.js
dist/
openpgp.store/
.nyc_output/
.nyc_output/
2 changes: 1 addition & 1 deletion test/crypto/validate.js
Expand Up @@ -238,7 +238,7 @@ module.exports = () => {
describe('RSA parameter validation', function() {
let rsaKey;
before(async () => {
rsaKey = (await openpgp.generateKey({ type: "rsa", rsaBits: 2048, userIds: [{ name: 'Test', email: 'test@test.com' }] })).key;
rsaKey = (await openpgp.generateKey({ type: 'rsa', rsaBits: 2048, userIds: [{ name: 'Test', email: 'test@test.com' }] })).key;
});

it('generated RSA params are valid', async function() {
Expand Down
16 changes: 8 additions & 8 deletions test/general/key.js
Expand Up @@ -2280,7 +2280,7 @@ function versionSpecificTests() {
openpgp.config.minRsaBits = rsaBits;

const userId = 'test <a@b.com>';
const opt = { type: "rsa", rsaBits, userIds: [userId], passphrase: '123', subkeys:[{},{}] };
const opt = { type: 'rsa', rsaBits, userIds: [userId], passphrase: '123', subkeys:[{},{}] };
try {
const { key } = await openpgp.generateKey(opt);
expect(key.users.length).to.equal(1);
Expand Down Expand Up @@ -2335,7 +2335,7 @@ function versionSpecificTests() {
openpgp.config.minRsaBits = rsaBits;

const userId = 'test <a@b.com>';
const opt = { type: "rsa", rsaBits, userIds: [userId], passphrase: '123', subkeys:[{ type: "ecc", curve: 'curve25519' }] };
const opt = { type: 'rsa', rsaBits, userIds: [userId], passphrase: '123', subkeys:[{ type: 'ecc', curve: 'curve25519' }] };
try {
const { key } = await openpgp.generateKey(opt);
expect(key.users.length).to.equal(1);
Expand Down Expand Up @@ -3402,7 +3402,7 @@ VYGdb3eNlV8CfoEC

describe('addSubkey functionality testing', function() {
const rsaBits = 1024;
const rsaOpt = { type: "rsa" };
const rsaOpt = { type: 'rsa' };
let minRsaBits;
beforeEach(function() {
minRsaBits = openpgp.config.minRsaBits;
Expand Down Expand Up @@ -3432,7 +3432,7 @@ VYGdb3eNlV8CfoEC

it('Add a new default subkey to an rsaSign key', async function() {
const userId = 'test <a@b.com>';
const opt = { type: "rsa", rsaBits, userIds: [userId], subkeys: [] };
const opt = { type: 'rsa', rsaBits, userIds: [userId], subkeys: [] };
const { key } = await openpgp.generateKey(opt);
expect(key.subKeys).to.have.length(0);
key.keyPacket.algorithm = "rsaSign";
Expand All @@ -3442,7 +3442,7 @@ VYGdb3eNlV8CfoEC

it('Add a new default subkey to an ecc key', async function() {
const userId = 'test <a@b.com>';
const opt = { type: "ecc", userIds: [userId], subkeys: [] };
const opt = { type: 'ecc', userIds: [userId], subkeys: [] };
const { key } = await openpgp.generateKey(opt);
expect(key.subKeys).to.have.length(0);
const newKey = await key.addSubkey();
Expand Down Expand Up @@ -3527,7 +3527,7 @@ VYGdb3eNlV8CfoEC
const privateKey = await openpgp.readArmoredKey(priv_key_rsa);
await privateKey.decrypt('hello world');
const total = privateKey.subKeys.length;
const opt2 = { type: "ecc", curve: 'curve25519' };
const opt2 = { type: 'ecc', curve: 'curve25519' };
let newPrivateKey = await privateKey.addSubkey(opt2);
const armoredKey = newPrivateKey.armor();
newPrivateKey = await openpgp.readArmoredKey(armoredKey);
Expand All @@ -3544,7 +3544,7 @@ VYGdb3eNlV8CfoEC
const opt = { curve: 'ed25519', userIds: [userId], subkeys:[] };
const privateKey = (await openpgp.generateKey(opt)).key;
const total = privateKey.subKeys.length;
let newPrivateKey = await privateKey.addSubkey({ type: "rsa" });
let newPrivateKey = await privateKey.addSubkey({ type: 'rsa' });
const armoredKey = newPrivateKey.armor();
newPrivateKey = await openpgp.readArmoredKey(armoredKey);
const subKey = newPrivateKey.subKeys[total];
Expand All @@ -3558,7 +3558,7 @@ VYGdb3eNlV8CfoEC
it('create and add a new rsa subkey to a dsa key', async function() {
const privateKey = await openpgp.readArmoredKey(dsaPrivateKey);
const total = privateKey.subKeys.length;
let newPrivateKey = await privateKey.addSubkey({ type: "rsa", rsaBits: 2048 });
let newPrivateKey = await privateKey.addSubkey({ type: 'rsa', rsaBits: 2048 });
newPrivateKey = await openpgp.readArmoredKey(newPrivateKey.armor());
expect(newPrivateKey.subKeys.length).to.be.equal(total + 1);
const subKey = newPrivateKey.subKeys[total];
Expand Down
4 changes: 2 additions & 2 deletions test/security/subkey_trust.js
Expand Up @@ -10,7 +10,7 @@ const expect = chai.expect;
async function generateTestData() {
const victimPrivKey = await generate({
userIds: ['Victim <victim@example.com>'],
type: "rsa",
type: 'rsa',
rsaBits: 1024,
subkeys: [{
sign: true
Expand All @@ -20,7 +20,7 @@ async function generateTestData() {

const attackerPrivKey = await generate({
userIds: ['Attacker <attacker@example.com>'],
type: "rsa",
type: 'rsa',
rsaBits: 1024,
subkeys: [],
sign: false
Expand Down

0 comments on commit f466c2c

Please sign in to comment.