diff options
| author | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-09-23 10:10:27 +0200 |
| commit | e126f3e804c35480c4f075777430419d6ece23da (patch) | |
| tree | 5d5821ebcda8cd6ac34d2483bb3354910e508930 /libnm-util/crypto_nss.c | |
| parent | c240974325c552cad177c457d6ff04e381fd77a3 (diff) | |
New upstream version 1.12.4 upstream/1.12.4
Diffstat (limited to 'libnm-util/crypto_nss.c')
| -rw-r--r-- | libnm-util/crypto_nss.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c index 01bb28c3..b55af774 100644 --- a/libnm-util/crypto_nss.c +++ b/libnm-util/crypto_nss.c @@ -441,7 +441,10 @@ crypto_verify_pkcs12 (const GByteArray *data, PK11SlotInfo *slot = NULL; SECStatus s; char *ucs2_password; - long ucs2_chars = 0; + glong ucs2_chars = 0; +#ifndef WORDS_BIGENDIAN + guint16 *p; +#endif /* WORDS_BIGENDIAN */ if (error) g_return_val_if_fail (*error == NULL, FALSE); @@ -467,14 +470,10 @@ crypto_verify_pkcs12 (const GByteArray *data, memset (ucs2_password, 0, ucs2_chars); g_free (ucs2_password); -#if __BYTE_ORDER == __LITTLE_ENDIAN - { - guint16 *p; - - for (p = (guint16 *) pw.data; p < (guint16 *) (pw.data + pw.len); p++) - *p = GUINT16_SWAP_LE_BE (*p); - } -#endif +#ifndef WORDS_BIGENDIAN + for (p = (guint16 *) pw.data; p < (guint16 *) (pw.data + pw.len); p++) + *p = GUINT16_SWAP_LE_BE (*p); +#endif /* WORDS_BIGENDIAN */ } else { /* NULL password */ pw.data = NULL; |