diff options
author | win7-7 <win7-7@users.noreply.github.com> | 2019-06-30 12:38:18 +0300 |
---|---|---|
committer | win7-7 <win7-7@users.noreply.github.com> | 2019-06-30 12:38:18 +0300 |
commit | 3051056bbb0b41b8258d91e44a4ff8ec33a98d8f (patch) | |
tree | 435214f56383925b337cc350452485717c4ea0d1 /security/nss/lib/softoken/lgglue.c | |
parent | 00812e30dfa70f9b1a752cf0d09de00f6d401c85 (diff) | |
parent | 98f7e3b16754aedd44747261113359b8d824449f (diff) | |
download | UXP-3051056bbb0b41b8258d91e44a4ff8ec33a98d8f.tar UXP-3051056bbb0b41b8258d91e44a4ff8ec33a98d8f.tar.gz UXP-3051056bbb0b41b8258d91e44a4ff8ec33a98d8f.tar.lz UXP-3051056bbb0b41b8258d91e44a4ff8ec33a98d8f.tar.xz UXP-3051056bbb0b41b8258d91e44a4ff8ec33a98d8f.zip |
Merge branch 'master' into FrameProperties
Diffstat (limited to 'security/nss/lib/softoken/lgglue.c')
-rw-r--r-- | security/nss/lib/softoken/lgglue.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/security/nss/lib/softoken/lgglue.c b/security/nss/lib/softoken/lgglue.c index 94f054129..67f17943b 100644 --- a/security/nss/lib/softoken/lgglue.c +++ b/security/nss/lib/softoken/lgglue.c @@ -171,6 +171,8 @@ sftkdb_encrypt_stub(PLArenaPool *arena, SDB *sdb, SECItem *plainText, { SFTKDBHandle *handle = sdb->app_private; SECStatus rv; + SECItem *key; + int iterationCount; if (handle == NULL) { return SECFailure; @@ -192,9 +194,15 @@ sftkdb_encrypt_stub(PLArenaPool *arena, SDB *sdb, SECItem *plainText, /* PORT_SetError */ return SECFailure; } + if (handle->newKey) { + key = handle->newKey; + iterationCount = handle->newDefaultIterationCount; + } else { + key = &handle->passwordKey; + iterationCount = handle->defaultIterationCount; + } - rv = sftkdb_EncryptAttribute(arena, - handle->newKey ? handle->newKey : &handle->passwordKey, + rv = sftkdb_EncryptAttribute(arena, key, iterationCount, plainText, cipherText); PZ_Unlock(handle->passwordLock); |