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

View file

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