summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorAnna Weine <anna.weine@mozilla.com>2022-10-07 11:25:24 +0000
committerAnna Weine <anna.weine@mozilla.com>2022-10-07 11:25:24 +0000
commit811625e10804cb6a36b5e643b9bb9c1fcb0a8398 (patch)
tree7c8d5fad269f9436132b6880b69abd467b926069 /cmd
parentc14535f9c17c47e1ca55af69c0214289af57a684 (diff)
downloadnss-hg-811625e10804cb6a36b5e643b9bb9c1fcb0a8398.tar.gz
Bug 1792821 - Updating the clang-format version to 10. r=jschanck
Differential Revision: https://phabricator.services.mozilla.com/D158323
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bltest/blapitest.c334
-rw-r--r--cmd/bltest/pkcs1_vectors.h45
-rw-r--r--cmd/certutil/certutil.c290
-rw-r--r--cmd/certutil/keystuff.c163
-rw-r--r--cmd/crlutil/crlgen_lex.c2
-rw-r--r--cmd/dbck/dbck.c38
-rw-r--r--cmd/dbck/dbrecover.c2
-rw-r--r--cmd/fipstest/fipstest.c203
-rw-r--r--cmd/lib/pk11table.c4
-rw-r--r--cmd/libpkix/pkix/certsel/test_certselector.c48
-rw-r--r--cmd/libpkix/pkix/top/test_basicchecker.c4
-rw-r--r--cmd/libpkix/pkix_pl/pki/test_generalname.c2
-rw-r--r--cmd/libpkix/pkix_pl/system/test_bigint.c13
-rw-r--r--cmd/lowhashtest/lowhashtest.c32
-rw-r--r--cmd/makepqg/makepqg.c3
-rw-r--r--cmd/modutil/installparse.c65
-rw-r--r--cmd/modutil/lex.Pk11Install_yy.c117
-rw-r--r--cmd/multinit/multinit.c142
-rw-r--r--cmd/pk11importtest/pk11importtest.c23
-rw-r--r--cmd/pk11mode/pk11mode.c3
-rw-r--r--cmd/pk12util/pk12util.c43
-rw-r--r--cmd/pk1sign/pk1sign.c21
-rw-r--r--cmd/pkix-errcodes/pkix-errcodes.c5
-rw-r--r--cmd/pwdecrypt/pwdecrypt.c2
-rw-r--r--cmd/rsapoptst/rsapoptst.c13
-rw-r--r--cmd/selfserv/selfserv.c4
-rw-r--r--cmd/signver/signver.c30
-rw-r--r--cmd/ssltap/ssltap.c11
-rw-r--r--cmd/strsclnt/strsclnt.c2
-rw-r--r--cmd/symkeyutil/symkeyutil.c64
-rw-r--r--cmd/validation/validation.c17
-rw-r--r--cmd/vfyserv/vfyutil.c2
32 files changed, 873 insertions, 874 deletions
diff --git a/cmd/bltest/blapitest.c b/cmd/bltest/blapitest.c
index 98e7c7538..de7f0d9c7 100644
--- a/cmd/bltest/blapitest.c
+++ b/cmd/bltest/blapitest.c
@@ -393,88 +393,87 @@ typedef struct curveNameTagPairStr {
SECOidTag curveOidTag;
} CurveNameTagPair;
-static CurveNameTagPair nameTagPair[] =
- {
- { "sect163k1", SEC_OID_SECG_EC_SECT163K1 },
- { "nistk163", SEC_OID_SECG_EC_SECT163K1 },
- { "sect163r1", SEC_OID_SECG_EC_SECT163R1 },
- { "sect163r2", SEC_OID_SECG_EC_SECT163R2 },
- { "nistb163", SEC_OID_SECG_EC_SECT163R2 },
- { "sect193r1", SEC_OID_SECG_EC_SECT193R1 },
- { "sect193r2", SEC_OID_SECG_EC_SECT193R2 },
- { "sect233k1", SEC_OID_SECG_EC_SECT233K1 },
- { "nistk233", SEC_OID_SECG_EC_SECT233K1 },
- { "sect233r1", SEC_OID_SECG_EC_SECT233R1 },
- { "nistb233", SEC_OID_SECG_EC_SECT233R1 },
- { "sect239k1", SEC_OID_SECG_EC_SECT239K1 },
- { "sect283k1", SEC_OID_SECG_EC_SECT283K1 },
- { "nistk283", SEC_OID_SECG_EC_SECT283K1 },
- { "sect283r1", SEC_OID_SECG_EC_SECT283R1 },
- { "nistb283", SEC_OID_SECG_EC_SECT283R1 },
- { "sect409k1", SEC_OID_SECG_EC_SECT409K1 },
- { "nistk409", SEC_OID_SECG_EC_SECT409K1 },
- { "sect409r1", SEC_OID_SECG_EC_SECT409R1 },
- { "nistb409", SEC_OID_SECG_EC_SECT409R1 },
- { "sect571k1", SEC_OID_SECG_EC_SECT571K1 },
- { "nistk571", SEC_OID_SECG_EC_SECT571K1 },
- { "sect571r1", SEC_OID_SECG_EC_SECT571R1 },
- { "nistb571", SEC_OID_SECG_EC_SECT571R1 },
- { "secp160k1", SEC_OID_SECG_EC_SECP160K1 },
- { "secp160r1", SEC_OID_SECG_EC_SECP160R1 },
- { "secp160r2", SEC_OID_SECG_EC_SECP160R2 },
- { "secp192k1", SEC_OID_SECG_EC_SECP192K1 },
- { "secp192r1", SEC_OID_SECG_EC_SECP192R1 },
- { "nistp192", SEC_OID_SECG_EC_SECP192R1 },
- { "secp224k1", SEC_OID_SECG_EC_SECP224K1 },
- { "secp224r1", SEC_OID_SECG_EC_SECP224R1 },
- { "nistp224", SEC_OID_SECG_EC_SECP224R1 },
- { "secp256k1", SEC_OID_SECG_EC_SECP256K1 },
- { "secp256r1", SEC_OID_SECG_EC_SECP256R1 },
- { "nistp256", SEC_OID_SECG_EC_SECP256R1 },
- { "secp384r1", SEC_OID_SECG_EC_SECP384R1 },
- { "nistp384", SEC_OID_SECG_EC_SECP384R1 },
- { "secp521r1", SEC_OID_SECG_EC_SECP521R1 },
- { "nistp521", SEC_OID_SECG_EC_SECP521R1 },
-
- { "prime192v1", SEC_OID_ANSIX962_EC_PRIME192V1 },
- { "prime192v2", SEC_OID_ANSIX962_EC_PRIME192V2 },
- { "prime192v3", SEC_OID_ANSIX962_EC_PRIME192V3 },
- { "prime239v1", SEC_OID_ANSIX962_EC_PRIME239V1 },
- { "prime239v2", SEC_OID_ANSIX962_EC_PRIME239V2 },
- { "prime239v3", SEC_OID_ANSIX962_EC_PRIME239V3 },
-
- { "c2pnb163v1", SEC_OID_ANSIX962_EC_C2PNB163V1 },
- { "c2pnb163v2", SEC_OID_ANSIX962_EC_C2PNB163V2 },
- { "c2pnb163v3", SEC_OID_ANSIX962_EC_C2PNB163V3 },
- { "c2pnb176v1", SEC_OID_ANSIX962_EC_C2PNB176V1 },
- { "c2tnb191v1", SEC_OID_ANSIX962_EC_C2TNB191V1 },
- { "c2tnb191v2", SEC_OID_ANSIX962_EC_C2TNB191V2 },
- { "c2tnb191v3", SEC_OID_ANSIX962_EC_C2TNB191V3 },
- { "c2onb191v4", SEC_OID_ANSIX962_EC_C2ONB191V4 },
- { "c2onb191v5", SEC_OID_ANSIX962_EC_C2ONB191V5 },
- { "c2pnb208w1", SEC_OID_ANSIX962_EC_C2PNB208W1 },
- { "c2tnb239v1", SEC_OID_ANSIX962_EC_C2TNB239V1 },
- { "c2tnb239v2", SEC_OID_ANSIX962_EC_C2TNB239V2 },
- { "c2tnb239v3", SEC_OID_ANSIX962_EC_C2TNB239V3 },
- { "c2onb239v4", SEC_OID_ANSIX962_EC_C2ONB239V4 },
- { "c2onb239v5", SEC_OID_ANSIX962_EC_C2ONB239V5 },
- { "c2pnb272w1", SEC_OID_ANSIX962_EC_C2PNB272W1 },
- { "c2pnb304w1", SEC_OID_ANSIX962_EC_C2PNB304W1 },
- { "c2tnb359v1", SEC_OID_ANSIX962_EC_C2TNB359V1 },
- { "c2pnb368w1", SEC_OID_ANSIX962_EC_C2PNB368W1 },
- { "c2tnb431r1", SEC_OID_ANSIX962_EC_C2TNB431R1 },
-
- { "secp112r1", SEC_OID_SECG_EC_SECP112R1 },
- { "secp112r2", SEC_OID_SECG_EC_SECP112R2 },
- { "secp128r1", SEC_OID_SECG_EC_SECP128R1 },
- { "secp128r2", SEC_OID_SECG_EC_SECP128R2 },
-
- { "sect113r1", SEC_OID_SECG_EC_SECT113R1 },
- { "sect113r2", SEC_OID_SECG_EC_SECT113R2 },
- { "sect131r1", SEC_OID_SECG_EC_SECT131R1 },
- { "sect131r2", SEC_OID_SECG_EC_SECT131R2 },
- { "curve25519", SEC_OID_CURVE25519 },
- };
+static CurveNameTagPair nameTagPair[] = {
+ { "sect163k1", SEC_OID_SECG_EC_SECT163K1 },
+ { "nistk163", SEC_OID_SECG_EC_SECT163K1 },
+ { "sect163r1", SEC_OID_SECG_EC_SECT163R1 },
+ { "sect163r2", SEC_OID_SECG_EC_SECT163R2 },
+ { "nistb163", SEC_OID_SECG_EC_SECT163R2 },
+ { "sect193r1", SEC_OID_SECG_EC_SECT193R1 },
+ { "sect193r2", SEC_OID_SECG_EC_SECT193R2 },
+ { "sect233k1", SEC_OID_SECG_EC_SECT233K1 },
+ { "nistk233", SEC_OID_SECG_EC_SECT233K1 },
+ { "sect233r1", SEC_OID_SECG_EC_SECT233R1 },
+ { "nistb233", SEC_OID_SECG_EC_SECT233R1 },
+ { "sect239k1", SEC_OID_SECG_EC_SECT239K1 },
+ { "sect283k1", SEC_OID_SECG_EC_SECT283K1 },
+ { "nistk283", SEC_OID_SECG_EC_SECT283K1 },
+ { "sect283r1", SEC_OID_SECG_EC_SECT283R1 },
+ { "nistb283", SEC_OID_SECG_EC_SECT283R1 },
+ { "sect409k1", SEC_OID_SECG_EC_SECT409K1 },
+ { "nistk409", SEC_OID_SECG_EC_SECT409K1 },
+ { "sect409r1", SEC_OID_SECG_EC_SECT409R1 },
+ { "nistb409", SEC_OID_SECG_EC_SECT409R1 },
+ { "sect571k1", SEC_OID_SECG_EC_SECT571K1 },
+ { "nistk571", SEC_OID_SECG_EC_SECT571K1 },
+ { "sect571r1", SEC_OID_SECG_EC_SECT571R1 },
+ { "nistb571", SEC_OID_SECG_EC_SECT571R1 },
+ { "secp160k1", SEC_OID_SECG_EC_SECP160K1 },
+ { "secp160r1", SEC_OID_SECG_EC_SECP160R1 },
+ { "secp160r2", SEC_OID_SECG_EC_SECP160R2 },
+ { "secp192k1", SEC_OID_SECG_EC_SECP192K1 },
+ { "secp192r1", SEC_OID_SECG_EC_SECP192R1 },
+ { "nistp192", SEC_OID_SECG_EC_SECP192R1 },
+ { "secp224k1", SEC_OID_SECG_EC_SECP224K1 },
+ { "secp224r1", SEC_OID_SECG_EC_SECP224R1 },
+ { "nistp224", SEC_OID_SECG_EC_SECP224R1 },
+ { "secp256k1", SEC_OID_SECG_EC_SECP256K1 },
+ { "secp256r1", SEC_OID_SECG_EC_SECP256R1 },
+ { "nistp256", SEC_OID_SECG_EC_SECP256R1 },
+ { "secp384r1", SEC_OID_SECG_EC_SECP384R1 },
+ { "nistp384", SEC_OID_SECG_EC_SECP384R1 },
+ { "secp521r1", SEC_OID_SECG_EC_SECP521R1 },
+ { "nistp521", SEC_OID_SECG_EC_SECP521R1 },
+
+ { "prime192v1", SEC_OID_ANSIX962_EC_PRIME192V1 },
+ { "prime192v2", SEC_OID_ANSIX962_EC_PRIME192V2 },
+ { "prime192v3", SEC_OID_ANSIX962_EC_PRIME192V3 },
+ { "prime239v1", SEC_OID_ANSIX962_EC_PRIME239V1 },
+ { "prime239v2", SEC_OID_ANSIX962_EC_PRIME239V2 },
+ { "prime239v3", SEC_OID_ANSIX962_EC_PRIME239V3 },
+
+ { "c2pnb163v1", SEC_OID_ANSIX962_EC_C2PNB163V1 },
+ { "c2pnb163v2", SEC_OID_ANSIX962_EC_C2PNB163V2 },
+ { "c2pnb163v3", SEC_OID_ANSIX962_EC_C2PNB163V3 },
+ { "c2pnb176v1", SEC_OID_ANSIX962_EC_C2PNB176V1 },
+ { "c2tnb191v1", SEC_OID_ANSIX962_EC_C2TNB191V1 },
+ { "c2tnb191v2", SEC_OID_ANSIX962_EC_C2TNB191V2 },
+ { "c2tnb191v3", SEC_OID_ANSIX962_EC_C2TNB191V3 },
+ { "c2onb191v4", SEC_OID_ANSIX962_EC_C2ONB191V4 },
+ { "c2onb191v5", SEC_OID_ANSIX962_EC_C2ONB191V5 },
+ { "c2pnb208w1", SEC_OID_ANSIX962_EC_C2PNB208W1 },
+ { "c2tnb239v1", SEC_OID_ANSIX962_EC_C2TNB239V1 },
+ { "c2tnb239v2", SEC_OID_ANSIX962_EC_C2TNB239V2 },
+ { "c2tnb239v3", SEC_OID_ANSIX962_EC_C2TNB239V3 },
+ { "c2onb239v4", SEC_OID_ANSIX962_EC_C2ONB239V4 },
+ { "c2onb239v5", SEC_OID_ANSIX962_EC_C2ONB239V5 },
+ { "c2pnb272w1", SEC_OID_ANSIX962_EC_C2PNB272W1 },
+ { "c2pnb304w1", SEC_OID_ANSIX962_EC_C2PNB304W1 },
+ { "c2tnb359v1", SEC_OID_ANSIX962_EC_C2TNB359V1 },
+ { "c2pnb368w1", SEC_OID_ANSIX962_EC_C2PNB368W1 },
+ { "c2tnb431r1", SEC_OID_ANSIX962_EC_C2TNB431R1 },
+
+ { "secp112r1", SEC_OID_SECG_EC_SECP112R1 },
+ { "secp112r2", SEC_OID_SECG_EC_SECP112R2 },
+ { "secp128r1", SEC_OID_SECG_EC_SECP128R1 },
+ { "secp128r2", SEC_OID_SECG_EC_SECP128R2 },
+
+ { "sect113r1", SEC_OID_SECG_EC_SECT113R1 },
+ { "sect113r2", SEC_OID_SECG_EC_SECT113R2 },
+ { "sect131r1", SEC_OID_SECG_EC_SECT131R1 },
+ { "sect131r2", SEC_OID_SECG_EC_SECT131R2 },
+ { "curve25519", SEC_OID_CURVE25519 },
+};
static SECItem *
getECParams(const char *curve)
@@ -646,48 +645,47 @@ typedef enum {
NUMMODES
} bltestCipherMode;
-static char *mode_strings[] =
- {
- "des_ecb",
- "des_cbc",
- "des3_ecb",
- "des3_cbc",
+static char *mode_strings[] = {
+ "des_ecb",
+ "des_cbc",
+ "des3_ecb",
+ "des3_cbc",
#ifndef NSS_DISABLE_DEPRECATED_RC2
- "rc2_ecb",
- "rc2_cbc",
+ "rc2_ecb",
+ "rc2_cbc",
#endif
- "rc4",
+ "rc4",
#ifdef NSS_SOFTOKEN_DOES_RC5
- "rc5_ecb",
- "rc5_cbc",
+ "rc5_ecb",
+ "rc5_cbc",
#endif
- "aes_ecb",
- "aes_cbc",
- "aes_cts",
- "aes_ctr",
- "aes_gcm",
- "camellia_ecb",
- "camellia_cbc",
+ "aes_ecb",
+ "aes_cbc",
+ "aes_cts",
+ "aes_ctr",
+ "aes_gcm",
+ "camellia_ecb",
+ "camellia_cbc",
#ifndef NSS_DISABLE_DEPRECATED_SEED
- "seed_ecb",
- "seed_cbc",
+ "seed_ecb",
+ "seed_cbc",
#endif
- "chacha20_ctr",
- "chacha20_poly1305",
- "rsa",
- "rsa_oaep",
- "rsa_pss",
- "ecdsa",
- /*"pqg",*/
- "dsa",
- "md2",
- "md5",
- "sha1",
- "sha224",
- "sha256",
- "sha384",
- "sha512",
- };
+ "chacha20_ctr",
+ "chacha20_poly1305",
+ "rsa",
+ "rsa_oaep",
+ "rsa_pss",
+ "ecdsa",
+ /*"pqg",*/
+ "dsa",
+ "md2",
+ "md5",
+ "sha1",
+ "sha224",
+ "sha256",
+ "sha384",
+ "sha512",
+};
typedef struct
{
@@ -3661,57 +3659,55 @@ enum {
opt_CmdLine
};
-static secuCommandFlag bltest_commands[] =
- {
- { /* cmd_Decrypt */ 'D', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Encrypt */ 'E', PR_FALSE, 0, PR_FALSE },
- { /* cmd_FIPS */ 'F', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Hash */ 'H', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Nonce */ 'N', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Dump */ 'P', PR_FALSE, 0, PR_FALSE },
- { /* cmd_RSAPopulate */ 'R', PR_FALSE, 0, PR_FALSE },
- { /* cmd_RSAPopulateKV */ 'K', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Sign */ 'S', PR_FALSE, 0, PR_FALSE },
- { /* cmd_SelfTest */ 'T', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Verify */ 'V', PR_FALSE, 0, PR_FALSE }
- };
-
-static secuCommandFlag bltest_options[] =
- {
- { /* opt_B64 */ 'a', PR_FALSE, 0, PR_FALSE },
- { /* opt_BufSize */ 'b', PR_TRUE, 0, PR_FALSE },
- { /* opt_Restart */ 'c', PR_FALSE, 0, PR_FALSE },
- { /* opt_SelfTestDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_Exponent */ 'e', PR_TRUE, 0, PR_FALSE },
- { /* opt_SigFile */ 'f', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeySize */ 'g', PR_TRUE, 0, PR_FALSE },
- { /* opt_Hex */ 'h', PR_FALSE, 0, PR_FALSE },
- { /* opt_Input */ 'i', PR_TRUE, 0, PR_FALSE },
- { /* opt_PQGFile */ 'j', PR_TRUE, 0, PR_FALSE },
- { /* opt_Key */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_HexWSpc */ 'l', PR_FALSE, 0, PR_FALSE },
- { /* opt_Mode */ 'm', PR_TRUE, 0, PR_FALSE },
- { /* opt_CurveName */ 'n', PR_TRUE, 0, PR_FALSE },
- { /* opt_Output */ 'o', PR_TRUE, 0, PR_FALSE },
- { /* opt_Repetitions */ 'p', PR_TRUE, 0, PR_FALSE },
- { /* opt_ZeroBuf */ 'q', PR_FALSE, 0, PR_FALSE },
- { /* opt_Rounds */ 'r', PR_TRUE, 0, PR_FALSE },
- { /* opt_Seed */ 's', PR_TRUE, 0, PR_FALSE },
- { /* opt_SigSeedFile */ 't', PR_TRUE, 0, PR_FALSE },
- { /* opt_CXReps */ 'u', PR_TRUE, 0, PR_FALSE },
- { /* opt_IV */ 'v', PR_TRUE, 0, PR_FALSE },
- { /* opt_WordSize */ 'w', PR_TRUE, 0, PR_FALSE },
- { /* opt_UseSeed */ 'x', PR_FALSE, 0, PR_FALSE },
- { /* opt_UseSigSeed */ 'y', PR_FALSE, 0, PR_FALSE },
- { /* opt_SeedFile */ 'z', PR_FALSE, 0, PR_FALSE },
- { /* opt_AAD */ 0, PR_TRUE, 0, PR_FALSE, "aad" },
- { /* opt_InputOffset */ '1', PR_TRUE, 0, PR_FALSE },
- { /* opt_OutputOffset */ '2', PR_TRUE, 0, PR_FALSE },
- { /* opt_MonteCarlo */ '3', PR_FALSE, 0, PR_FALSE },
- { /* opt_ThreadNum */ '4', PR_TRUE, 0, PR_FALSE },
- { /* opt_SecondsToRun */ '5', PR_TRUE, 0, PR_FALSE },
- { /* opt_CmdLine */ '-', PR_FALSE, 0, PR_FALSE }
- };
+static secuCommandFlag bltest_commands[] = {
+ { /* cmd_Decrypt */ 'D', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Encrypt */ 'E', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_FIPS */ 'F', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Hash */ 'H', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Nonce */ 'N', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Dump */ 'P', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_RSAPopulate */ 'R', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_RSAPopulateKV */ 'K', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Sign */ 'S', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_SelfTest */ 'T', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Verify */ 'V', PR_FALSE, 0, PR_FALSE }
+};
+
+static secuCommandFlag bltest_options[] = {
+ { /* opt_B64 */ 'a', PR_FALSE, 0, PR_FALSE },
+ { /* opt_BufSize */ 'b', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Restart */ 'c', PR_FALSE, 0, PR_FALSE },
+ { /* opt_SelfTestDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Exponent */ 'e', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SigFile */ 'f', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeySize */ 'g', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Hex */ 'h', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Input */ 'i', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PQGFile */ 'j', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Key */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_HexWSpc */ 'l', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Mode */ 'm', PR_TRUE, 0, PR_FALSE },
+ { /* opt_CurveName */ 'n', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Output */ 'o', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Repetitions */ 'p', PR_TRUE, 0, PR_FALSE },
+ { /* opt_ZeroBuf */ 'q', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Rounds */ 'r', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Seed */ 's', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SigSeedFile */ 't', PR_TRUE, 0, PR_FALSE },
+ { /* opt_CXReps */ 'u', PR_TRUE, 0, PR_FALSE },
+ { /* opt_IV */ 'v', PR_TRUE, 0, PR_FALSE },
+ { /* opt_WordSize */ 'w', PR_TRUE, 0, PR_FALSE },
+ { /* opt_UseSeed */ 'x', PR_FALSE, 0, PR_FALSE },
+ { /* opt_UseSigSeed */ 'y', PR_FALSE, 0, PR_FALSE },
+ { /* opt_SeedFile */ 'z', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AAD */ 0, PR_TRUE, 0, PR_FALSE, "aad" },
+ { /* opt_InputOffset */ '1', PR_TRUE, 0, PR_FALSE },
+ { /* opt_OutputOffset */ '2', PR_TRUE, 0, PR_FALSE },
+ { /* opt_MonteCarlo */ '3', PR_FALSE, 0, PR_FALSE },
+ { /* opt_ThreadNum */ '4', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SecondsToRun */ '5', PR_TRUE, 0, PR_FALSE },
+ { /* opt_CmdLine */ '-', PR_FALSE, 0, PR_FALSE }
+};
int
main(int argc, char **argv)
diff --git a/cmd/bltest/pkcs1_vectors.h b/cmd/bltest/pkcs1_vectors.h
index 06729675e..15812bee0 100644
--- a/cmd/bltest/pkcs1_vectors.h
+++ b/cmd/bltest/pkcs1_vectors.h
@@ -34,7 +34,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -85,7 +86,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -136,7 +138,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -187,7 +190,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -238,7 +242,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -289,7 +294,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -340,7 +346,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -394,7 +401,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -445,7 +453,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -496,7 +505,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -547,7 +557,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -598,7 +609,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -649,7 +661,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -700,7 +713,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
@@ -751,7 +765,8 @@ struct pkcs1_test_vector PKCS1_VECTORS[15] = {
0x64, 0xc4, 0xef, 0x22, 0xe1, 0xe1, 0xf2, 0x0d, 0x0c, 0xe8,
0xcf, 0xfb, 0x22, 0x49, 0xbd, 0x9a, 0x21, 0x37 },
128,
- (unsigned char[]){ 0x01, 0x00, 0x01 }, 3,
+ (unsigned char[]){ 0x01, 0x00, 0x01 },
+ 3,
(unsigned char[]){
0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51,
0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf,
diff --git a/cmd/certutil/certutil.c b/cmd/certutil/certutil.c
index 16a9bf16e..e745a447f 100644
--- a/cmd/certutil/certutil.c
+++ b/cmd/certutil/certutil.c
@@ -2358,34 +2358,32 @@ typedef struct {
#define NAME_SIZE(x) #x, sizeof(#x) - 1
-flagArray opFlagsArray[] =
- {
- { NAME_SIZE(encrypt), CKF_ENCRYPT },
- { NAME_SIZE(decrypt), CKF_DECRYPT },
- { NAME_SIZE(sign), CKF_SIGN },
- { NAME_SIZE(sign_recover), CKF_SIGN_RECOVER },
- { NAME_SIZE(verify), CKF_VERIFY },
- { NAME_SIZE(verify_recover), CKF_VERIFY_RECOVER },
- { NAME_SIZE(wrap), CKF_WRAP },
- { NAME_SIZE(unwrap), CKF_UNWRAP },
- { NAME_SIZE(derive), CKF_DERIVE }
- };
+flagArray opFlagsArray[] = {
+ { NAME_SIZE(encrypt), CKF_ENCRYPT },
+ { NAME_SIZE(decrypt), CKF_DECRYPT },
+ { NAME_SIZE(sign), CKF_SIGN },
+ { NAME_SIZE(sign_recover), CKF_SIGN_RECOVER },
+ { NAME_SIZE(verify), CKF_VERIFY },
+ { NAME_SIZE(verify_recover), CKF_VERIFY_RECOVER },
+ { NAME_SIZE(wrap), CKF_WRAP },
+ { NAME_SIZE(unwrap), CKF_UNWRAP },
+ { NAME_SIZE(derive), CKF_DERIVE }
+};
int opFlagsCount = PR_ARRAY_SIZE(opFlagsArray);
-flagArray attrFlagsArray[] =
- {
- { NAME_SIZE(token), PK11_ATTR_TOKEN },
- { NAME_SIZE(session), PK11_ATTR_SESSION },
- { NAME_SIZE(private), PK11_ATTR_PRIVATE },
- { NAME_SIZE(public), PK11_ATTR_PUBLIC },
- { NAME_SIZE(modifiable), PK11_ATTR_MODIFIABLE },
- { NAME_SIZE(unmodifiable), PK11_ATTR_UNMODIFIABLE },
- { NAME_SIZE(sensitive), PK11_ATTR_SENSITIVE },
- { NAME_SIZE(insensitive), PK11_ATTR_INSENSITIVE },
- { NAME_SIZE(extractable), PK11_ATTR_EXTRACTABLE },
- { NAME_SIZE(unextractable), PK11_ATTR_UNEXTRACTABLE }
- };
+flagArray attrFlagsArray[] = {
+ { NAME_SIZE(token), PK11_ATTR_TOKEN },
+ { NAME_SIZE(session), PK11_ATTR_SESSION },
+ { NAME_SIZE(private), PK11_ATTR_PRIVATE },
+ { NAME_SIZE(public), PK11_ATTR_PUBLIC },
+ { NAME_SIZE(modifiable), PK11_ATTR_MODIFIABLE },
+ { NAME_SIZE(unmodifiable), PK11_ATTR_UNMODIFIABLE },
+ { NAME_SIZE(sensitive), PK11_ATTR_SENSITIVE },
+ { NAME_SIZE(insensitive), PK11_ATTR_INSENSITIVE },
+ { NAME_SIZE(extractable), PK11_ATTR_EXTRACTABLE },
+ { NAME_SIZE(unextractable), PK11_ATTR_UNEXTRACTABLE }
+};
int attrFlagsCount = PR_ARRAY_SIZE(attrFlagsArray);
@@ -2601,130 +2599,128 @@ enum certutilOpts {
opt_Help
};
-static const secuCommandFlag commands_init[] =
- {
- { /* cmd_AddCert */ 'A', PR_FALSE, 0, PR_FALSE },
- { /* cmd_CreateNewCert */ 'C', PR_FALSE, 0, PR_FALSE },
- { /* cmd_DeleteCert */ 'D', PR_FALSE, 0, PR_FALSE },
- { /* cmd_AddEmailCert */ 'E', PR_FALSE, 0, PR_FALSE },
- { /* cmd_DeleteKey */ 'F', PR_FALSE, 0, PR_FALSE },
- { /* cmd_GenKeyPair */ 'G', PR_FALSE, 0, PR_FALSE },
- { /* cmd_PrintHelp */ 'H', PR_FALSE, 0, PR_FALSE, "help" },
- { /* cmd_PrintSyntax */ 0, PR_FALSE, 0, PR_FALSE,
- "syntax" },
- { /* cmd_ListKeys */ 'K', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ListCerts */ 'L', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ModifyCertTrust */ 'M', PR_FALSE, 0, PR_FALSE },
- { /* cmd_NewDBs */ 'N', PR_FALSE, 0, PR_FALSE },
- { /* cmd_DumpChain */ 'O', PR_FALSE, 0, PR_FALSE },
- { /* cmd_CertReq */ 'R', PR_FALSE, 0, PR_FALSE },
- { /* cmd_CreateAndAddCert */ 'S', PR_FALSE, 0, PR_FALSE },
- { /* cmd_TokenReset */ 'T', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ListModules */ 'U', PR_FALSE, 0, PR_FALSE },
- { /* cmd_CheckCertValidity */ 'V', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ChangePassword */ 'W', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Version */ 'Y', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Batch */ 'B', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Merge */ 0, PR_FALSE, 0, PR_FALSE, "merge" },
- { /* cmd_UpgradeMerge */ 0, PR_FALSE, 0, PR_FALSE,
- "upgrade-merge" },
- { /* cmd_Rename */ 0, PR_FALSE, 0, PR_FALSE,
- "rename" },
- { /* cmd_BuildFlags */ 0, PR_FALSE, 0, PR_FALSE,
- "build-flags" }
- };
+static const secuCommandFlag commands_init[] = {
+ { /* cmd_AddCert */ 'A', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_CreateNewCert */ 'C', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_DeleteCert */ 'D', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_AddEmailCert */ 'E', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_DeleteKey */ 'F', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_GenKeyPair */ 'G', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_PrintHelp */ 'H', PR_FALSE, 0, PR_FALSE, "help" },
+ { /* cmd_PrintSyntax */ 0, PR_FALSE, 0, PR_FALSE,
+ "syntax" },
+ { /* cmd_ListKeys */ 'K', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ListCerts */ 'L', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ModifyCertTrust */ 'M', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_NewDBs */ 'N', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_DumpChain */ 'O', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_CertReq */ 'R', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_CreateAndAddCert */ 'S', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_TokenReset */ 'T', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ListModules */ 'U', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_CheckCertValidity */ 'V', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ChangePassword */ 'W', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Version */ 'Y', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Batch */ 'B', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Merge */ 0, PR_FALSE, 0, PR_FALSE, "merge" },
+ { /* cmd_UpgradeMerge */ 0, PR_FALSE, 0, PR_FALSE,
+ "upgrade-merge" },
+ { /* cmd_Rename */ 0, PR_FALSE, 0, PR_FALSE,
+ "rename" },
+ { /* cmd_BuildFlags */ 0, PR_FALSE, 0, PR_FALSE,
+ "build-flags" }
+};
#define NUM_COMMANDS ((sizeof commands_init) / (sizeof commands_init[0]))
-static const secuCommandFlag options_init[] =
- {
- { /* opt_SSOPass */ '0', PR_TRUE, 0, PR_FALSE },
- { /* opt_AddKeyUsageExt */ '1', PR_FALSE, 0, PR_FALSE },
- { /* opt_AddBasicConstraintExt*/ '2', PR_FALSE, 0, PR_FALSE },
- { /* opt_AddAuthorityKeyIDExt*/ '3', PR_FALSE, 0, PR_FALSE },
- { /* opt_AddCRLDistPtsExt */ '4', PR_FALSE, 0, PR_FALSE },
- { /* opt_AddNSCertTypeExt */ '5', PR_FALSE, 0, PR_FALSE },
- { /* opt_AddExtKeyUsageExt */ '6', PR_FALSE, 0, PR_FALSE },
- { /* opt_ExtendedEmailAddrs */ '7', PR_TRUE, 0, PR_FALSE },
- { /* opt_ExtendedDNSNames */ '8', PR_TRUE, 0, PR_FALSE },
- { /* opt_ASCIIForIO */ 'a', PR_FALSE, 0, PR_FALSE },
- { /* opt_ValidityTime */ 'b', PR_TRUE, 0, PR_FALSE },
- { /* opt_IssuerName */ 'c', PR_TRUE, 0, PR_FALSE },
- { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_VerifySig */ 'e', PR_FALSE, 0, PR_FALSE },
- { /* opt_PasswordFile */ 'f', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeySize */ 'g', PR_TRUE, 0, PR_FALSE },
- { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
- { /* opt_InputFile */ 'i', PR_TRUE, 0, PR_FALSE },
- { /* opt_Emailaddress */ 0, PR_TRUE, 0, PR_FALSE, "email" },
- { /* opt_KeyIndex */ 'j', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeyType */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_DetailedInfo */ 'l', PR_FALSE, 0, PR_FALSE },
- { /* opt_SerialNumber */ 'm', PR_TRUE, 0, PR_FALSE },
- { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE },
- { /* opt_OutputFile */ 'o', PR_TRUE, 0, PR_FALSE },
- { /* opt_PhoneNumber */ 'p', PR_TRUE, 0, PR_FALSE },
- { /* opt_DBPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
- { /* opt_PQGFile */ 'q', PR_TRUE, 0, PR_FALSE },
- { /* opt_BinaryDER */ 'r', PR_FALSE, 0, PR_FALSE },
- { /* opt_Subject */ 's', PR_TRUE, 0, PR_FALSE },
- { /* opt_Trust */ 't', PR_TRUE, 0, PR_FALSE },
- { /* opt_Usage */ 'u', PR_TRUE, 0, PR_FALSE },
- { /* opt_Validity */ 'v', PR_TRUE, 0, PR_FALSE },
- { /* opt_OffsetMonths */ 'w', PR_TRUE, 0, PR_FALSE },
- { /* opt_SelfSign */ 'x', PR_FALSE, 0, PR_FALSE },
- { /* opt_RW */ 'X', PR_FALSE, 0, PR_FALSE },
- { /* opt_Exponent */ 'y', PR_TRUE, 0, PR_FALSE },
- { /* opt_NoiseFile */ 'z', PR_TRUE, 0, PR_FALSE },
- { /* opt_Hash */ 'Z', PR_TRUE, 0, PR_FALSE },
- { /* opt_NewPasswordFile */ '@', PR_TRUE, 0, PR_FALSE },
- { /* opt_AddAuthInfoAccExt */ 0, PR_FALSE, 0, PR_FALSE, "extAIA" },
- { /* opt_AddSubjInfoAccExt */ 0, PR_FALSE, 0, PR_FALSE, "extSIA" },
- { /* opt_AddCertPoliciesExt */ 0, PR_FALSE, 0, PR_FALSE, "extCP" },
- { /* opt_AddPolicyMapExt */ 0, PR_FALSE, 0, PR_FALSE, "extPM" },
- { /* opt_AddPolicyConstrExt */ 0, PR_FALSE, 0, PR_FALSE, "extPC" },
- { /* opt_AddInhibAnyExt */ 0, PR_FALSE, 0, PR_FALSE, "extIA" },
- { /* opt_AddNameConstraintsExt*/ 0, PR_FALSE, 0, PR_FALSE, "extNC" },
- { /* opt_AddSubjectKeyIDExt */ 0, PR_FALSE, 0, PR_FALSE,
- "extSKID" },
- { /* opt_AddCmdKeyUsageExt */ 0, PR_TRUE, 0, PR_FALSE,
- "keyUsage" },
- { /* opt_AddCmdNSCertTypeExt */ 0, PR_TRUE, 0, PR_FALSE,
- "nsCertType" },
- { /* opt_AddCmdExtKeyUsageExt*/ 0, PR_TRUE, 0, PR_FALSE,
- "extKeyUsage" },
-
- { /* opt_SourceDir */ 0, PR_TRUE, 0, PR_FALSE,
- "source-dir" },
- { /* opt_SourcePrefix */ 0, PR_TRUE, 0, PR_FALSE,
- "source-prefix" },
- { /* opt_UpgradeID */ 0, PR_TRUE, 0, PR_FALSE,
- "upgrade-id" },
- { /* opt_UpgradeTokenName */ 0, PR_TRUE, 0, PR_FALSE,
- "upgrade-token-name" },
- { /* opt_KeyOpFlagsOn */ 0, PR_TRUE, 0, PR_FALSE,
- "keyOpFlagsOn" },
- { /* opt_KeyOpFlagsOff */ 0, PR_TRUE, 0, PR_FALSE,
- "keyOpFlagsOff" },
- { /* opt_KeyAttrFlags */ 0, PR_TRUE, 0, PR_FALSE,
- "keyAttrFlags" },
- { /* opt_EmptyPassword */ 0, PR_FALSE, 0, PR_FALSE,
- "empty-password" },
- { /* opt_CertVersion */ 0, PR_TRUE, 0, PR_FALSE,
- "certVersion" },
- { /* opt_AddSubjectAltExt */ 0, PR_TRUE, 0, PR_FALSE, "extSAN" },
- { /* opt_DumpExtensionValue */ 0, PR_TRUE, 0, PR_FALSE,
- "dump-ext-val" },
- { /* opt_GenericExtensions */ 0, PR_TRUE, 0, PR_FALSE,
- "extGeneric" },
- { /* opt_NewNickname */ 0, PR_TRUE, 0, PR_FALSE,
- "new-n" },
- { /* opt_Pss */ 0, PR_FALSE, 0, PR_FALSE,
- "pss" },
- { /* opt_PssSign */ 0, PR_FALSE, 0, PR_FALSE,
- "pss-sign" },
- { /* opt_SimpleSelfSigned */ 0, PR_FALSE, 0, PR_FALSE,
- "simple-self-signed" },
- };
+static const secuCommandFlag options_init[] = {
+ { /* opt_SSOPass */ '0', PR_TRUE, 0, PR_FALSE },
+ { /* opt_AddKeyUsageExt */ '1', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AddBasicConstraintExt*/ '2', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AddAuthorityKeyIDExt*/ '3', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AddCRLDistPtsExt */ '4', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AddNSCertTypeExt */ '5', PR_FALSE, 0, PR_FALSE },
+ { /* opt_AddExtKeyUsageExt */ '6', PR_FALSE, 0, PR_FALSE },
+ { /* opt_ExtendedEmailAddrs */ '7', PR_TRUE, 0, PR_FALSE },
+ { /* opt_ExtendedDNSNames */ '8', PR_TRUE, 0, PR_FALSE },
+ { /* opt_ASCIIForIO */ 'a', PR_FALSE, 0, PR_FALSE },
+ { /* opt_ValidityTime */ 'b', PR_TRUE, 0, PR_FALSE },
+ { /* opt_IssuerName */ 'c', PR_TRUE, 0, PR_FALSE },
+ { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_VerifySig */ 'e', PR_FALSE, 0, PR_FALSE },
+ { /* opt_PasswordFile */ 'f', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeySize */ 'g', PR_TRUE, 0, PR_FALSE },
+ { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
+ { /* opt_InputFile */ 'i', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Emailaddress */ 0, PR_TRUE, 0, PR_FALSE, "email" },
+ { /* opt_KeyIndex */ 'j', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeyType */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_DetailedInfo */ 'l', PR_FALSE, 0, PR_FALSE },
+ { /* opt_SerialNumber */ 'm', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE },
+ { /* opt_OutputFile */ 'o', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PhoneNumber */ 'p', PR_TRUE, 0, PR_FALSE },
+ { /* opt_DBPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PQGFile */ 'q', PR_TRUE, 0, PR_FALSE },
+ { /* opt_BinaryDER */ 'r', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Subject */ 's', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Trust */ 't', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Usage */ 'u', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Validity */ 'v', PR_TRUE, 0, PR_FALSE },
+ { /* opt_OffsetMonths */ 'w', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SelfSign */ 'x', PR_FALSE, 0, PR_FALSE },
+ { /* opt_RW */ 'X', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Exponent */ 'y', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NoiseFile */ 'z', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Hash */ 'Z', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NewPasswordFile */ '@', PR_TRUE, 0, PR_FALSE },
+ { /* opt_AddAuthInfoAccExt */ 0, PR_FALSE, 0, PR_FALSE, "extAIA" },
+ { /* opt_AddSubjInfoAccExt */ 0, PR_FALSE, 0, PR_FALSE, "extSIA" },
+ { /* opt_AddCertPoliciesExt */ 0, PR_FALSE, 0, PR_FALSE, "extCP" },
+ { /* opt_AddPolicyMapExt */ 0, PR_FALSE, 0, PR_FALSE, "extPM" },
+ { /* opt_AddPolicyConstrExt */ 0, PR_FALSE, 0, PR_FALSE, "extPC" },
+ { /* opt_AddInhibAnyExt */ 0, PR_FALSE, 0, PR_FALSE, "extIA" },
+ { /* opt_AddNameConstraintsExt*/ 0, PR_FALSE, 0, PR_FALSE, "extNC" },
+ { /* opt_AddSubjectKeyIDExt */ 0, PR_FALSE, 0, PR_FALSE,
+ "extSKID" },
+ { /* opt_AddCmdKeyUsageExt */ 0, PR_TRUE, 0, PR_FALSE,
+ "keyUsage" },
+ { /* opt_AddCmdNSCertTypeExt */ 0, PR_TRUE, 0, PR_FALSE,
+ "nsCertType" },
+ { /* opt_AddCmdExtKeyUsageExt*/ 0, PR_TRUE, 0, PR_FALSE,
+ "extKeyUsage" },
+
+ { /* opt_SourceDir */ 0, PR_TRUE, 0, PR_FALSE,
+ "source-dir" },
+ { /* opt_SourcePrefix */ 0, PR_TRUE, 0, PR_FALSE,
+ "source-prefix" },
+ { /* opt_UpgradeID */ 0, PR_TRUE, 0, PR_FALSE,
+ "upgrade-id" },
+ { /* opt_UpgradeTokenName */ 0, PR_TRUE, 0, PR_FALSE,
+ "upgrade-token-name" },
+ { /* opt_KeyOpFlagsOn */ 0, PR_TRUE, 0, PR_FALSE,
+ "keyOpFlagsOn" },
+ { /* opt_KeyOpFlagsOff */ 0, PR_TRUE, 0, PR_FALSE,
+ "keyOpFlagsOff" },
+ { /* opt_KeyAttrFlags */ 0, PR_TRUE, 0, PR_FALSE,
+ "keyAttrFlags" },
+ { /* opt_EmptyPassword */ 0, PR_FALSE, 0, PR_FALSE,
+ "empty-password" },
+ { /* opt_CertVersion */ 0, PR_TRUE, 0, PR_FALSE,
+ "certVersion" },
+ { /* opt_AddSubjectAltExt */ 0, PR_TRUE, 0, PR_FALSE, "extSAN" },
+ { /* opt_DumpExtensionValue */ 0, PR_TRUE, 0, PR_FALSE,
+ "dump-ext-val" },
+ { /* opt_GenericExtensions */ 0, PR_TRUE, 0, PR_FALSE,
+ "extGeneric" },
+ { /* opt_NewNickname */ 0, PR_TRUE, 0, PR_FALSE,
+ "new-n" },
+ { /* opt_Pss */ 0, PR_FALSE, 0, PR_FALSE,
+ "pss" },
+ { /* opt_PssSign */ 0, PR_FALSE, 0, PR_FALSE,
+ "pss-sign" },
+ { /* opt_SimpleSelfSigned */ 0, PR_FALSE, 0, PR_FALSE,
+ "simple-self-signed" },
+};
#define NUM_OPTIONS ((sizeof options_init) / (sizeof options_init[0]))
static secuCommandFlag certutil_commands[NUM_COMMANDS];
diff --git a/cmd/certutil/keystuff.c b/cmd/certutil/keystuff.c
index 330284c61..5b8de250b 100644
--- a/cmd/certutil/keystuff.c
+++ b/cmd/certutil/keystuff.c
@@ -385,88 +385,87 @@ typedef struct curveNameTagPairStr {
SECOidTag curveOidTag;
} CurveNameTagPair;
-static CurveNameTagPair nameTagPair[] =
- {
- { "sect163k1", SEC_OID_SECG_EC_SECT163K1 },
- { "nistk163", SEC_OID_SECG_EC_SECT163K1 },
- { "sect163r1", SEC_OID_SECG_EC_SECT163R1 },
- { "sect163r2", SEC_OID_SECG_EC_SECT163R2 },
- { "nistb163", SEC_OID_SECG_EC_SECT163R2 },
- { "sect193r1", SEC_OID_SECG_EC_SECT193R1 },
- { "sect193r2", SEC_OID_SECG_EC_SECT193R2 },
- { "sect233k1", SEC_OID_SECG_EC_SECT233K1 },
- { "nistk233", SEC_OID_SECG_EC_SECT233K1 },
- { "sect233r1", SEC_OID_SECG_EC_SECT233R1 },
- { "nistb233", SEC_OID_SECG_EC_SECT233R1 },
- { "sect239k1", SEC_OID_SECG_EC_SECT239K1 },
- { "sect283k1", SEC_OID_SECG_EC_SECT283K1 },
- { "nistk283", SEC_OID_SECG_EC_SECT283K1 },
- { "sect283r1", SEC_OID_SECG_EC_SECT283R1 },
- { "nistb283", SEC_OID_SECG_EC_SECT283R1 },
- { "sect409k1", SEC_OID_SECG_EC_SECT409K1 },
- { "nistk409", SEC_OID_SECG_EC_SECT409K1 },
- { "sect409r1", SEC_OID_SECG_EC_SECT409R1 },
- { "nistb409", SEC_OID_SECG_EC_SECT409R1 },
- { "sect571k1", SEC_OID_SECG_EC_SECT571K1 },
- { "nistk571", SEC_OID_SECG_EC_SECT571K1 },
- { "sect571r1", SEC_OID_SECG_EC_SECT571R1 },
- { "nistb571", SEC_OID_SECG_EC_SECT571R1 },
- { "secp160k1", SEC_OID_SECG_EC_SECP160K1 },
- { "secp160r1", SEC_OID_SECG_EC_SECP160R1 },
- { "secp160r2", SEC_OID_SECG_EC_SECP160R2 },
- { "secp192k1", SEC_OID_SECG_EC_SECP192K1 },
- { "secp192r1", SEC_OID_SECG_EC_SECP192R1 },
- { "nistp192", SEC_OID_SECG_EC_SECP192R1 },
- { "secp224k1", SEC_OID_SECG_EC_SECP224K1 },
- { "secp224r1", SEC_OID_SECG_EC_SECP224R1 },
- { "nistp224", SEC_OID_SECG_EC_SECP224R1 },
- { "secp256k1", SEC_OID_SECG_EC_SECP256K1 },
- { "secp256r1", SEC_OID_SECG_EC_SECP256R1 },
- { "nistp256", SEC_OID_SECG_EC_SECP256R1 },
- { "secp384r1", SEC_OID_SECG_EC_SECP384R1 },
- { "nistp384", SEC_OID_SECG_EC_SECP384R1 },
- { "secp521r1", SEC_OID_SECG_EC_SECP521R1 },
- { "nistp521", SEC_OID_SECG_EC_SECP521R1 },
-
- { "prime192v1", SEC_OID_ANSIX962_EC_PRIME192V1 },
- { "prime192v2", SEC_OID_ANSIX962_EC_PRIME192V2 },
- { "prime192v3", SEC_OID_ANSIX962_EC_PRIME192V3 },
- { "prime239v1", SEC_OID_ANSIX962_EC_PRIME239V1 },
- { "prime239v2", SEC_OID_ANSIX962_EC_PRIME239V2 },
- { "prime239v3", SEC_OID_ANSIX962_EC_PRIME239V3 },
-
- { "c2pnb163v1", SEC_OID_ANSIX962_EC_C2PNB163V1 },
- { "c2pnb163v2", SEC_OID_ANSIX962_EC_C2PNB163V2 },
- { "c2pnb163v3", SEC_OID_ANSIX962_EC_C2PNB163V3 },
- { "c2pnb176v1", SEC_OID_ANSIX962_EC_C2PNB176V1 },
- { "c2tnb191v1", SEC_OID_ANSIX962_EC_C2TNB191V1 },
- { "c2tnb191v2", SEC_OID_ANSIX962_EC_C2TNB191V2 },
- { "c2tnb191v3", SEC_OID_ANSIX962_EC_C2TNB191V3 },
- { "c2onb191v4", SEC_OID_ANSIX962_EC_C2ONB191V4 },
- { "c2onb191v5", SEC_OID_ANSIX962_EC_C2ONB191V5 },
- { "c2pnb208w1", SEC_OID_ANSIX962_EC_C2PNB208W1 },
- { "c2tnb239v1", SEC_OID_ANSIX962_EC_C2TNB239V1 },
- { "c2tnb239v2", SEC_OID_ANSIX962_EC_C2TNB239V2 },
- { "c2tnb239v3", SEC_OID_ANSIX962_EC_C2TNB239V3 },
- { "c2onb239v4", SEC_OID_ANSIX962_EC_C2ONB239V4 },
- { "c2onb239v5", SEC_OID_ANSIX962_EC_C2ONB239V5 },
- { "c2pnb272w1", SEC_OID_ANSIX962_EC_C2PNB272W1 },
- { "c2pnb304w1", SEC_OID_ANSIX962_EC_C2PNB304W1 },
- { "c2tnb359v1", SEC_OID_ANSIX962_EC_C2TNB359V1 },
- { "c2pnb368w1", SEC_OID_ANSIX962_EC_C2PNB368W1 },
- { "c2tnb431r1", SEC_OID_ANSIX962_EC_C2TNB431R1 },
-
- { "secp112r1", SEC_OID_SECG_EC_SECP112R1 },
- { "secp112r2", SEC_OID_SECG_EC_SECP112R2 },
- { "secp128r1", SEC_OID_SECG_EC_SECP128R1 },
- { "secp128r2", SEC_OID_SECG_EC_SECP128R2 },
-
- { "sect113r1", SEC_OID_SECG_EC_SECT113R1 },
- { "sect113r2", SEC_OID_SECG_EC_SECT113R2 },
- { "sect131r1", SEC_OID_SECG_EC_SECT131R1 },
- { "sect131r2", SEC_OID_SECG_EC_SECT131R2 },
- { "curve25519", SEC_OID_CURVE25519 },
- };
+static CurveNameTagPair nameTagPair[] = {
+ { "sect163k1", SEC_OID_SECG_EC_SECT163K1 },
+ { "nistk163", SEC_OID_SECG_EC_SECT163K1 },
+ { "sect163r1", SEC_OID_SECG_EC_SECT163R1 },
+ { "sect163r2", SEC_OID_SECG_EC_SECT163R2 },
+ { "nistb163", SEC_OID_SECG_EC_SECT163R2 },
+ { "sect193r1", SEC_OID_SECG_EC_SECT193R1 },
+ { "sect193r2", SEC_OID_SECG_EC_SECT193R2 },
+ { "sect233k1", SEC_OID_SECG_EC_SECT233K1 },
+ { "nistk233", SEC_OID_SECG_EC_SECT233K1 },
+ { "sect233r1", SEC_OID_SECG_EC_SECT233R1 },
+ { "nistb233", SEC_OID_SECG_EC_SECT233R1 },
+ { "sect239k1", SEC_OID_SECG_EC_SECT239K1 },
+ { "sect283k1", SEC_OID_SECG_EC_SECT283K1 },
+ { "nistk283", SEC_OID_SECG_EC_SECT283K1 },
+ { "sect283r1", SEC_OID_SECG_EC_SECT283R1 },
+ { "nistb283", SEC_OID_SECG_EC_SECT283R1 },
+ { "sect409k1", SEC_OID_SECG_EC_SECT409K1 },
+ { "nistk409", SEC_OID_SECG_EC_SECT409K1 },
+ { "sect409r1", SEC_OID_SECG_EC_SECT409R1 },
+ { "nistb409", SEC_OID_SECG_EC_SECT409R1 },
+ { "sect571k1", SEC_OID_SECG_EC_SECT571K1 },
+ { "nistk571", SEC_OID_SECG_EC_SECT571K1 },
+ { "sect571r1", SEC_OID_SECG_EC_SECT571R1 },
+ { "nistb571", SEC_OID_SECG_EC_SECT571R1 },
+ { "secp160k1", SEC_OID_SECG_EC_SECP160K1 },
+ { "secp160r1", SEC_OID_SECG_EC_SECP160R1 },
+ { "secp160r2", SEC_OID_SECG_EC_SECP160R2 },
+ { "secp192k1", SEC_OID_SECG_EC_SECP192K1 },
+ { "secp192r1", SEC_OID_SECG_EC_SECP192R1 },
+ { "nistp192", SEC_OID_SECG_EC_SECP192R1 },
+ { "secp224k1", SEC_OID_SECG_EC_SECP224K1 },
+ { "secp224r1", SEC_OID_SECG_EC_SECP224R1 },
+ { "nistp224", SEC_OID_SECG_EC_SECP224R1 },
+ { "secp256k1", SEC_OID_SECG_EC_SECP256K1 },
+ { "secp256r1", SEC_OID_SECG_EC_SECP256R1 },
+ { "nistp256", SEC_OID_SECG_EC_SECP256R1 },
+ { "secp384r1", SEC_OID_SECG_EC_SECP384R1 },
+ { "nistp384", SEC_OID_SECG_EC_SECP384R1 },
+ { "secp521r1", SEC_OID_SECG_EC_SECP521R1 },
+ { "nistp521", SEC_OID_SECG_EC_SECP521R1 },
+
+ { "prime192v1", SEC_OID_ANSIX962_EC_PRIME192V1 },
+ { "prime192v2", SEC_OID_ANSIX962_EC_PRIME192V2 },
+ { "prime192v3", SEC_OID_ANSIX962_EC_PRIME192V3 },
+ { "prime239v1", SEC_OID_ANSIX962_EC_PRIME239V1 },
+ { "prime239v2", SEC_OID_ANSIX962_EC_PRIME239V2 },
+ { "prime239v3", SEC_OID_ANSIX962_EC_PRIME239V3 },
+
+ { "c2pnb163v1", SEC_OID_ANSIX962_EC_C2PNB163V1 },
+ { "c2pnb163v2", SEC_OID_ANSIX962_EC_C2PNB163V2 },
+ { "c2pnb163v3", SEC_OID_ANSIX962_EC_C2PNB163V3 },
+ { "c2pnb176v1", SEC_OID_ANSIX962_EC_C2PNB176V1 },
+ { "c2tnb191v1", SEC_OID_ANSIX962_EC_C2TNB191V1 },
+ { "c2tnb191v2", SEC_OID_ANSIX962_EC_C2TNB191V2 },
+ { "c2tnb191v3", SEC_OID_ANSIX962_EC_C2TNB191V3 },
+ { "c2onb191v4", SEC_OID_ANSIX962_EC_C2ONB191V4 },
+ { "c2onb191v5", SEC_OID_ANSIX962_EC_C2ONB191V5 },
+ { "c2pnb208w1", SEC_OID_ANSIX962_EC_C2PNB208W1 },
+ { "c2tnb239v1", SEC_OID_ANSIX962_EC_C2TNB239V1 },
+ { "c2tnb239v2", SEC_OID_ANSIX962_EC_C2TNB239V2 },
+ { "c2tnb239v3", SEC_OID_ANSIX962_EC_C2TNB239V3 },
+ { "c2onb239v4", SEC_OID_ANSIX962_EC_C2ONB239V4 },
+ { "c2onb239v5", SEC_OID_ANSIX962_EC_C2ONB239V5 },
+ { "c2pnb272w1", SEC_OID_ANSIX962_EC_C2PNB272W1 },
+ { "c2pnb304w1", SEC_OID_ANSIX962_EC_C2PNB304W1 },
+ { "c2tnb359v1", SEC_OID_ANSIX962_EC_C2TNB359V1 },
+ { "c2pnb368w1", SEC_OID_ANSIX962_EC_C2PNB368W1 },
+ { "c2tnb431r1", SEC_OID_ANSIX962_EC_C2TNB431R1 },
+
+ { "secp112r1", SEC_OID_SECG_EC_SECP112R1 },
+ { "secp112r2", SEC_OID_SECG_EC_SECP112R2 },
+ { "secp128r1", SEC_OID_SECG_EC_SECP128R1 },
+ { "secp128r2", SEC_OID_SECG_EC_SECP128R2 },
+
+ { "sect113r1", SEC_OID_SECG_EC_SECT113R1 },
+ { "sect113r2", SEC_OID_SECG_EC_SECT113R2 },
+ { "sect131r1", SEC_OID_SECG_EC_SECT131R1 },
+ { "sect131r2", SEC_OID_SECG_EC_SECT131R2 },
+ { "curve25519", SEC_OID_CURVE25519 },
+};
static SECKEYECParams *
getECParams(const char *curve)
diff --git a/cmd/crlutil/crlgen_lex.c b/cmd/crlutil/crlgen_lex.c
index fb53ec844..d5950ff91 100644
--- a/cmd/crlutil/crlgen_lex.c
+++ b/cmd/crlutil/crlgen_lex.c
@@ -1279,7 +1279,7 @@ input()
/* Reset buffer status. */
yyrestart(yyin);
- /* fall through */
+ /* fall through */
case EOB_ACT_END_OF_FILE: {
if (yywrap())
diff --git a/cmd/dbck/dbck.c b/cmd/dbck/dbck.c
index 6791a0d19..934bde004 100644
--- a/cmd/dbck/dbck.c
+++ b/cmd/dbck/dbck.c
@@ -1129,27 +1129,25 @@ enum {
opt_KeepExpired
};
-static secuCommandFlag dbck_commands[] =
- {
- { /* cmd_Debug, */ 'D', PR_FALSE, 0, PR_FALSE },
- { /* cmd_LongUsage,*/ 'H', PR_FALSE, 0, PR_FALSE },
- { /* cmd_Recover, */ 'R', PR_FALSE, 0, PR_FALSE }
- };
+static secuCommandFlag dbck_commands[] = {
+ { /* cmd_Debug, */ 'D', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_LongUsage,*/ 'H', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_Recover, */ 'R', PR_FALSE, 0, PR_FALSE }
+};
-static secuCommandFlag dbck_options[] =
- {
- { /* opt_KeepAll, */ 'a', PR_FALSE, 0, PR_FALSE },
- { /* opt_CertDir, */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_Dumpfile, */ 'f', PR_TRUE, 0, PR_FALSE },
- { /* opt_InputDB, */ 'i', PR_TRUE, 0, PR_FALSE },
- { /* opt_OutputDB, */ 'o', PR_TRUE, 0, PR_FALSE },
- { /* opt_Mailfile, */ 'm', PR_FALSE, 0, PR_FALSE },
- { /* opt_Prompt, */ 'p', PR_FALSE, 0, PR_FALSE },
- { /* opt_KeepRedundant, */ 'r', PR_FALSE, 0, PR_FALSE },
- { /* opt_KeepNoSMimeProfile,*/ 's', PR_FALSE, 0, PR_FALSE },
- { /* opt_Verbose, */ 'v', PR_FALSE, 0, PR_FALSE },
- { /* opt_KeepExpired, */ 'x', PR_FALSE, 0, PR_FALSE }
- };
+static secuCommandFlag dbck_options[] = {
+ { /* opt_KeepAll, */ 'a', PR_FALSE, 0, PR_FALSE },
+ { /* opt_CertDir, */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Dumpfile, */ 'f', PR_TRUE, 0, PR_FALSE },
+ { /* opt_InputDB, */ 'i', PR_TRUE, 0, PR_FALSE },
+ { /* opt_OutputDB, */ 'o', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Mailfile, */ 'm', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Prompt, */ 'p', PR_FALSE, 0, PR_FALSE },
+ { /* opt_KeepRedundant, */ 'r', PR_FALSE, 0, PR_FALSE },
+ { /* opt_KeepNoSMimeProfile,*/ 's', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Verbose, */ 'v', PR_FALSE, 0, PR_FALSE },
+ { /* opt_KeepExpired, */ 'x', PR_FALSE, 0, PR_FALSE }
+};
#define CERT_DB_FMT "%s/cert%s.db"
diff --git a/cmd/dbck/dbrecover.c b/cmd/dbck/dbrecover.c
index 5b7e0549d..318e4eb24 100644
--- a/cmd/dbck/dbrecover.c
+++ b/cmd/dbck/dbrecover.c
@@ -317,7 +317,7 @@ addCertToDB(certDBEntryCert *certEntry, dbRestoreInfo *info,
/* Determine if cert is S/MIME and get its email if so. */
email = IsEmailCert(oldCert);
-/*
+ /*
XXX Just create empty profiles?
if (email) {
SECItem *profile = CERT_FindSMimeProfile(oldCert);
diff --git a/cmd/fipstest/fipstest.c b/cmd/fipstest/fipstest.c
index abf7ec168..c9d1958b1 100644
--- a/cmd/fipstest/fipstest.c
+++ b/cmd/fipstest/fipstest.c
@@ -2105,87 +2105,86 @@ typedef struct curveNameTagPairStr {
#define DEFAULT_CURVE_OID_TAG SEC_OID_SECG_EC_SECP192R1
/* #define DEFAULT_CURVE_OID_TAG SEC_OID_SECG_EC_SECP160R1 */
-static CurveNameTagPair nameTagPair[] =
- {
- { "sect163k1", SEC_OID_SECG_EC_SECT163K1 },
- { "nistk163", SEC_OID_SECG_EC_SECT163K1 },
- { "sect163r1", SEC_OID_SECG_EC_SECT163R1 },
- { "sect163r2", SEC_OID_SECG_EC_SECT163R2 },
- { "nistb163", SEC_OID_SECG_EC_SECT163R2 },
- { "sect193r1", SEC_OID_SECG_EC_SECT193R1 },
- { "sect193r2", SEC_OID_SECG_EC_SECT193R2 },
- { "sect233k1", SEC_OID_SECG_EC_SECT233K1 },
- { "nistk233", SEC_OID_SECG_EC_SECT233K1 },
- { "sect233r1", SEC_OID_SECG_EC_SECT233R1 },
- { "nistb233", SEC_OID_SECG_EC_SECT233R1 },
- { "sect239k1", SEC_OID_SECG_EC_SECT239K1 },
- { "sect283k1", SEC_OID_SECG_EC_SECT283K1 },
- { "nistk283", SEC_OID_SECG_EC_SECT283K1 },
- { "sect283r1", SEC_OID_SECG_EC_SECT283R1 },
- { "nistb283", SEC_OID_SECG_EC_SECT283R1 },
- { "sect409k1", SEC_OID_SECG_EC_SECT409K1 },
- { "nistk409", SEC_OID_SECG_EC_SECT409K1 },
- { "sect409r1", SEC_OID_SECG_EC_SECT409R1 },
- { "nistb409", SEC_OID_SECG_EC_SECT409R1 },
- { "sect571k1", SEC_OID_SECG_EC_SECT571K1 },
- { "nistk571", SEC_OID_SECG_EC_SECT571K1 },
- { "sect571r1", SEC_OID_SECG_EC_SECT571R1 },
- { "nistb571", SEC_OID_SECG_EC_SECT571R1 },
- { "secp160k1", SEC_OID_SECG_EC_SECP160K1 },
- { "secp160r1", SEC_OID_SECG_EC_SECP160R1 },
- { "secp160r2", SEC_OID_SECG_EC_SECP160R2 },
- { "secp192k1", SEC_OID_SECG_EC_SECP192K1 },
- { "secp192r1", SEC_OID_SECG_EC_SECP192R1 },
- { "nistp192", SEC_OID_SECG_EC_SECP192R1 },
- { "secp224k1", SEC_OID_SECG_EC_SECP224K1 },
- { "secp224r1", SEC_OID_SECG_EC_SECP224R1 },
- { "nistp224", SEC_OID_SECG_EC_SECP224R1 },
- { "secp256k1", SEC_OID_SECG_EC_SECP256K1 },
- { "secp256r1", SEC_OID_SECG_EC_SECP256R1 },
- { "nistp256", SEC_OID_SECG_EC_SECP256R1 },
- { "secp384r1", SEC_OID_SECG_EC_SECP384R1 },
- { "nistp384", SEC_OID_SECG_EC_SECP384R1 },
- { "secp521r1", SEC_OID_SECG_EC_SECP521R1 },
- { "nistp521", SEC_OID_SECG_EC_SECP521R1 },
-
- { "prime192v1", SEC_OID_ANSIX962_EC_PRIME192V1 },
- { "prime192v2", SEC_OID_ANSIX962_EC_PRIME192V2 },
- { "prime192v3", SEC_OID_ANSIX962_EC_PRIME192V3 },
- { "prime239v1", SEC_OID_ANSIX962_EC_PRIME239V1 },
- { "prime239v2", SEC_OID_ANSIX962_EC_PRIME239V2 },
- { "prime239v3", SEC_OID_ANSIX962_EC_PRIME239V3 },
-
- { "c2pnb163v1", SEC_OID_ANSIX962_EC_C2PNB163V1 },
- { "c2pnb163v2", SEC_OID_ANSIX962_EC_C2PNB163V2 },
- { "c2pnb163v3", SEC_OID_ANSIX962_EC_C2PNB163V3 },
- { "c2pnb176v1", SEC_OID_ANSIX962_EC_C2PNB176V1 },
- { "c2tnb191v1", SEC_OID_ANSIX962_EC_C2TNB191V1 },
- { "c2tnb191v2", SEC_OID_ANSIX962_EC_C2TNB191V2 },
- { "c2tnb191v3", SEC_OID_ANSIX962_EC_C2TNB191V3 },
- { "c2onb191v4", SEC_OID_ANSIX962_EC_C2ONB191V4 },
- { "c2onb191v5", SEC_OID_ANSIX962_EC_C2ONB191V5 },
- { "c2pnb208w1", SEC_OID_ANSIX962_EC_C2PNB208W1 },
- { "c2tnb239v1", SEC_OID_ANSIX962_EC_C2TNB239V1 },
- { "c2tnb239v2", SEC_OID_ANSIX962_EC_C2TNB239V2 },
- { "c2tnb239v3", SEC_OID_ANSIX962_EC_C2TNB239V3 },
- { "c2onb239v4", SEC_OID_ANSIX962_EC_C2ONB239V4 },
- { "c2onb239v5", SEC_OID_ANSIX962_EC_C2ONB239V5 },
- { "c2pnb272w1", SEC_OID_ANSIX962_EC_C2PNB272W1 },
- { "c2pnb304w1", SEC_OID_ANSIX962_EC_C2PNB304W1 },
- { "c2tnb359v1", SEC_OID_ANSIX962_EC_C2TNB359V1 },
- { "c2pnb368w1", SEC_OID_ANSIX962_EC_C2PNB368W1 },
- { "c2tnb431r1", SEC_OID_ANSIX962_EC_C2TNB431R1 },
-
- { "secp112r1", SEC_OID_SECG_EC_SECP112R1 },
- { "secp112r2", SEC_OID_SECG_EC_SECP112R2 },
- { "secp128r1", SEC_OID_SECG_EC_SECP128R1 },
- { "secp128r2", SEC_OID_SECG_EC_SECP128R2 },
-
- { "sect113r1", SEC_OID_SECG_EC_SECT113R1 },
- { "sect113r2", SEC_OID_SECG_EC_SECT113R2 },
- { "sect131r1", SEC_OID_SECG_EC_SECT131R1 },
- { "sect131r2", SEC_OID_SECG_EC_SECT131R2 },
- };
+static CurveNameTagPair nameTagPair[] = {
+ { "sect163k1", SEC_OID_SECG_EC_SECT163K1 },
+ { "nistk163", SEC_OID_SECG_EC_SECT163K1 },
+ { "sect163r1", SEC_OID_SECG_EC_SECT163R1 },
+ { "sect163r2", SEC_OID_SECG_EC_SECT163R2 },
+ { "nistb163", SEC_OID_SECG_EC_SECT163R2 },
+ { "sect193r1", SEC_OID_SECG_EC_SECT193R1 },
+ { "sect193r2", SEC_OID_SECG_EC_SECT193R2 },
+ { "sect233k1", SEC_OID_SECG_EC_SECT233K1 },
+ { "nistk233", SEC_OID_SECG_EC_SECT233K1 },
+ { "sect233r1", SEC_OID_SECG_EC_SECT233R1 },
+ { "nistb233", SEC_OID_SECG_EC_SECT233R1 },
+ { "sect239k1", SEC_OID_SECG_EC_SECT239K1 },
+ { "sect283k1", SEC_OID_SECG_EC_SECT283K1 },
+ { "nistk283", SEC_OID_SECG_EC_SECT283K1 },
+ { "sect283r1", SEC_OID_SECG_EC_SECT283R1 },
+ { "nistb283", SEC_OID_SECG_EC_SECT283R1 },
+ { "sect409k1", SEC_OID_SECG_EC_SECT409K1 },
+ { "nistk409", SEC_OID_SECG_EC_SECT409K1 },
+ { "sect409r1", SEC_OID_SECG_EC_SECT409R1 },
+ { "nistb409", SEC_OID_SECG_EC_SECT409R1 },
+ { "sect571k1", SEC_OID_SECG_EC_SECT571K1 },
+ { "nistk571", SEC_OID_SECG_EC_SECT571K1 },
+ { "sect571r1", SEC_OID_SECG_EC_SECT571R1 },
+ { "nistb571", SEC_OID_SECG_EC_SECT571R1 },
+ { "secp160k1", SEC_OID_SECG_EC_SECP160K1 },
+ { "secp160r1", SEC_OID_SECG_EC_SECP160R1 },
+ { "secp160r2", SEC_OID_SECG_EC_SECP160R2 },
+ { "secp192k1", SEC_OID_SECG_EC_SECP192K1 },
+ { "secp192r1", SEC_OID_SECG_EC_SECP192R1 },
+ { "nistp192", SEC_OID_SECG_EC_SECP192R1 },
+ { "secp224k1", SEC_OID_SECG_EC_SECP224K1 },
+ { "secp224r1", SEC_OID_SECG_EC_SECP224R1 },
+ { "nistp224", SEC_OID_SECG_EC_SECP224R1 },
+ { "secp256k1", SEC_OID_SECG_EC_SECP256K1 },
+ { "secp256r1", SEC_OID_SECG_EC_SECP256R1 },
+ { "nistp256", SEC_OID_SECG_EC_SECP256R1 },
+ { "secp384r1", SEC_OID_SECG_EC_SECP384R1 },
+ { "nistp384", SEC_OID_SECG_EC_SECP384R1 },
+ { "secp521r1", SEC_OID_SECG_EC_SECP521R1 },
+ { "nistp521", SEC_OID_SECG_EC_SECP521R1 },
+
+ { "prime192v1", SEC_OID_ANSIX962_EC_PRIME192V1 },
+ { "prime192v2", SEC_OID_ANSIX962_EC_PRIME192V2 },
+ { "prime192v3", SEC_OID_ANSIX962_EC_PRIME192V3 },
+ { "prime239v1", SEC_OID_ANSIX962_EC_PRIME239V1 },
+ { "prime239v2", SEC_OID_ANSIX962_EC_PRIME239V2 },
+ { "prime239v3", SEC_OID_ANSIX962_EC_PRIME239V3 },
+
+ { "c2pnb163v1", SEC_OID_ANSIX962_EC_C2PNB163V1 },
+ { "c2pnb163v2", SEC_OID_ANSIX962_EC_C2PNB163V2 },
+ { "c2pnb163v3", SEC_OID_ANSIX962_EC_C2PNB163V3 },
+ { "c2pnb176v1", SEC_OID_ANSIX962_EC_C2PNB176V1 },
+ { "c2tnb191v1", SEC_OID_ANSIX962_EC_C2TNB191V1 },
+ { "c2tnb191v2", SEC_OID_ANSIX962_EC_C2TNB191V2 },
+ { "c2tnb191v3", SEC_OID_ANSIX962_EC_C2TNB191V3 },
+ { "c2onb191v4", SEC_OID_ANSIX962_EC_C2ONB191V4 },
+ { "c2onb191v5", SEC_OID_ANSIX962_EC_C2ONB191V5 },
+ { "c2pnb208w1", SEC_OID_ANSIX962_EC_C2PNB208W1 },
+ { "c2tnb239v1", SEC_OID_ANSIX962_EC_C2TNB239V1 },
+ { "c2tnb239v2", SEC_OID_ANSIX962_EC_C2TNB239V2 },
+ { "c2tnb239v3", SEC_OID_ANSIX962_EC_C2TNB239V3 },
+ { "c2onb239v4", SEC_OID_ANSIX962_EC_C2ONB239V4 },
+ { "c2onb239v5", SEC_OID_ANSIX962_EC_C2ONB239V5 },
+ { "c2pnb272w1", SEC_OID_ANSIX962_EC_C2PNB272W1 },
+ { "c2pnb304w1", SEC_OID_ANSIX962_EC_C2PNB304W1 },
+ { "c2tnb359v1", SEC_OID_ANSIX962_EC_C2TNB359V1 },
+ { "c2pnb368w1", SEC_OID_ANSIX962_EC_C2PNB368W1 },
+ { "c2tnb431r1", SEC_OID_ANSIX962_EC_C2TNB431R1 },
+
+ { "secp112r1", SEC_OID_SECG_EC_SECP112R1 },
+ { "secp112r2", SEC_OID_SECG_EC_SECP112R2 },
+ { "secp128r1", SEC_OID_SECG_EC_SECP128R1 },
+ { "secp128r2", SEC_OID_SECG_EC_SECP128R2 },
+
+ { "sect113r1", SEC_OID_SECG_EC_SECT113R1 },
+ { "sect113r2", SEC_OID_SECG_EC_SECT113R2 },
+ { "sect131r1", SEC_OID_SECG_EC_SECT131R1 },
+ { "sect131r2", SEC_OID_SECG_EC_SECT131R2 },
+};
static SECItem *
getECParams(const char *curve)
@@ -6660,12 +6659,9 @@ tls(char *reqfn)
};
CK_ULONG derive_template_count =
sizeof(derive_template) / sizeof(derive_template[0]);
- CK_ATTRIBUTE master_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE kb1_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE kb2_template =
- { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE master_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE kb1_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE kb2_template = { CKA_VALUE, NULL, 0 };
CK_MECHANISM master_mech = { CKM_TLS_MASTER_KEY_DERIVE, NULL, 0 };
CK_MECHANISM key_block_mech = { CKM_TLS_KEY_AND_MAC_DERIVE, NULL, 0 };
@@ -6990,14 +6986,10 @@ ikev1(char *reqfn)
};
CK_ULONG derive_template_count =
sizeof(derive_template) / sizeof(derive_template[0]);
- CK_ATTRIBUTE skeyid_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE skeyid_d_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE skeyid_a_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE skeyid_e_template =
- { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_d_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_a_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_e_template = { CKA_VALUE, NULL, 0 };
unsigned char skeyid_secret[HASH_LENGTH_MAX];
unsigned char skeyid_d_secret[HASH_LENGTH_MAX];
unsigned char skeyid_a_secret[HASH_LENGTH_MAX];
@@ -7384,14 +7376,10 @@ ikev1_psk(char *reqfn)
};
CK_ULONG derive_template_count =
sizeof(derive_template) / sizeof(derive_template[0]);
- CK_ATTRIBUTE skeyid_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE skeyid_d_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE skeyid_a_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE skeyid_e_template =
- { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_d_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_a_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyid_e_template = { CKA_VALUE, NULL, 0 };
unsigned char skeyid_secret[HASH_LENGTH_MAX];
unsigned char skeyid_d_secret[HASH_LENGTH_MAX];
unsigned char skeyid_a_secret[HASH_LENGTH_MAX];
@@ -7817,12 +7805,9 @@ ikev2(char *reqfn)
};
CK_ULONG derive_template_count =
sizeof(derive_template) / sizeof(derive_template[0]);
- CK_ATTRIBUTE skeyseed_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE dkm_template =
- { CKA_VALUE, NULL, 0 };
- CK_ATTRIBUTE dkm_child_template =
- { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE skeyseed_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE dkm_template = { CKA_VALUE, NULL, 0 };
+ CK_ATTRIBUTE dkm_child_template = { CKA_VALUE, NULL, 0 };
unsigned char skeyseed_secret[HASH_LENGTH_MAX];
CK_MECHANISM ike_mech = { CKM_NSS_IKE_PRF_DERIVE, NULL, 0 };
diff --git a/cmd/lib/pk11table.c b/cmd/lib/pk11table.c
index f7a45fa84..06f759139 100644
--- a/cmd/lib/pk11table.c
+++ b/cmd/lib/pk11table.c
@@ -52,11 +52,11 @@ const int constTypeCount = sizeof(_constTypeString) / sizeof(_constTypeString[0]
#define mkEntry(x, t) \
{ \
- #x, x, Const##t, ConstNone \
+#x, x, Const##t, ConstNone \
}
#define mkEntry2(x, t, t2) \
{ \
- #x, x, Const##t, Const##t2 \
+#x, x, Const##t, Const##t2 \
}
const Constant _consts[] = {
diff --git a/cmd/libpkix/pkix/certsel/test_certselector.c b/cmd/libpkix/pkix/certsel/test_certselector.c
index cbe773779..1fde3739b 100644
--- a/cmd/libpkix/pkix/certsel/test_certselector.c
+++ b/cmd/libpkix/pkix/certsel/test_certselector.c
@@ -410,7 +410,8 @@ cleanup:
PKIX_TEST_RETURN();
}
-static void testPolicyMatch(
+static void
+testPolicyMatch(
PKIX_List *certs,
PKIX_PL_Cert *NIST1Cert, /* a source for policy NIST1 */
PKIX_PL_Cert *NIST2Cert, /* a source for policy NIST2 */
@@ -860,8 +861,9 @@ cleanup:
PKIX_TEST_RETURN();
}
-static void test_customCallback2(PKIX_List *certs,
- PKIX_PL_Cert *anyPolicyCert) /* a source for policy anyPolicy */
+static void
+test_customCallback2(PKIX_List *certs,
+ PKIX_PL_Cert *anyPolicyCert) /* a source for policy anyPolicy */
{
PKIX_CertSelector *selector = NULL;
PKIX_List *anyPolicyList = NULL; /* OIDs */
@@ -1423,12 +1425,10 @@ test_CertSelector_Duplicate(PKIX_CertSelector *selector)
PKIX_TRUE,
plContext);
} else {
- if
- PKIX_EXACTLY_ONE_NULL(goodSubject, equalSubject)
- {
- pkixTestErrorMsg = "Subject Names are not equal!";
- goto cleanup;
- }
+ if PKIX_EXACTLY_ONE_NULL (goodSubject, equalSubject) {
+ pkixTestErrorMsg = "Subject Names are not equal!";
+ goto cleanup;
+ }
}
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_GetPolicy(goodParams, &goodPolicy, plContext));
@@ -1439,12 +1439,10 @@ test_CertSelector_Duplicate(PKIX_CertSelector *selector)
PKIX_TRUE,
plContext);
} else {
- if
- PKIX_EXACTLY_ONE_NULL(goodPolicy, equalPolicy)
- {
- pkixTestErrorMsg = "Policy Lists are not equal!";
- goto cleanup;
- }
+ if PKIX_EXACTLY_ONE_NULL (goodPolicy, equalPolicy) {
+ pkixTestErrorMsg = "Policy Lists are not equal!";
+ goto cleanup;
+ }
}
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_GetCertificate(goodParams, &goodCert, plContext));
@@ -1455,12 +1453,10 @@ test_CertSelector_Duplicate(PKIX_CertSelector *selector)
PKIX_TRUE,
plContext);
} else {
- if
- PKIX_EXACTLY_ONE_NULL(goodCert, equalCert)
- {
- pkixTestErrorMsg = "Cert Lists are not equal!";
- goto cleanup;
- }
+ if PKIX_EXACTLY_ONE_NULL (goodCert, equalCert) {
+ pkixTestErrorMsg = "Cert Lists are not equal!";
+ goto cleanup;
+ }
}
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_GetCertificateValid(goodParams, &goodDate, plContext));
@@ -1471,12 +1467,10 @@ test_CertSelector_Duplicate(PKIX_CertSelector *selector)
PKIX_TRUE,
plContext);
} else {
- if
- PKIX_EXACTLY_ONE_NULL(goodDate, equalDate)
- {
- pkixTestErrorMsg = "Date Lists are not equal!";
- goto cleanup;
- }
+ if PKIX_EXACTLY_ONE_NULL (goodDate, equalDate) {
+ pkixTestErrorMsg = "Date Lists are not equal!";
+ goto cleanup;
+ }
}
PKIX_TEST_EXPECT_NO_ERROR(PKIX_ComCertSelParams_GetBasicConstraints(goodParams, &goodBasicConstraints, plContext));
diff --git a/cmd/libpkix/pkix/top/test_basicchecker.c b/cmd/libpkix/pkix/top/test_basicchecker.c
index 658bf67be..e2743b343 100644
--- a/cmd/libpkix/pkix/top/test_basicchecker.c
+++ b/cmd/libpkix/pkix/top/test_basicchecker.c
@@ -218,13 +218,13 @@ test_basicchecker(int argc, char *argv[])
testNameChainingFail(dirName, goodInput, diffInput, dateAscii);
testDateFail(dirName, goodInput, diffInput);
-/*
+ /*
* XXX
* since the signature check is done last, we need to create
* certs whose name chaining passes, but their signatures fail;
* we currently don't have any such certs.
*/
-/* testSignatureFail(goodInput, diffInput, dateAscii); */
+ /* testSignatureFail(goodInput, diffInput, dateAscii); */
cleanup:
diff --git a/cmd/libpkix/pkix_pl/pki/test_generalname.c b/cmd/libpkix/pkix_pl/pki/test_generalname.c
index 9719cd99c..88181e3f2 100644
--- a/cmd/libpkix/pkix_pl/pki/test_generalname.c
+++ b/cmd/libpkix/pkix_pl/pki/test_generalname.c
@@ -106,7 +106,7 @@ test_generalname(int argc, char *argv[])
diffInput = "1.2.840.115349";
testNameType(PKIX_OID_NAME, goodInput, diffInput, goodInput);
-/*
+ /*
* We don't support creating PKIX_EDIPARTY_NAME,
* PKIX_IP_NAME, OTHER_NAME, X400_ADDRESS from strings
*/
diff --git a/cmd/libpkix/pkix_pl/system/test_bigint.c b/cmd/libpkix/pkix_pl/system/test_bigint.c
index 85b98eee3..281e37379 100644
--- a/cmd/libpkix/pkix_pl/system/test_bigint.c
+++ b/cmd/libpkix/pkix_pl/system/test_bigint.c
@@ -118,13 +118,12 @@ test_bigint(int argc, char *argv[])
PKIX_UInt32 actualMinorVersion;
PKIX_UInt32 j = 0;
- char *bigIntValue[4] =
- {
- "03",
- "ff",
- "1010101010101010101010101010101010101010",
- "1010101010101010101010101010101010101010",
- };
+ char *bigIntValue[4] = {
+ "03",
+ "ff",
+ "1010101010101010101010101010101010101010",
+ "1010101010101010101010101010101010101010",
+ };
char *badValue[3] = { "00ff", "fff", "-ff" };
diff --git a/cmd/lowhashtest/lowhashtest.c b/cmd/lowhashtest/lowhashtest.c
index 95c23f343..b4f384991 100644
--- a/cmd/lowhashtest/lowhashtest.c
+++ b/cmd/lowhashtest/lowhashtest.c
@@ -64,9 +64,8 @@ test_long_message_sha1(NSSLOWInitContext *initCtx)
/* Test vector from FIPS 180-2: appendix B.3. */
/* 34aa973c d4c4daa4 f61eeb2b dbad2731 6534016f. */
- static const PRUint8 expected[SHA256_LENGTH] =
- { 0x34, 0xaa, 0x97, 0x3c, 0xd4, 0xc4, 0xda, 0xa4, 0xf6, 0x1e, 0xeb, 0x2b,
- 0xdb, 0xad, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6f };
+ static const PRUint8 expected[SHA256_LENGTH] = { 0x34, 0xaa, 0x97, 0x3c, 0xd4, 0xc4, 0xda, 0xa4, 0xf6, 0x1e, 0xeb, 0x2b,
+ 0xdb, 0xad, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6f };
unsigned char buf[1000];
(void)PORT_Memset(buf, 'a', sizeof(buf));
return test_long_message(initCtx, HASH_AlgSHA1,
@@ -78,9 +77,8 @@ test_long_message_sha256(NSSLOWInitContext *initCtx)
{
PRUint8 results[SHA256_LENGTH];
/* cdc76e5c 9914fb92 81a1c7e2 84d73e67 f1809a48 a497200e 046d39cc c7112cd0. */
- static const PRUint8 expected[SHA256_LENGTH] =
- { 0xcd, 0xc7, 0x6e, 0x5c, 0x99, 0x14, 0xfb, 0x92, 0x81, 0xa1, 0xc7, 0xe2, 0x84, 0xd7, 0x3e, 0x67,
- 0xf1, 0x80, 0x9a, 0x48, 0xa4, 0x97, 0x20, 0x0e, 0x04, 0x6d, 0x39, 0xcc, 0xc7, 0x11, 0x2c, 0xd0 };
+ static const PRUint8 expected[SHA256_LENGTH] = { 0xcd, 0xc7, 0x6e, 0x5c, 0x99, 0x14, 0xfb, 0x92, 0x81, 0xa1, 0xc7, 0xe2, 0x84, 0xd7, 0x3e, 0x67,
+ 0xf1, 0x80, 0x9a, 0x48, 0xa4, 0x97, 0x20, 0x0e, 0x04, 0x6d, 0x39, 0xcc, 0xc7, 0x11, 0x2c, 0xd0 };
unsigned char buf[1000];
(void)PORT_Memset(buf, 'a', sizeof(buf));
return test_long_message(initCtx, HASH_AlgSHA256,
@@ -100,13 +98,12 @@ test_long_message_sha384(NSSLOWInitContext *initCtx)
07b8b3dc38ecc4eb
ae97ddd87f3d8985.
*/
- static const PRUint8 expected[SHA384_LENGTH] =
- { 0x9d, 0x0e, 0x18, 0x09, 0x71, 0x64, 0x74, 0xcb,
- 0x08, 0x6e, 0x83, 0x4e, 0x31, 0x0a, 0x4a, 0x1c,
- 0xed, 0x14, 0x9e, 0x9c, 0x00, 0xf2, 0x48, 0x52,
- 0x79, 0x72, 0xce, 0xc5, 0x70, 0x4c, 0x2a, 0x5b,
- 0x07, 0xb8, 0xb3, 0xdc, 0x38, 0xec, 0xc4, 0xeb,
- 0xae, 0x97, 0xdd, 0xd8, 0x7f, 0x3d, 0x89, 0x85 };
+ static const PRUint8 expected[SHA384_LENGTH] = { 0x9d, 0x0e, 0x18, 0x09, 0x71, 0x64, 0x74, 0xcb,
+ 0x08, 0x6e, 0x83, 0x4e, 0x31, 0x0a, 0x4a, 0x1c,
+ 0xed, 0x14, 0x9e, 0x9c, 0x00, 0xf2, 0x48, 0x52,
+ 0x79, 0x72, 0xce, 0xc5, 0x70, 0x4c, 0x2a, 0x5b,
+ 0x07, 0xb8, 0xb3, 0xdc, 0x38, 0xec, 0xc4, 0xeb,
+ 0xae, 0x97, 0xdd, 0xd8, 0x7f, 0x3d, 0x89, 0x85 };
unsigned char buf[1000];
(void)PORT_Memset(buf, 'a', sizeof(buf));
@@ -119,11 +116,10 @@ test_long_message_sha512(NSSLOWInitContext *initCtx)
{
PRUint8 results[SHA512_LENGTH];
/* Test vector from FIPS 180-2: appendix B.3. */
- static const PRUint8 expected[SHA512_LENGTH] =
- { 0xe7, 0x18, 0x48, 0x3d, 0x0c, 0xe7, 0x69, 0x64, 0x4e, 0x2e, 0x42, 0xc7, 0xbc, 0x15, 0xb4, 0x63,
- 0x8e, 0x1f, 0x98, 0xb1, 0x3b, 0x20, 0x44, 0x28, 0x56, 0x32, 0xa8, 0x03, 0xaf, 0xa9, 0x73, 0xeb,
- 0xde, 0x0f, 0xf2, 0x44, 0x87, 0x7e, 0xa6, 0x0a, 0x4c, 0xb0, 0x43, 0x2c, 0xe5, 0x77, 0xc3, 0x1b,
- 0xeb, 0x00, 0x9c, 0x5c, 0x2c, 0x49, 0xaa, 0x2e, 0x4e, 0xad, 0xb2, 0x17, 0xad, 0x8c, 0xc0, 0x9b };
+ static const PRUint8 expected[SHA512_LENGTH] = { 0xe7, 0x18, 0x48, 0x3d, 0x0c, 0xe7, 0x69, 0x64, 0x4e, 0x2e, 0x42, 0xc7, 0xbc, 0x15, 0xb4, 0x63,
+ 0x8e, 0x1f, 0x98, 0xb1, 0x3b, 0x20, 0x44, 0x28, 0x56, 0x32, 0xa8, 0x03, 0xaf, 0xa9, 0x73, 0xeb,
+ 0xde, 0x0f, 0xf2, 0x44, 0x87, 0x7e, 0xa6, 0x0a, 0x4c, 0xb0, 0x43, 0x2c, 0xe5, 0x77, 0xc3, 0x1b,
+ 0xeb, 0x00, 0x9c, 0x5c, 0x2c, 0x49, 0xaa, 0x2e, 0x4e, 0xad, 0xb2, 0x17, 0xad, 0x8c, 0xc0, 0x9b };
unsigned char buf[1000];
(void)PORT_Memset(buf, 'a', sizeof(buf));
diff --git a/cmd/makepqg/makepqg.c b/cmd/makepqg/makepqg.c
index 043a236a8..edc023e48 100644
--- a/cmd/makepqg/makepqg.c
+++ b/cmd/makepqg/makepqg.c
@@ -301,8 +301,7 @@ main(int argc, char **argv)
if (keySizeInBits > 1024 || qSizeInBits != 0) {
rv = PK11_PQG_ParamGenV2((unsigned)keySizeInBits,
- (unsigned)qSizeInBits, (unsigned)(g /
- 8),
+ (unsigned)qSizeInBits, (unsigned)(g / 8),
&pqgParams, &pqgVerify);
} else if (g) {
rv = PK11_PQG_ParamGenSeedLen((unsigned)j, (unsigned)(g / 8),
diff --git a/cmd/modutil/installparse.c b/cmd/modutil/installparse.c
index d35d048dd..1d8e6cc47 100644
--- a/cmd/modutil/installparse.c
+++ b/cmd/modutil/installparse.c
@@ -48,31 +48,76 @@ char *Pk11Install_yyerrstr = NULL;
/* clang-format on */
short yylhs[] = {
-1,
- 0, 1, 1, 2, 2, 3, 4,
+ 0,
+ 1,
+ 1,
+ 2,
+ 2,
+ 3,
+ 4
};
short yylen[] = {
2,
- 1, 2, 0, 1, 1, 4, 1,
+ 1,
+ 2,
+ 0,
+ 1,
+ 1,
+ 4,
+ 1
};
short yydefred[] = {
0,
- 0, 0, 1, 0, 4, 0, 2, 0, 0, 6,
+ 0,
+ 0,
+ 1,
+ 0,
+ 4,
+ 0,
+ 2,
+ 0,
+ 0,
+ 6
};
short yydgoto[] = {
2,
- 3, 4, 5, 6,
+ 3,
+ 4,
+ 5,
+ 6
};
short yysindex[] = {
-257,
- 0, 0, 0, -257, 0, -252, 0, -257, -251, 0,
+ 0,
+ 0,
+ 0,
+ -257,
+ 0,
+ -252,
+ 0,
+ -257,
+ -251,
+ 0
};
short yyrindex[] = {
6,
- 1, 0, 0, 3, 0, 0, 0, -250, 0, 0,
+ 1,
+ 0,
+ 0,
+ 3,
+ 0,
+ 0,
+ 0,
+ -250,
+ 0,
+ 0
};
short yygindex[] = {
0,
- -4, 0, 0, 0,
+ -4,
+ 0,
+ 0,
+ 0
};
#define YYTABLESIZE 261
short yytable[] = {
@@ -103,7 +148,7 @@ short yytable[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 7, 5, 5,
- 3,
+ 3
};
short yycheck[] = {
4,
@@ -133,7 +178,7 @@ short yycheck[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, 257, 258, 259,
- 258,
+ 258
};
/* clang-format on */
#define YYFINAL 2
@@ -149,7 +194,7 @@ char *yyname[] = {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "OPENBRACE", "CLOSEBRACE", "STRING",
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "OPENBRACE", "CLOSEBRACE", "STRING"
};
char *yyrule[] = {
"$accept : toplist",
diff --git a/cmd/modutil/lex.Pk11Install_yy.c b/cmd/modutil/lex.Pk11Install_yy.c
index 4fa3d766e..f06be851d 100644
--- a/cmd/modutil/lex.Pk11Install_yy.c
+++ b/cmd/modutil/lex.Pk11Install_yy.c
@@ -294,67 +294,60 @@ static void yy_fatal_error YY_PROTO((yyconst char msg[]));
#define YY_NUM_RULES 8
#define YY_END_OF_BUFFER 9
-static yyconst short int yy_accept[16] =
- { 0,
- 0, 0, 9, 3, 6, 5, 7, 1, 2, 3,
- 6, 0, 0, 4, 0 };
-
-static yyconst int yy_ec[256] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 2, 1, 5, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 6, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 7, 1, 8, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1 };
-
-static yyconst int yy_meta[9] =
- { 0,
- 1, 2, 3, 4, 3, 1, 5, 5 };
-
-static yyconst short int yy_base[19] =
- { 0,
- 0, 0, 19, 0, 0, 21, 12, 21, 21, 0,
- 0, 4, 6, 21, 21, 13, 11, 15 };
-
-static yyconst short int yy_def[19] =
- { 0,
- 15, 1, 15, 16, 17, 15, 18, 15, 15, 16,
- 17, 18, 15, 15, 0, 15, 15, 15 };
-
-static yyconst short int yy_nxt[30] =
- { 0,
- 4, 5, 6, 5, 7, 4, 8, 9, 14, 13,
- 12, 12, 11, 10, 11, 12, 12, 13, 15, 12,
- 3, 15, 15, 15, 15, 15, 15, 15, 15 };
-
-static yyconst short int yy_chk[30] =
- { 0,
- 1, 1, 1, 1, 1, 1, 1, 1, 12, 12,
- 13, 13, 17, 16, 17, 18, 18, 7, 3, 18,
- 15, 15, 15, 15, 15, 15, 15, 15, 15 };
+static yyconst short int yy_accept[16] = { 0,
+ 0, 0, 9, 3, 6, 5, 7, 1, 2, 3,
+ 6, 0, 0, 4, 0 };
+
+static yyconst int yy_ec[256] = { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
+ 1, 1, 4, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 2, 1, 5, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 6, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 7, 1, 8, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1 };
+
+static yyconst int yy_meta[9] = { 0,
+ 1, 2, 3, 4, 3, 1, 5, 5 };
+
+static yyconst short int yy_base[19] = { 0,
+ 0, 0, 19, 0, 0, 21, 12, 21, 21, 0,
+ 0, 4, 6, 21, 21, 13, 11, 15 };
+
+static yyconst short int yy_def[19] = { 0,
+ 15, 1, 15, 16, 17, 15, 18, 15, 15, 16,
+ 17, 18, 15, 15, 0, 15, 15, 15 };
+
+static yyconst short int yy_nxt[30] = { 0,
+ 4, 5, 6, 5, 7, 4, 8, 9, 14, 13,
+ 12, 12, 11, 10, 11, 12, 12, 13, 15, 12,
+ 3, 15, 15, 15, 15, 15, 15, 15, 15 };
+
+static yyconst short int yy_chk[30] = { 0,
+ 1, 1, 1, 1, 1, 1, 1, 1, 12, 12,
+ 13, 13, 17, 16, 17, 18, 18, 7, 3, 18,
+ 15, 15, 15, 15, 15, 15, 15, 15, 15 };
static yy_state_type yy_last_accepting_state;
static char *yy_last_accepting_cpos;
@@ -1094,7 +1087,7 @@ input()
/* Reset buffer status. */
yyrestart(yyin);
- /* fall through */
+ /* fall through */
case EOB_ACT_END_OF_FILE: {
if (yywrap())
diff --git a/cmd/multinit/multinit.c b/cmd/multinit/multinit.c
index 874263e56..b0a49b92e 100644
--- a/cmd/multinit/multinit.c
+++ b/cmd/multinit/multinit.c
@@ -37,78 +37,76 @@ enum optionNames {
opt_last
};
-static const secuCommandFlag options_init[] =
- {
- { /* opt_liborder */ 'o', PR_TRUE, "1M2zmi", PR_TRUE, "order" },
- { /* opt_mainDB */ 'd', PR_TRUE, 0, PR_FALSE, "main_db" },
- { /* opt_lib1DB */ '1', PR_TRUE, 0, PR_FALSE, "lib1_db" },
- { /* opt_lib2DB */ '2', PR_TRUE, 0, PR_FALSE, "lib2_db" },
- { /* opt_mainRO */ 'r', PR_FALSE, 0, PR_FALSE, "main_readonly" },
- { /* opt_lib1RO */ 0, PR_FALSE, 0, PR_FALSE, "lib1_readonly" },
- { /* opt_lib2RO */ 0, PR_FALSE, 0, PR_FALSE, "lib2_readonly" },
- { /* opt_mainCMD */ 'c', PR_TRUE, 0, PR_FALSE, "main_command" },
- { /* opt_lib1CMD */ 0, PR_TRUE, 0, PR_FALSE, "lib1_command" },
- { /* opt_lib2CMD */ 0, PR_TRUE, 0, PR_FALSE, "lib2_command" },
- { /* opt_mainTokNam */ 't', PR_TRUE, 0, PR_FALSE, "main_token_name" },
- { /* opt_lib1TokNam */ 0, PR_TRUE, 0, PR_FALSE, "lib1_token_name" },
- { /* opt_lib2TokNam */ 0, PR_TRUE, 0, PR_FALSE, "lib2_token_name" },
- { /* opt_oldStype */ 's', PR_FALSE, 0, PR_FALSE, "oldStype" },
- { /* opt_verbose */ 'v', PR_FALSE, 0, PR_FALSE, "verbose" },
- { /* opt_summary */ 'z', PR_FALSE, 0, PR_FALSE, "summary" },
- { /* opt_help */ 'h', PR_FALSE, 0, PR_FALSE, "help" }
- };
-
-static const commandDescript options_des[] =
- {
- { /* opt_liborder */ PR_FALSE, "initOrder",
- " Specifies the order of NSS initialization and shutdown. Order is\n"
- " given as a string where each character represents either an init or\n"
- " a shutdown of the main program or one of the 2 test libraries\n"
- " (library 1 and library 2). The valid characters are as follows:\n"
- " M Init the main program\n 1 Init library 1\n"
- " 2 Init library 2\n"
- " m Shutdown the main program\n i Shutdown library 1\n"
- " z Shutdown library 2\n" },
- { /* opt_mainDB */ PR_TRUE, "nss_db",
- " Specified the directory to open the nss database for the main\n"
- " program. Must be specified if \"M\" is given in the order string\n" },
- { /* opt_lib1DB */ PR_FALSE, "nss_db",
- " Specified the directory to open the nss database for library 1.\n"
- " Must be specified if \"1\" is given in the order string\n" },
- { /* opt_lib2DB */ PR_FALSE, "nss_db",
- " Specified the directory to open the nss database for library 2.\n"
- " Must be specified if \"2\" is given in the order string\n" },
- { /* opt_mainRO */ PR_FALSE, NULL,
- " Open the main program's database read only.\n" },
- { /* opt_lib1RO */ PR_FALSE, NULL,
- " Open library 1's database read only.\n" },
- { /* opt_lib2RO */ PR_FALSE, NULL,
- " Open library 2's database read only.\n" },
- { /* opt_mainCMD */ PR_FALSE, "nss_command",
- " Specifies the NSS command to execute in the main program.\n"
- " Valid commands are: \n"
- " key_slot, list_slots, list_certs, add_cert, none.\n"
- " Default is \"none\".\n" },
- { /* opt_lib1CMD */ PR_FALSE, "nss_command",
- " Specifies the NSS command to execute in library 1.\n" },
- { /* opt_lib2CMD */ PR_FALSE, "nss_command",
- " Specifies the NSS command to execute in library 2.\n" },
- { /* opt_mainTokNam */ PR_FALSE, "token_name",
- " Specifies the name of PKCS11 token for the main program's "
- "database.\n" },
- { /* opt_lib1TokNam */ PR_FALSE, "token_name",
- " Specifies the name of PKCS11 token for library 1's database.\n" },
- { /* opt_lib2TokNam */ PR_FALSE, "token_name",
- " Specifies the name of PKCS11 token for library 2's database.\n" },
- { /* opt_oldStype */ PR_FALSE, NULL,
- " Use NSS_Shutdown rather than NSS_ShutdownContext in the main\n"
- " program.\n" },
- { /* opt_verbose */ PR_FALSE, NULL,
- " Noisily output status to standard error\n" },
- { /* opt_summarize */ PR_FALSE, NULL,
- "report a summary of the test results\n" },
- { /* opt_help */ PR_FALSE, NULL, " give this message\n" }
- };
+static const secuCommandFlag options_init[] = {
+ { /* opt_liborder */ 'o', PR_TRUE, "1M2zmi", PR_TRUE, "order" },
+ { /* opt_mainDB */ 'd', PR_TRUE, 0, PR_FALSE, "main_db" },
+ { /* opt_lib1DB */ '1', PR_TRUE, 0, PR_FALSE, "lib1_db" },
+ { /* opt_lib2DB */ '2', PR_TRUE, 0, PR_FALSE, "lib2_db" },
+ { /* opt_mainRO */ 'r', PR_FALSE, 0, PR_FALSE, "main_readonly" },
+ { /* opt_lib1RO */ 0, PR_FALSE, 0, PR_FALSE, "lib1_readonly" },
+ { /* opt_lib2RO */ 0, PR_FALSE, 0, PR_FALSE, "lib2_readonly" },
+ { /* opt_mainCMD */ 'c', PR_TRUE, 0, PR_FALSE, "main_command" },
+ { /* opt_lib1CMD */ 0, PR_TRUE, 0, PR_FALSE, "lib1_command" },
+ { /* opt_lib2CMD */ 0, PR_TRUE, 0, PR_FALSE, "lib2_command" },
+ { /* opt_mainTokNam */ 't', PR_TRUE, 0, PR_FALSE, "main_token_name" },
+ { /* opt_lib1TokNam */ 0, PR_TRUE, 0, PR_FALSE, "lib1_token_name" },
+ { /* opt_lib2TokNam */ 0, PR_TRUE, 0, PR_FALSE, "lib2_token_name" },
+ { /* opt_oldStype */ 's', PR_FALSE, 0, PR_FALSE, "oldStype" },
+ { /* opt_verbose */ 'v', PR_FALSE, 0, PR_FALSE, "verbose" },
+ { /* opt_summary */ 'z', PR_FALSE, 0, PR_FALSE, "summary" },
+ { /* opt_help */ 'h', PR_FALSE, 0, PR_FALSE, "help" }
+};
+
+static const commandDescript options_des[] = {
+ { /* opt_liborder */ PR_FALSE, "initOrder",
+ " Specifies the order of NSS initialization and shutdown. Order is\n"
+ " given as a string where each character represents either an init or\n"
+ " a shutdown of the main program or one of the 2 test libraries\n"
+ " (library 1 and library 2). The valid characters are as follows:\n"
+ " M Init the main program\n 1 Init library 1\n"
+ " 2 Init library 2\n"
+ " m Shutdown the main program\n i Shutdown library 1\n"
+ " z Shutdown library 2\n" },
+ { /* opt_mainDB */ PR_TRUE, "nss_db",
+ " Specified the directory to open the nss database for the main\n"
+ " program. Must be specified if \"M\" is given in the order string\n" },
+ { /* opt_lib1DB */ PR_FALSE, "nss_db",
+ " Specified the directory to open the nss database for library 1.\n"
+ " Must be specified if \"1\" is given in the order string\n" },
+ { /* opt_lib2DB */ PR_FALSE, "nss_db",
+ " Specified the directory to open the nss database for library 2.\n"
+ " Must be specified if \"2\" is given in the order string\n" },
+ { /* opt_mainRO */ PR_FALSE, NULL,
+ " Open the main program's database read only.\n" },
+ { /* opt_lib1RO */ PR_FALSE, NULL,
+ " Open library 1's database read only.\n" },
+ { /* opt_lib2RO */ PR_FALSE, NULL,
+ " Open library 2's database read only.\n" },
+ { /* opt_mainCMD */ PR_FALSE, "nss_command",
+ " Specifies the NSS command to execute in the main program.\n"
+ " Valid commands are: \n"
+ " key_slot, list_slots, list_certs, add_cert, none.\n"
+ " Default is \"none\".\n" },
+ { /* opt_lib1CMD */ PR_FALSE, "nss_command",
+ " Specifies the NSS command to execute in library 1.\n" },
+ { /* opt_lib2CMD */ PR_FALSE, "nss_command",
+ " Specifies the NSS command to execute in library 2.\n" },
+ { /* opt_mainTokNam */ PR_FALSE, "token_name",
+ " Specifies the name of PKCS11 token for the main program's "
+ "database.\n" },
+ { /* opt_lib1TokNam */ PR_FALSE, "token_name",
+ " Specifies the name of PKCS11 token for library 1's database.\n" },
+ { /* opt_lib2TokNam */ PR_FALSE, "token_name",
+ " Specifies the name of PKCS11 token for library 2's database.\n" },
+ { /* opt_oldStype */ PR_FALSE, NULL,
+ " Use NSS_Shutdown rather than NSS_ShutdownContext in the main\n"
+ " program.\n" },
+ { /* opt_verbose */ PR_FALSE, NULL,
+ " Noisily output status to standard error\n" },
+ { /* opt_summarize */ PR_FALSE, NULL,
+ "report a summary of the test results\n" },
+ { /* opt_help */ PR_FALSE, NULL, " give this message\n" }
+};
/*
* output our short help (table driven). (does not exit).
diff --git a/cmd/pk11importtest/pk11importtest.c b/cmd/pk11importtest/pk11importtest.c
index e8326594a..817a0f12f 100644
--- a/cmd/pk11importtest/pk11importtest.c
+++ b/cmd/pk11importtest/pk11importtest.c
@@ -223,18 +223,17 @@ enum {
opt_NoDH
};
-static secuCommandFlag options[] =
- {
- { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeySize */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_ECCurve */ 'C', PR_TRUE, 0, PR_FALSE },
- { /* opt_PWFile */ 'f', PR_TRUE, 0, PR_FALSE },
- { /* opt_PWString */ 'p', PR_TRUE, 0, PR_FALSE },
- { /* opt_NORSA */ 'r', PR_TRUE, 0, PR_FALSE },
- { /* opt_NoDSA */ 'D', PR_TRUE, 0, PR_FALSE },
- { /* opt_NoDH */ 'h', PR_TRUE, 0, PR_FALSE },
- { /* opt_NoEC */ 'e', PR_TRUE, 0, PR_FALSE },
- };
+static secuCommandFlag options[] = {
+ { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeySize */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_ECCurve */ 'C', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PWFile */ 'f', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PWString */ 'p', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NORSA */ 'r', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NoDSA */ 'D', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NoDH */ 'h', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NoEC */ 'e', PR_TRUE, 0, PR_FALSE },
+};
int
main(int argc, char **argv)
diff --git a/cmd/pk11mode/pk11mode.c b/cmd/pk11mode/pk11mode.c
index 851d64f8f..e761d5e65 100644
--- a/cmd/pk11mode/pk11mode.c
+++ b/cmd/pk11mode/pk11mode.c
@@ -96,8 +96,7 @@ int MODE = FIPSMODE;
CK_BBOOL true = CK_TRUE;
CK_BBOOL false = CK_FALSE;
static const CK_BYTE PLAINTEXT[] = { "Firefox Rules!" };
-static const CK_BYTE PLAINTEXT_PAD[] =
- { "Firefox and thunderbird rule the world!" };
+static const CK_BYTE PLAINTEXT_PAD[] = { "Firefox and thunderbird rule the world!" };
CK_ULONG NUMTESTS = 0;
static const char *slotFlagName[] = {
diff --git a/cmd/pk12util/pk12util.c b/cmd/pk12util/pk12util.c
index a591309fd..073ee5771 100644
--- a/cmd/pk12util/pk12util.c
+++ b/cmd/pk12util/pk12util.c
@@ -455,7 +455,7 @@ p12U_ReadPKCS12File(SECItem *uniPwp, char *in_file, PK11SlotInfo *slot,
pk12uErrno = PK12UERR_DECODEVERIFY;
}
}
-/* rv has been set at this point */
+ /* rv has been set at this point */
done:
if (rv != SECSuccess) {
@@ -1009,27 +1009,26 @@ enum {
opt_Mac
};
-static secuCommandFlag pk12util_options[] =
- {
- { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
- { /* opt_Import */ 'i', PR_TRUE, 0, PR_FALSE },
- { /* opt_SlotPWFile */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_SlotPW */ 'K', PR_TRUE, 0, PR_FALSE },
- { /* opt_List */ 'l', PR_TRUE, 0, PR_FALSE },
- { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE },
- { /* opt_Export */ 'o', PR_TRUE, 0, PR_FALSE },
- { /* opt_Raw */ 'r', PR_FALSE, 0, PR_FALSE },
- { /* opt_P12FilePWFile */ 'w', PR_TRUE, 0, PR_FALSE },
- { /* opt_P12FilePW */ 'W', PR_TRUE, 0, PR_FALSE },
- { /* opt_DBPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
- { /* opt_Debug */ 'v', PR_FALSE, 0, PR_FALSE },
- { /* opt_Cipher */ 'c', PR_TRUE, 0, PR_FALSE },
- { /* opt_CertCipher */ 'C', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeyLength */ 'm', PR_TRUE, 0, PR_FALSE, "key_len" },
- { /* opt_CertKeyLength */ 0, PR_TRUE, 0, PR_FALSE, "cert_key_len" },
- { /* opt_Mac */ 'M', PR_TRUE, 0, PR_FALSE, PR_FALSE }
- };
+static secuCommandFlag pk12util_options[] = {
+ { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Import */ 'i', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SlotPWFile */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SlotPW */ 'K', PR_TRUE, 0, PR_FALSE },
+ { /* opt_List */ 'l', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Export */ 'o', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Raw */ 'r', PR_FALSE, 0, PR_FALSE },
+ { /* opt_P12FilePWFile */ 'w', PR_TRUE, 0, PR_FALSE },
+ { /* opt_P12FilePW */ 'W', PR_TRUE, 0, PR_FALSE },
+ { /* opt_DBPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Debug */ 'v', PR_FALSE, 0, PR_FALSE },
+ { /* opt_Cipher */ 'c', PR_TRUE, 0, PR_FALSE },
+ { /* opt_CertCipher */ 'C', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeyLength */ 'm', PR_TRUE, 0, PR_FALSE, "key_len" },
+ { /* opt_CertKeyLength */ 0, PR_TRUE, 0, PR_FALSE, "cert_key_len" },
+ { /* opt_Mac */ 'M', PR_TRUE, 0, PR_FALSE, PR_FALSE }
+};
int
main(int argc, char **argv)
diff --git a/cmd/pk1sign/pk1sign.c b/cmd/pk1sign/pk1sign.c
index d5524c149..a4482bde6 100644
--- a/cmd/pk1sign/pk1sign.c
+++ b/cmd/pk1sign/pk1sign.c
@@ -35,17 +35,16 @@ static secuPWData pwdata = { PW_NONE, 0 };
SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate)
-SEC_ASN1Template CERTSignatureDataTemplate[] =
- {
- { SEC_ASN1_SEQUENCE,
- 0, NULL, sizeof(CERTSignedData) },
- { SEC_ASN1_INLINE,
- offsetof(CERTSignedData, signatureAlgorithm),
- SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
- { SEC_ASN1_BIT_STRING,
- offsetof(CERTSignedData, signature) },
- { 0 }
- };
+SEC_ASN1Template CERTSignatureDataTemplate[] = {
+ { SEC_ASN1_SEQUENCE,
+ 0, NULL, sizeof(CERTSignedData) },
+ { SEC_ASN1_INLINE,
+ offsetof(CERTSignedData, signatureAlgorithm),
+ SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) },
+ { SEC_ASN1_BIT_STRING,
+ offsetof(CERTSignedData, signature) },
+ { 0 }
+};
static void
Usage(char *progName)
diff --git a/cmd/pkix-errcodes/pkix-errcodes.c b/cmd/pkix-errcodes/pkix-errcodes.c
index ceff098ac..51608e49e 100644
--- a/cmd/pkix-errcodes/pkix-errcodes.c
+++ b/cmd/pkix-errcodes/pkix-errcodes.c
@@ -17,10 +17,9 @@
#undef PKIX_ERRORENTRY
#define PKIX_ERRORENTRY(name, desc, plerr) #name
-const char *const PKIX_ErrorNames[] =
- {
+const char *const PKIX_ErrorNames[] = {
#include "pkix_errorstrings.h"
- };
+};
#undef PKIX_ERRORENTRY
diff --git a/cmd/pwdecrypt/pwdecrypt.c b/cmd/pwdecrypt/pwdecrypt.c
index 02a676e54..486486770 100644
--- a/cmd/pwdecrypt/pwdecrypt.c
+++ b/cmd/pwdecrypt/pwdecrypt.c
@@ -96,7 +96,7 @@ static unsigned char b64[256] = {
/* 60: */ 0, 1, 1, 1, 1, 1, 1, 1,
/* 68: */ 1, 1, 1, 1, 1, 1, 1, 1,
/* 70: */ 1, 1, 1, 1, 1, 1, 1, 1,
- /* 78: */ 1, 1, 1, 0, 0, 0, 0, 0,
+ /* 78: */ 1, 1, 1, 0, 0, 0, 0, 0
};
enum {
diff --git a/cmd/rsapoptst/rsapoptst.c b/cmd/rsapoptst/rsapoptst.c
index d9468e6d6..4b9618e3b 100644
--- a/cmd/rsapoptst/rsapoptst.c
+++ b/cmd/rsapoptst/rsapoptst.c
@@ -515,13 +515,12 @@ enum {
opt_Tests
};
-static secuCommandFlag populate_options[] =
- {
- { /* opt_Exponent */ 'e', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeySize */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_Repeat */ 'r', PR_TRUE, 0, PR_FALSE },
- { /* opt_Tests */ 't', PR_TRUE, 0, PR_FALSE },
- };
+static secuCommandFlag populate_options[] = {
+ { /* opt_Exponent */ 'e', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeySize */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Repeat */ 'r', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Tests */ 't', PR_TRUE, 0, PR_FALSE },
+};
int
is_delimiter(char c)
diff --git a/cmd/selfserv/selfserv.c b/cmd/selfserv/selfserv.c
index d26851d98..6df990e52 100644
--- a/cmd/selfserv/selfserv.c
+++ b/cmd/selfserv/selfserv.c
@@ -906,7 +906,7 @@ lockedVars_WaitForDone(lockedVars *lv)
}
int /* returns count */
- lockedVars_AddToCount(lockedVars *lv, int addend)
+lockedVars_AddToCount(lockedVars *lv, int addend)
{
int rv;
@@ -1986,7 +1986,7 @@ loser:
static SECStatus
configureEchWithData(PRFileDesc *model_sock)
{
-/* The input should be a Base64-encoded ECHKey struct:
+ /* The input should be a Base64-encoded ECHKey struct:
* struct {
* opaque pkcs8_ech_keypair<0..2^16-1>;
* ECHConfigs configs<0..2^16>; // draft-ietf-tls-esni-09
diff --git a/cmd/signver/signver.c b/cmd/signver/signver.c
index 4e89e9d0e..8b122bde0 100644
--- a/cmd/signver/signver.c
+++ b/cmd/signver/signver.c
@@ -90,22 +90,20 @@ enum {
opt_DebugInfo
};
-static secuCommandFlag signver_commands[] =
- {
- { /* cmd_DisplayAllPCKS7Info*/ 'A', PR_FALSE, 0, PR_FALSE },
- { /* cmd_VerifySignedObj */ 'V', PR_FALSE, 0, PR_FALSE }
- };
-
-static secuCommandFlag signver_options[] =
- {
- { /* opt_ASCII */ 'a', PR_FALSE, 0, PR_FALSE },
- { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_InputDataFile */ 'i', PR_TRUE, 0, PR_FALSE },
- { /* opt_OutputFile */ 'o', PR_TRUE, 0, PR_FALSE },
- { /* opt_InputSigFile */ 's', PR_TRUE, 0, PR_FALSE },
- { /* opt_PrintWhyFailure */ 'v', PR_FALSE, 0, PR_FALSE },
- { /* opt_DebugInfo */ 0, PR_FALSE, 0, PR_FALSE, "debug" }
- };
+static secuCommandFlag signver_commands[] = {
+ { /* cmd_DisplayAllPCKS7Info*/ 'A', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_VerifySignedObj */ 'V', PR_FALSE, 0, PR_FALSE }
+};
+
+static secuCommandFlag signver_options[] = {
+ { /* opt_ASCII */ 'a', PR_FALSE, 0, PR_FALSE },
+ { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_InputDataFile */ 'i', PR_TRUE, 0, PR_FALSE },
+ { /* opt_OutputFile */ 'o', PR_TRUE, 0, PR_FALSE },
+ { /* opt_InputSigFile */ 's', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PrintWhyFailure */ 'v', PR_FALSE, 0, PR_FALSE },
+ { /* opt_DebugInfo */ 0, PR_FALSE, 0, PR_FALSE, "debug" }
+};
int
main(int argc, char **argv)
diff --git a/cmd/ssltap/ssltap.c b/cmd/ssltap/ssltap.c
index b51bf3a36..01fa81fe1 100644
--- a/cmd/ssltap/ssltap.c
+++ b/cmd/ssltap/ssltap.c
@@ -945,7 +945,7 @@ print_sslv2(DataBufferList *s, unsigned char *recordBuf, unsigned int recordLen)
}
PR_fprintf(PR_STDOUT, "}\n");
break;
- /* end of V2 CLientHello Parsing */
+ /* end of V2 CLientHello Parsing */
case 2: /* Client Master Key */
{
@@ -1019,8 +1019,7 @@ print_sslv2(DataBufferList *s, unsigned char *recordBuf, unsigned int recordLen)
for (p =
0;
p < len; p += 2) {
- PR_fprintf(PR_STDOUT, "0x%04x ", (PRUint32)(GET_SHORT((pos +
- p))));
+ PR_fprintf(PR_STDOUT, "0x%04x ", (PRUint32)(GET_SHORT((pos + p))));
}
PR_fprintf(PR_STDOUT, " }\n"); /* End of connection id */
}
@@ -1644,8 +1643,7 @@ print_ssl3_handshake(unsigned char *recordBuf,
" data = { couldn't save file '%s' }\n",
certFileName);
} else {
- PR_Write(cfd, (hsdata +
- pos),
+ PR_Write(cfd, (hsdata + pos),
certlength);
PR_fprintf(PR_STDOUT,
" data = { saved in file '%s' }\n",
@@ -1679,8 +1677,7 @@ print_ssl3_handshake(unsigned char *recordBuf,
for (w =
0;
w < reqLength; w++) {
- PR_fprintf(PR_STDOUT, " %02x", hsdata[pos +
- 1 + w]);
+ PR_fprintf(PR_STDOUT, " %02x", hsdata[pos + 1 + w]);
}
pos += 1 + reqLength;
PR_fprintf(PR_STDOUT, " }\n");
diff --git a/cmd/strsclnt/strsclnt.c b/cmd/strsclnt/strsclnt.c
index 7bc36db3f..c09c837c3 100644
--- a/cmd/strsclnt/strsclnt.c
+++ b/cmd/strsclnt/strsclnt.c
@@ -550,7 +550,7 @@ lockedVars_WaitForDone(lockedVars *lv)
}
int /* returns count */
- lockedVars_AddToCount(lockedVars *lv, int addend)
+lockedVars_AddToCount(lockedVars *lv, int addend)
{
int rv;
diff --git a/cmd/symkeyutil/symkeyutil.c b/cmd/symkeyutil/symkeyutil.c
index 5f6355b8b..6545f389a 100644
--- a/cmd/symkeyutil/symkeyutil.c
+++ b/cmd/symkeyutil/symkeyutil.c
@@ -539,39 +539,37 @@ enum {
opt_NoiseFile
};
-static secuCommandFlag symKeyUtil_commands[] =
- {
- { /* cmd_CreateNewKey */ 'K', PR_FALSE, 0, PR_FALSE },
- { /* cmd_DeleteKey */ 'D', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ImportKey */ 'I', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ExportKey */ 'E', PR_FALSE, 0, PR_FALSE },
- { /* cmd_WrapKey */ 'W', PR_FALSE, 0, PR_FALSE },
- { /* cmd_UnwrapKey */ 'U', PR_FALSE, 0, PR_FALSE },
- { /* cmd_MoveKey */ 'M', PR_FALSE, 0, PR_FALSE },
- { /* cmd_ListKeys */ 'L', PR_FALSE, 0, PR_FALSE },
- { /* cmd_PrintHelp */ 'H', PR_FALSE, 0, PR_FALSE },
- };
-
-static secuCommandFlag symKeyUtil_options[] =
- {
- { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_PasswordFile */ 'f', PR_TRUE, 0, PR_FALSE },
- { /* opt_TargetToken */ 'g', PR_TRUE, 0, PR_FALSE },
- { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeyID */ 'i', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeyIDFile */ 'j', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeyType */ 't', PR_TRUE, 0, PR_FALSE },
- { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE },
- { /* opt_KeyFile */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_Password */ 'p', PR_TRUE, 0, PR_FALSE },
- { /* opt_dbPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
- { /* opt_RW */ 'r', PR_FALSE, 0, PR_FALSE },
- { /* opt_KeySize */ 's', PR_TRUE, 0, PR_FALSE },
- { /* opt_WrapKeyName */ 'w', PR_TRUE, 0, PR_FALSE },
- { /* opt_WrapKeyID */ 'x', PR_TRUE, 0, PR_FALSE },
- { /* opt_WrapKeyIDFile */ 'y', PR_TRUE, 0, PR_FALSE },
- { /* opt_NoiseFile */ 'z', PR_TRUE, 0, PR_FALSE },
- };
+static secuCommandFlag symKeyUtil_commands[] = {
+ { /* cmd_CreateNewKey */ 'K', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_DeleteKey */ 'D', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ImportKey */ 'I', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ExportKey */ 'E', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_WrapKey */ 'W', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_UnwrapKey */ 'U', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_MoveKey */ 'M', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_ListKeys */ 'L', PR_FALSE, 0, PR_FALSE },
+ { /* cmd_PrintHelp */ 'H', PR_FALSE, 0, PR_FALSE },
+};
+
+static secuCommandFlag symKeyUtil_options[] = {
+ { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_PasswordFile */ 'f', PR_TRUE, 0, PR_FALSE },
+ { /* opt_TargetToken */ 'g', PR_TRUE, 0, PR_FALSE },
+ { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeyID */ 'i', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeyIDFile */ 'j', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeyType */ 't', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE },
+ { /* opt_KeyFile */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Password */ 'p', PR_TRUE, 0, PR_FALSE },
+ { /* opt_dbPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
+ { /* opt_RW */ 'r', PR_FALSE, 0, PR_FALSE },
+ { /* opt_KeySize */ 's', PR_TRUE, 0, PR_FALSE },
+ { /* opt_WrapKeyName */ 'w', PR_TRUE, 0, PR_FALSE },
+ { /* opt_WrapKeyID */ 'x', PR_TRUE, 0, PR_FALSE },
+ { /* opt_WrapKeyIDFile */ 'y', PR_TRUE, 0, PR_FALSE },
+ { /* opt_NoiseFile */ 'z', PR_TRUE, 0, PR_FALSE },
+};
int
main(int argc, char **argv)
diff --git a/cmd/validation/validation.c b/cmd/validation/validation.c
index f7b32a6f8..72db89a3f 100644
--- a/cmd/validation/validation.c
+++ b/cmd/validation/validation.c
@@ -54,15 +54,14 @@ enum {
opt_Debug
};
-static secuCommandFlag validation_options[] =
- {
- { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
- { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
- { /* opt_SlotPWFile */ 'k', PR_TRUE, 0, PR_FALSE },
- { /* opt_SlotPW */ 'K', PR_TRUE, 0, PR_FALSE },
- { /* opt_DBPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
- { /* opt_Debug */ 'v', PR_FALSE, 0, PR_FALSE }
- };
+static secuCommandFlag validation_options[] = {
+ { /* opt_CertDir */ 'd', PR_TRUE, 0, PR_FALSE },
+ { /* opt_TokenName */ 'h', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SlotPWFile */ 'k', PR_TRUE, 0, PR_FALSE },
+ { /* opt_SlotPW */ 'K', PR_TRUE, 0, PR_FALSE },
+ { /* opt_DBPrefix */ 'P', PR_TRUE, 0, PR_FALSE },
+ { /* opt_Debug */ 'v', PR_FALSE, 0, PR_FALSE }
+};
void
dump_Raw(char *label, CK_ATTRIBUTE *attr)
diff --git a/cmd/vfyserv/vfyutil.c b/cmd/vfyserv/vfyutil.c
index d3d8a206e..8e62bc144 100644
--- a/cmd/vfyserv/vfyutil.c
+++ b/cmd/vfyserv/vfyutil.c
@@ -566,7 +566,7 @@ lockedVars_WaitForDone(lockedVars *lv)
}
int /* returns count */
- lockedVars_AddToCount(lockedVars *lv, int addend)
+lockedVars_AddToCount(lockedVars *lv, int addend)
{
int rv;