Skip to content

Commit

Permalink
Bug 1645479 - Use SECITEM_CopyItem instead of SECITEM_MakeItem in sec…
Browse files Browse the repository at this point in the history
…util.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

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Kevin Jacobs committed Jun 12, 2020
1 parent f54d6b4 commit 73faa2b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/lib/secutil.c
Expand Up @@ -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;
Expand Down

0 comments on commit 73faa2b

Please sign in to comment.