diff options
author | Kevin Jacobs <kjacobs@mozilla.com> | 2020-06-12 20:17:48 +0000 |
---|---|---|
committer | Kevin Jacobs <kjacobs@mozilla.com> | 2020-06-12 20:17:48 +0000 |
commit | 0c7312e1027b1d69c2766949b75ab5257a59df92 (patch) | |
tree | 39f5841051fc8f505cbf61b8e4defbdf817b9398 | |
parent | c516c28ba9ef0f4ff9c0cb46694c7e268d448f55 (diff) | |
download | nss-hg-0c7312e1027b1d69c2766949b75ab5257a59df92.tar.gz |
Bug 1645479 - Use SECITEM_CopyItem instead of SECITEM_MakeItem in secutil.c. r=jcj
This patch converts a call to `SECITEM_MakeItem` to use `SECITEM_CopyItem` instead. Using the former works fine in NSS CI, but causes build failures in mozilla-central due to differences in how both symbols are exported (i.e. when folding nssutil into nss).
Differential Revision: https://phabricator.services.mozilla.com/D79525
-rw-r--r-- | cmd/lib/secutil.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/lib/secutil.c b/cmd/lib/secutil.c index 605139925..b70a14172 100644 --- a/cmd/lib/secutil.c +++ b/cmd/lib/secutil.c @@ -4200,10 +4200,10 @@ readPSK(const char *arg, SECItem *psk, SECItem *label) } rv = SECSuccess; } else { - const PRUint8 defaultLabel[] = { 'C', 'l', 'i', 'e', 'n', 't', '_', - 'i', 'd', 'e', 'n', 't', 'i', 't', 'y' }; - rv = SECITEM_MakeItem(NULL, &labelItem, defaultLabel, - sizeof(defaultLabel)); + PRUint8 defaultLabel[] = { 'C', 'l', 'i', 'e', 'n', 't', '_', + 'i', 'd', 'e', 'n', 't', 'i', 't', 'y' }; + SECItem src = { siBuffer, defaultLabel, sizeof(defaultLabel) }; + rv = SECITEM_CopyItem(NULL, &labelItem, &src); } if (rv == SECSuccess) { *label = labelItem; |