Return an object instead of null for empty JWK presets

This commit is contained in:
Christoph Diehl 2018-01-31 12:21:29 +01:00
parent 6c0c0c0fff
commit 51ff738c34
No known key found for this signature in database
GPG Key ID: 799CE5B68FEF404A
1 changed files with 22 additions and 22 deletions

View File

@ -194,7 +194,7 @@ make.crypto = {
return this.alg() return this.alg()
}, },
presets: { presets: {
raw: null, raw: {},
jwk: [ jwk: [
{ {
kty: 'RSA', kty: 'RSA',
@ -256,7 +256,7 @@ make.crypto = {
return this.alg() return this.alg()
}, },
presets: { presets: {
raw: null, raw: {},
jwk: [ jwk: [
{ {
kty: 'RSA', kty: 'RSA',
@ -329,7 +329,7 @@ make.crypto = {
return this.alg() return this.alg()
}, },
presets: { presets: {
raw: null, raw: {},
jkw: [ jkw: [
{ {
kty: 'RSA', kty: 'RSA',
@ -390,7 +390,7 @@ make.crypto = {
return this.alg() return this.alg()
}, },
presets: { presets: {
raw: null, raw: {},
jwk: [ jwk: [
{ {
kty: 'EC', kty: 'EC',
@ -446,7 +446,7 @@ make.crypto = {
) )
}, },
presets: { presets: {
raw: null, raw: {},
jwk: [ jwk: [
{ {
kty: 'EC', kty: 'EC',
@ -519,8 +519,8 @@ make.crypto = {
ext: true ext: true
} }
], ],
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
}, },
'AES-CBC': { 'AES-CBC': {
@ -581,8 +581,8 @@ make.crypto = {
ext: true ext: true
} }
], ],
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
}, },
'AES-GCM': { 'AES-GCM': {
@ -646,8 +646,8 @@ make.crypto = {
ext: true ext: true
} }
], ],
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
}, },
'AES-KW': { 'AES-KW': {
@ -694,8 +694,8 @@ make.crypto = {
ext: true ext: true
} }
], ],
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
}, },
'HMAC': { 'HMAC': {
@ -738,8 +738,8 @@ make.crypto = {
alg: 'HS256', alg: 'HS256',
ext: true ext: true
}, },
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
}, },
'HKDF': { 'HKDF': {
@ -813,9 +813,9 @@ make.crypto = {
}, },
presets: { presets: {
raw: crypto.getRandomValues(new Uint8Array(16)), raw: crypto.getRandomValues(new Uint8Array(16)),
jwk: null, jwk: {},
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
}, },
'DH': { 'DH': {
@ -853,10 +853,10 @@ make.crypto = {
) )
}, },
presets: { presets: {
raw: null, raw: {},
jwk: null, jwk: {},
spki: null, spki: {},
pkcs8: null pkcs8: {}
} }
} }
}, },