From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- security/nss/cmd/Makefile | 46 + security/nss/cmd/addbuiltin/Makefile | 48 + security/nss/cmd/addbuiltin/addbuiltin.c | 610 ++ security/nss/cmd/addbuiltin/addbuiltin.gyp | 24 + security/nss/cmd/addbuiltin/manifest.mn | 20 + security/nss/cmd/atob/Makefile | 48 + security/nss/cmd/atob/atob.c | 188 + security/nss/cmd/atob/atob.gyp | 30 + security/nss/cmd/atob/manifest.mn | 22 + security/nss/cmd/bltest/Makefile | 54 + security/nss/cmd/bltest/blapitest.c | 4274 ++++++++++ security/nss/cmd/bltest/bltest.gyp | 35 + security/nss/cmd/bltest/manifest.mn | 20 + security/nss/cmd/bltest/pkcs1_vectors.h | 804 ++ security/nss/cmd/bltest/tests/README | 56 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext0 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext1 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext10 | 3 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext11 | 3 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext12 | 4 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext13 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext14 | 2 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext15 | 2 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext16 | 3 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext17 | 3 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext18 | 4 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext19 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext2 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext20 | 2 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext21 | 2 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext22 | 3 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext23 | 3 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext24 | 4 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext3 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext4 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext5 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext6 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext7 | 1 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext8 | 2 + security/nss/cmd/bltest/tests/aes_cbc/ciphertext9 | 2 + security/nss/cmd/bltest/tests/aes_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv1 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv10 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv11 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv12 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv13 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv14 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv15 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv16 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv17 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv18 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv19 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv2 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv20 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv21 | 2 + security/nss/cmd/bltest/tests/aes_cbc/iv22 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv23 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv24 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv3 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv4 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv5 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv6 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/iv7 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv8 | 1 + security/nss/cmd/bltest/tests/aes_cbc/iv9 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key0 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key1 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/key10 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key11 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key12 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key13 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key14 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key15 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key16 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_cbc/key17 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key18 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key19 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key2 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/key20 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key21 | 2 + security/nss/cmd/bltest/tests/aes_cbc/key22 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key23 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key24 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key3 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_cbc/key4 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_cbc/key5 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_cbc/key6 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_cbc/key7 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_cbc/key8 | 1 + security/nss/cmd/bltest/tests/aes_cbc/key9 | 1 + security/nss/cmd/bltest/tests/aes_cbc/mktst.sh | 11 + security/nss/cmd/bltest/tests/aes_cbc/numtests | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext0 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext1 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext10 | 2 + security/nss/cmd/bltest/tests/aes_cbc/plaintext11 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext12 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext13 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext14 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext15 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext16 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext17 | 2 + security/nss/cmd/bltest/tests/aes_cbc/plaintext18 | Bin 0 -> 160 bytes security/nss/cmd/bltest/tests/aes_cbc/plaintext19 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_cbc/plaintext2 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext20 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext21 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext22 | Bin 0 -> 128 bytes security/nss/cmd/bltest/tests/aes_cbc/plaintext23 | Bin 0 -> 144 bytes security/nss/cmd/bltest/tests/aes_cbc/plaintext24 | Bin 0 -> 160 bytes security/nss/cmd/bltest/tests/aes_cbc/plaintext3 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext4 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext5 | 2 + security/nss/cmd/bltest/tests/aes_cbc/plaintext6 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext7 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext8 | 1 + security/nss/cmd/bltest/tests/aes_cbc/plaintext9 | 2 + security/nss/cmd/bltest/tests/aes_cbc/test1.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test10.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test11.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test12.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test13.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test14.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test15.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test16.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test17.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test18.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test19.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test2.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test20.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test21.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test22.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test23.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test24.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test3.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test4.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test5.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test6.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test7.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test8.txt | 5 + security/nss/cmd/bltest/tests/aes_cbc/test9.txt | 5 + .../nss/cmd/bltest/tests/aes_ctr/aes_ctr_0.txt | 28 + .../nss/cmd/bltest/tests/aes_ctr/aes_ctr_1.txt | 28 + .../nss/cmd/bltest/tests/aes_ctr/aes_ctr_2.txt | 28 + .../bltest/tests/aes_ctr/aes_ctr_tests_source.txt | 199 + security/nss/cmd/bltest/tests/aes_ctr/ciphertext0 | 2 + security/nss/cmd/bltest/tests/aes_ctr/ciphertext1 | 2 + security/nss/cmd/bltest/tests/aes_ctr/ciphertext2 | 2 + security/nss/cmd/bltest/tests/aes_ctr/iv0 | 1 + security/nss/cmd/bltest/tests/aes_ctr/iv1 | 1 + security/nss/cmd/bltest/tests/aes_ctr/iv2 | 1 + security/nss/cmd/bltest/tests/aes_ctr/key0 | 1 + security/nss/cmd/bltest/tests/aes_ctr/key1 | 1 + security/nss/cmd/bltest/tests/aes_ctr/key2 | 1 + security/nss/cmd/bltest/tests/aes_ctr/mktst.sh | 9 + security/nss/cmd/bltest/tests/aes_ctr/numtests | 1 + security/nss/cmd/bltest/tests/aes_ctr/plaintext0 | 2 + security/nss/cmd/bltest/tests/aes_ctr/plaintext1 | 2 + security/nss/cmd/bltest/tests/aes_ctr/plaintext2 | 2 + .../tests/aes_cts/aes-cts-type-1-vectors.txt | 47 + .../nss/cmd/bltest/tests/aes_cts/aes_cts_0.txt | 6 + .../nss/cmd/bltest/tests/aes_cts/aes_cts_1.txt | 6 + .../nss/cmd/bltest/tests/aes_cts/aes_cts_2.txt | 6 + .../nss/cmd/bltest/tests/aes_cts/aes_cts_3.txt | 6 + .../nss/cmd/bltest/tests/aes_cts/aes_cts_4.txt | 6 + .../nss/cmd/bltest/tests/aes_cts/aes_cts_5.txt | 6 + security/nss/cmd/bltest/tests/aes_cts/ciphertext0 | 1 + security/nss/cmd/bltest/tests/aes_cts/ciphertext1 | 1 + security/nss/cmd/bltest/tests/aes_cts/ciphertext2 | 1 + security/nss/cmd/bltest/tests/aes_cts/ciphertext3 | 1 + security/nss/cmd/bltest/tests/aes_cts/ciphertext4 | 1 + security/nss/cmd/bltest/tests/aes_cts/ciphertext5 | 2 + security/nss/cmd/bltest/tests/aes_cts/iv0 | Bin 0 -> 34 bytes security/nss/cmd/bltest/tests/aes_cts/iv1 | Bin 0 -> 34 bytes security/nss/cmd/bltest/tests/aes_cts/iv2 | Bin 0 -> 34 bytes security/nss/cmd/bltest/tests/aes_cts/iv3 | Bin 0 -> 34 bytes security/nss/cmd/bltest/tests/aes_cts/iv4 | Bin 0 -> 34 bytes security/nss/cmd/bltest/tests/aes_cts/iv5 | Bin 0 -> 34 bytes security/nss/cmd/bltest/tests/aes_cts/key0 | 1 + security/nss/cmd/bltest/tests/aes_cts/key1 | 1 + security/nss/cmd/bltest/tests/aes_cts/key2 | 1 + security/nss/cmd/bltest/tests/aes_cts/key3 | 1 + security/nss/cmd/bltest/tests/aes_cts/key4 | 1 + security/nss/cmd/bltest/tests/aes_cts/key5 | 1 + security/nss/cmd/bltest/tests/aes_cts/mktst.sh | 9 + security/nss/cmd/bltest/tests/aes_cts/numtests | 1 + security/nss/cmd/bltest/tests/aes_cts/plaintext0 | 1 + security/nss/cmd/bltest/tests/aes_cts/plaintext1 | 1 + security/nss/cmd/bltest/tests/aes_cts/plaintext2 | 1 + security/nss/cmd/bltest/tests/aes_cts/plaintext3 | 1 + security/nss/cmd/bltest/tests/aes_cts/plaintext4 | 1 + security/nss/cmd/bltest/tests/aes_cts/plaintext5 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext0 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext1 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext2 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext3 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext4 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext5 | 1 + security/nss/cmd/bltest/tests/aes_ecb/ciphertext6 | 1 + security/nss/cmd/bltest/tests/aes_ecb/key0 | 1 + security/nss/cmd/bltest/tests/aes_ecb/key1 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_ecb/key2 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_ecb/key3 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_ecb/key4 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_ecb/key5 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_ecb/key6 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_ecb/mktst.sh | 10 + security/nss/cmd/bltest/tests/aes_ecb/numtests | 1 + security/nss/cmd/bltest/tests/aes_ecb/plaintext0 | 1 + security/nss/cmd/bltest/tests/aes_ecb/plaintext1 | 1 + security/nss/cmd/bltest/tests/aes_ecb/plaintext2 | 1 + security/nss/cmd/bltest/tests/aes_ecb/plaintext3 | 1 + security/nss/cmd/bltest/tests/aes_ecb/plaintext4 | 1 + security/nss/cmd/bltest/tests/aes_ecb/plaintext5 | 2 + security/nss/cmd/bltest/tests/aes_ecb/plaintext6 | 1 + security/nss/cmd/bltest/tests/aes_ecb/test1.txt | 4 + security/nss/cmd/bltest/tests/aes_ecb/test2.txt | 4 + security/nss/cmd/bltest/tests/aes_ecb/test3.txt | 4 + security/nss/cmd/bltest/tests/aes_ecb/test4.txt | 4 + security/nss/cmd/bltest/tests/aes_ecb/test5.txt | 4 + security/nss/cmd/bltest/tests/aes_ecb/test6.txt | 4 + security/nss/cmd/bltest/tests/aes_gcm/aad0 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad1 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad10 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad11 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad12 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad13 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad14 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad15 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad16 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad17 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad2 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad3 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad4 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad5 | 1 + security/nss/cmd/bltest/tests/aes_gcm/aad6 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad7 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad8 | 0 security/nss/cmd/bltest/tests/aes_gcm/aad9 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext0 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext1 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext10 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext11 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext12 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext13 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext14 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext15 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext16 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext17 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext2 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext3 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext4 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext5 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext6 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext7 | 1 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext8 | 2 + security/nss/cmd/bltest/tests/aes_gcm/ciphertext9 | 2 + security/nss/cmd/bltest/tests/aes_gcm/hex.c | 78 + security/nss/cmd/bltest/tests/aes_gcm/iv0 | Bin 0 -> 12 bytes security/nss/cmd/bltest/tests/aes_gcm/iv1 | Bin 0 -> 12 bytes security/nss/cmd/bltest/tests/aes_gcm/iv10 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv11 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv12 | Bin 0 -> 12 bytes security/nss/cmd/bltest/tests/aes_gcm/iv13 | Bin 0 -> 12 bytes security/nss/cmd/bltest/tests/aes_gcm/iv14 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv15 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv16 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv17 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv2 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv3 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv4 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv5 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv6 | Bin 0 -> 12 bytes security/nss/cmd/bltest/tests/aes_gcm/iv7 | Bin 0 -> 12 bytes security/nss/cmd/bltest/tests/aes_gcm/iv8 | 1 + security/nss/cmd/bltest/tests/aes_gcm/iv9 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key0 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_gcm/key1 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_gcm/key10 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key11 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key12 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_gcm/key13 | Bin 0 -> 32 bytes security/nss/cmd/bltest/tests/aes_gcm/key14 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key15 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key16 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key17 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key2 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key3 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key4 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key5 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key6 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_gcm/key7 | Bin 0 -> 24 bytes security/nss/cmd/bltest/tests/aes_gcm/key8 | 1 + security/nss/cmd/bltest/tests/aes_gcm/key9 | 1 + security/nss/cmd/bltest/tests/aes_gcm/mktst.sh | 13 + security/nss/cmd/bltest/tests/aes_gcm/numtests | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext0 | 0 security/nss/cmd/bltest/tests/aes_gcm/plaintext1 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_gcm/plaintext10 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext11 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext12 | 0 security/nss/cmd/bltest/tests/aes_gcm/plaintext13 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_gcm/plaintext14 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext15 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext16 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext17 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext2 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext3 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext4 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext5 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext6 | 0 security/nss/cmd/bltest/tests/aes_gcm/plaintext7 | Bin 0 -> 16 bytes security/nss/cmd/bltest/tests/aes_gcm/plaintext8 | 1 + security/nss/cmd/bltest/tests/aes_gcm/plaintext9 | 1 + security/nss/cmd/bltest/tests/aes_gcm/test0.txt | 11 + security/nss/cmd/bltest/tests/aes_gcm/test1.txt | 14 + security/nss/cmd/bltest/tests/aes_gcm/test10.txt | 28 + security/nss/cmd/bltest/tests/aes_gcm/test11.txt | 31 + security/nss/cmd/bltest/tests/aes_gcm/test12.txt | 11 + security/nss/cmd/bltest/tests/aes_gcm/test13.txt | 14 + security/nss/cmd/bltest/tests/aes_gcm/test14.txt | 23 + security/nss/cmd/bltest/tests/aes_gcm/test15.txt | 26 + security/nss/cmd/bltest/tests/aes_gcm/test16.txt | 28 + security/nss/cmd/bltest/tests/aes_gcm/test17.txt | 31 + security/nss/cmd/bltest/tests/aes_gcm/test2.txt | 23 + security/nss/cmd/bltest/tests/aes_gcm/test3.txt | 26 + security/nss/cmd/bltest/tests/aes_gcm/test4.txt | 28 + security/nss/cmd/bltest/tests/aes_gcm/test5.txt | 31 + security/nss/cmd/bltest/tests/aes_gcm/test6.txt | 11 + security/nss/cmd/bltest/tests/aes_gcm/test7.txt | 14 + security/nss/cmd/bltest/tests/aes_gcm/test8.txt | 23 + security/nss/cmd/bltest/tests/aes_gcm/test9.txt | 26 + .../nss/cmd/bltest/tests/aes_gcm/test_source.txt | 439 + .../nss/cmd/bltest/tests/camellia_cbc/ciphertext0 | 1 + .../nss/cmd/bltest/tests/camellia_cbc/ciphertext1 | 1 + .../nss/cmd/bltest/tests/camellia_cbc/ciphertext2 | 1 + security/nss/cmd/bltest/tests/camellia_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/camellia_cbc/key0 | 1 + security/nss/cmd/bltest/tests/camellia_cbc/key1 | 1 + security/nss/cmd/bltest/tests/camellia_cbc/key2 | 1 + .../nss/cmd/bltest/tests/camellia_cbc/numtests | 1 + .../nss/cmd/bltest/tests/camellia_cbc/plaintext0 | 1 + .../nss/cmd/bltest/tests/camellia_ecb/ciphertext0 | 1 + .../nss/cmd/bltest/tests/camellia_ecb/ciphertext1 | 1 + .../nss/cmd/bltest/tests/camellia_ecb/ciphertext2 | 1 + security/nss/cmd/bltest/tests/camellia_ecb/key0 | 1 + security/nss/cmd/bltest/tests/camellia_ecb/key1 | 1 + security/nss/cmd/bltest/tests/camellia_ecb/key2 | 1 + .../nss/cmd/bltest/tests/camellia_ecb/numtests | 1 + .../nss/cmd/bltest/tests/camellia_ecb/plaintext0 | 1 + .../nss/cmd/bltest/tests/chacha20_poly1305/aad0 | 1 + .../nss/cmd/bltest/tests/chacha20_poly1305/aad1 | Bin 0 -> 12 bytes .../cmd/bltest/tests/chacha20_poly1305/ciphertext0 | 1 + .../cmd/bltest/tests/chacha20_poly1305/ciphertext1 | 1 + .../nss/cmd/bltest/tests/chacha20_poly1305/iv0 | Bin 0 -> 12 bytes .../nss/cmd/bltest/tests/chacha20_poly1305/iv1 | Bin 0 -> 12 bytes .../nss/cmd/bltest/tests/chacha20_poly1305/key0 | 1 + .../nss/cmd/bltest/tests/chacha20_poly1305/key1 | 1 + .../cmd/bltest/tests/chacha20_poly1305/numtests | 1 + .../cmd/bltest/tests/chacha20_poly1305/plaintext0 | 1 + .../cmd/bltest/tests/chacha20_poly1305/plaintext1 | 1 + security/nss/cmd/bltest/tests/des3_cbc/ciphertext0 | 1 + security/nss/cmd/bltest/tests/des3_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/des3_cbc/key0 | 1 + security/nss/cmd/bltest/tests/des3_cbc/numtests | 1 + security/nss/cmd/bltest/tests/des3_cbc/plaintext0 | 1 + security/nss/cmd/bltest/tests/des3_ecb/ciphertext0 | 1 + security/nss/cmd/bltest/tests/des3_ecb/key0 | 1 + security/nss/cmd/bltest/tests/des3_ecb/numtests | 1 + security/nss/cmd/bltest/tests/des3_ecb/plaintext0 | 1 + security/nss/cmd/bltest/tests/des_cbc/ciphertext0 | 1 + security/nss/cmd/bltest/tests/des_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/des_cbc/key0 | 1 + security/nss/cmd/bltest/tests/des_cbc/numtests | 1 + security/nss/cmd/bltest/tests/des_cbc/plaintext0 | 1 + security/nss/cmd/bltest/tests/des_ecb/ciphertext0 | 1 + security/nss/cmd/bltest/tests/des_ecb/key0 | 1 + security/nss/cmd/bltest/tests/des_ecb/numtests | 1 + security/nss/cmd/bltest/tests/des_ecb/plaintext0 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext0 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext1 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext10 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext11 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext12 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext13 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext14 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext15 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext16 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext17 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext18 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext19 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext2 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext20 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext3 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext4 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext5 | 1 + security/nss/cmd/bltest/tests/dsa/ciphertext6 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext7 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext8 | 2 + security/nss/cmd/bltest/tests/dsa/ciphertext9 | 2 + security/nss/cmd/bltest/tests/dsa/dsa_fips.txt | 248 + security/nss/cmd/bltest/tests/dsa/key0 | 6 + security/nss/cmd/bltest/tests/dsa/key1 | 10 + security/nss/cmd/bltest/tests/dsa/key10 | 18 + security/nss/cmd/bltest/tests/dsa/key11 | 18 + security/nss/cmd/bltest/tests/dsa/key12 | 18 + security/nss/cmd/bltest/tests/dsa/key13 | 18 + security/nss/cmd/bltest/tests/dsa/key14 | 18 + security/nss/cmd/bltest/tests/dsa/key15 | 18 + security/nss/cmd/bltest/tests/dsa/key16 | 26 + security/nss/cmd/bltest/tests/dsa/key17 | 26 + security/nss/cmd/bltest/tests/dsa/key18 | 26 + security/nss/cmd/bltest/tests/dsa/key19 | 26 + security/nss/cmd/bltest/tests/dsa/key2 | 10 + security/nss/cmd/bltest/tests/dsa/key20 | 26 + security/nss/cmd/bltest/tests/dsa/key3 | 10 + security/nss/cmd/bltest/tests/dsa/key4 | 10 + security/nss/cmd/bltest/tests/dsa/key5 | 10 + security/nss/cmd/bltest/tests/dsa/key6 | 18 + security/nss/cmd/bltest/tests/dsa/key7 | 18 + security/nss/cmd/bltest/tests/dsa/key8 | 18 + security/nss/cmd/bltest/tests/dsa/key9 | 18 + security/nss/cmd/bltest/tests/dsa/keyseed0 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed1 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed10 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed11 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed12 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed13 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed14 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed15 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed16 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed17 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed18 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed19 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed2 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed20 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed3 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed4 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed5 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed6 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed7 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed8 | 1 + security/nss/cmd/bltest/tests/dsa/keyseed9 | 1 + security/nss/cmd/bltest/tests/dsa/numtests | 1 + security/nss/cmd/bltest/tests/dsa/plaintext0 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext1 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext10 | 2 + security/nss/cmd/bltest/tests/dsa/plaintext11 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext12 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext13 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext14 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext15 | 2 + security/nss/cmd/bltest/tests/dsa/plaintext16 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext17 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext18 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext19 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext2 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext20 | 2 + security/nss/cmd/bltest/tests/dsa/plaintext3 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext4 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext5 | 2 + security/nss/cmd/bltest/tests/dsa/plaintext6 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext7 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext8 | 1 + security/nss/cmd/bltest/tests/dsa/plaintext9 | 1 + security/nss/cmd/bltest/tests/dsa/pqg0 | 4 + security/nss/cmd/bltest/tests/dsa/pqg1 | 6 + security/nss/cmd/bltest/tests/dsa/pqg10 | 12 + security/nss/cmd/bltest/tests/dsa/pqg11 | 12 + security/nss/cmd/bltest/tests/dsa/pqg12 | 12 + security/nss/cmd/bltest/tests/dsa/pqg13 | 12 + security/nss/cmd/bltest/tests/dsa/pqg14 | 12 + security/nss/cmd/bltest/tests/dsa/pqg15 | 12 + security/nss/cmd/bltest/tests/dsa/pqg16 | 17 + security/nss/cmd/bltest/tests/dsa/pqg17 | 17 + security/nss/cmd/bltest/tests/dsa/pqg18 | 17 + security/nss/cmd/bltest/tests/dsa/pqg19 | 17 + security/nss/cmd/bltest/tests/dsa/pqg2 | 6 + security/nss/cmd/bltest/tests/dsa/pqg20 | 17 + security/nss/cmd/bltest/tests/dsa/pqg3 | 6 + security/nss/cmd/bltest/tests/dsa/pqg4 | 6 + security/nss/cmd/bltest/tests/dsa/pqg5 | 6 + security/nss/cmd/bltest/tests/dsa/pqg6 | 12 + security/nss/cmd/bltest/tests/dsa/pqg7 | 12 + security/nss/cmd/bltest/tests/dsa/pqg8 | 12 + security/nss/cmd/bltest/tests/dsa/pqg9 | 12 + security/nss/cmd/bltest/tests/dsa/sigseed0 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed1 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed10 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed11 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed12 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed13 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed14 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed15 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed16 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed17 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed18 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed19 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed2 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed20 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed3 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed4 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed5 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed6 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed7 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed8 | 1 + security/nss/cmd/bltest/tests/dsa/sigseed9 | 1 + security/nss/cmd/bltest/tests/ecdsa/README | 5 + security/nss/cmd/bltest/tests/ecdsa/ciphertext0 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext1 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext10 | 2 + security/nss/cmd/bltest/tests/ecdsa/ciphertext11 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext12 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext13 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext14 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext15 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext16 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext17 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext18 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext19 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext2 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext20 | 3 + security/nss/cmd/bltest/tests/ecdsa/ciphertext3 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext4 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext5 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext6 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext7 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext8 | 1 + security/nss/cmd/bltest/tests/ecdsa/ciphertext9 | 1 + security/nss/cmd/bltest/tests/ecdsa/key0 | 3 + security/nss/cmd/bltest/tests/ecdsa/key1 | 1 + security/nss/cmd/bltest/tests/ecdsa/key10 | 3 + security/nss/cmd/bltest/tests/ecdsa/key11 | 3 + security/nss/cmd/bltest/tests/ecdsa/key12 | 3 + security/nss/cmd/bltest/tests/ecdsa/key13 | 3 + security/nss/cmd/bltest/tests/ecdsa/key14 | 5 + security/nss/cmd/bltest/tests/ecdsa/key15 | 4 + security/nss/cmd/bltest/tests/ecdsa/key16 | 4 + security/nss/cmd/bltest/tests/ecdsa/key17 | 4 + security/nss/cmd/bltest/tests/ecdsa/key18 | 4 + security/nss/cmd/bltest/tests/ecdsa/key19 | 4 + security/nss/cmd/bltest/tests/ecdsa/key2 | 1 + security/nss/cmd/bltest/tests/ecdsa/key20 | 4 + security/nss/cmd/bltest/tests/ecdsa/key3 | 1 + security/nss/cmd/bltest/tests/ecdsa/key4 | 1 + security/nss/cmd/bltest/tests/ecdsa/key5 | 1 + security/nss/cmd/bltest/tests/ecdsa/key6 | 1 + security/nss/cmd/bltest/tests/ecdsa/key7 | 3 + security/nss/cmd/bltest/tests/ecdsa/key8 | 3 + security/nss/cmd/bltest/tests/ecdsa/key9 | 3 + security/nss/cmd/bltest/tests/ecdsa/numtests | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext0 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext1 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext10 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext11 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext12 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext13 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext14 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext15 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext16 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext17 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext18 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext19 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext2 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext20 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext3 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext4 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext5 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext6 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext7 | 1 + security/nss/cmd/bltest/tests/ecdsa/plaintext8 | 2 + security/nss/cmd/bltest/tests/ecdsa/plaintext9 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed0 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed1 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed10 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed11 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed12 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed13 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed14 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed15 | 2 + security/nss/cmd/bltest/tests/ecdsa/sigseed16 | 2 + security/nss/cmd/bltest/tests/ecdsa/sigseed17 | 2 + security/nss/cmd/bltest/tests/ecdsa/sigseed18 | 2 + security/nss/cmd/bltest/tests/ecdsa/sigseed19 | 2 + security/nss/cmd/bltest/tests/ecdsa/sigseed2 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed20 | 2 + security/nss/cmd/bltest/tests/ecdsa/sigseed3 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed4 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed5 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed6 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed7 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed8 | 1 + security/nss/cmd/bltest/tests/ecdsa/sigseed9 | 1 + security/nss/cmd/bltest/tests/md2/ciphertext0 | 1 + security/nss/cmd/bltest/tests/md2/numtests | 1 + security/nss/cmd/bltest/tests/md2/plaintext0 | 1 + security/nss/cmd/bltest/tests/md5/ciphertext0 | 1 + security/nss/cmd/bltest/tests/md5/numtests | 1 + security/nss/cmd/bltest/tests/md5/plaintext0 | 1 + security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0 | 1 + security/nss/cmd/bltest/tests/rc2_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/rc2_cbc/key0 | 1 + security/nss/cmd/bltest/tests/rc2_cbc/numtests | 1 + security/nss/cmd/bltest/tests/rc2_cbc/plaintext0 | 1 + security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0 | 1 + security/nss/cmd/bltest/tests/rc2_ecb/key0 | 1 + security/nss/cmd/bltest/tests/rc2_ecb/numtests | 1 + security/nss/cmd/bltest/tests/rc2_ecb/plaintext0 | 1 + security/nss/cmd/bltest/tests/rc4/ciphertext0 | 1 + security/nss/cmd/bltest/tests/rc4/ciphertext1 | 1 + security/nss/cmd/bltest/tests/rc4/key0 | 1 + security/nss/cmd/bltest/tests/rc4/key1 | 1 + security/nss/cmd/bltest/tests/rc4/numtests | 1 + security/nss/cmd/bltest/tests/rc4/plaintext0 | 1 + security/nss/cmd/bltest/tests/rc4/plaintext1 | 1 + security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0 | 1 + security/nss/cmd/bltest/tests/rc5_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/rc5_cbc/key0 | 1 + security/nss/cmd/bltest/tests/rc5_cbc/numtests | 1 + security/nss/cmd/bltest/tests/rc5_cbc/params0 | 2 + security/nss/cmd/bltest/tests/rc5_cbc/plaintext0 | 1 + security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0 | 1 + security/nss/cmd/bltest/tests/rc5_ecb/key0 | 1 + security/nss/cmd/bltest/tests/rc5_ecb/numtests | 1 + security/nss/cmd/bltest/tests/rc5_ecb/params0 | 2 + security/nss/cmd/bltest/tests/rc5_ecb/plaintext0 | 1 + security/nss/cmd/bltest/tests/rsa/ciphertext0 | 1 + security/nss/cmd/bltest/tests/rsa/key0 | 4 + security/nss/cmd/bltest/tests/rsa/numtests | 1 + security/nss/cmd/bltest/tests/rsa/plaintext0 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext0 | 3 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext1 | 3 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext10 | 4 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext11 | 4 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext12 | 5 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext13 | 5 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext14 | 5 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext15 | 5 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext16 | 5 + .../nss/cmd/bltest/tests/rsa_oaep/ciphertext17 | 5 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext2 | 3 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext3 | 3 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext4 | 3 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext5 | 3 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext6 | 4 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext7 | 4 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext8 | 4 + security/nss/cmd/bltest/tests/rsa_oaep/ciphertext9 | 4 + security/nss/cmd/bltest/tests/rsa_oaep/hash0 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash1 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash10 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash11 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash12 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash13 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash14 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash15 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash16 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash17 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash2 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash3 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash4 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash5 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash6 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash7 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash8 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/hash9 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key0 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key1 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key10 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key11 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key12 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key13 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key14 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key15 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key16 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key17 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key2 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key3 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key4 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key5 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key6 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key7 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key8 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/key9 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash0 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash1 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash10 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash11 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash12 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash13 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash14 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash15 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash16 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash17 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash2 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash3 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash4 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash5 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash6 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash7 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash8 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/maskhash9 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/numtests | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext0 | Bin 0 -> 28 bytes security/nss/cmd/bltest/tests/rsa_oaep/plaintext1 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext10 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext11 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext12 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext13 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext14 | 2 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext15 | Bin 0 -> 36 bytes security/nss/cmd/bltest/tests/rsa_oaep/plaintext16 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext17 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext2 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext3 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext4 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext5 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext6 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext7 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext8 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/plaintext9 | 3 + security/nss/cmd/bltest/tests/rsa_oaep/seed0 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed1 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed10 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed11 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed12 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed13 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed14 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed15 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed16 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed17 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed2 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed3 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed4 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed5 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed6 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed7 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed8 | 1 + security/nss/cmd/bltest/tests/rsa_oaep/seed9 | 1 + security/nss/cmd/bltest/tests/rsa_pss/README | 1 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext0 | 3 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext1 | 3 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext10 | 4 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext11 | 4 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext12 | 5 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext13 | 5 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext14 | 5 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext15 | 5 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext16 | 5 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext17 | 5 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext18 | 1 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext19 | 1 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext2 | 3 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext20 | 1 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext21 | 1 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext3 | 3 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext4 | 3 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext5 | 3 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext6 | 4 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext7 | 4 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext8 | 4 + security/nss/cmd/bltest/tests/rsa_pss/ciphertext9 | 4 + security/nss/cmd/bltest/tests/rsa_pss/hash0 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash1 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash10 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash11 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash12 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash13 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash14 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash15 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash16 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash17 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash18 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash19 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash2 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash20 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash21 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash3 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash4 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash5 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash6 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash7 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash8 | 1 + security/nss/cmd/bltest/tests/rsa_pss/hash9 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key0 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key1 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key10 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key11 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key12 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key13 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key14 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key15 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key16 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key17 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key18 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key19 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key2 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key20 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key21 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key3 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key4 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key5 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key6 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key7 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key8 | 1 + security/nss/cmd/bltest/tests/rsa_pss/key9 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash0 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash1 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash10 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash11 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash12 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash13 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash14 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash15 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash16 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash17 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash18 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash19 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash2 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash20 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash21 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash3 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash4 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash5 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash6 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash7 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash8 | 1 + security/nss/cmd/bltest/tests/rsa_pss/maskhash9 | 1 + security/nss/cmd/bltest/tests/rsa_pss/numtests | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext0 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext1 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext10 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext11 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext12 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext13 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext14 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext15 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext16 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext17 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext18 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext19 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext2 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext20 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext21 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext3 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext4 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext5 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext6 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext7 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext8 | 1 + security/nss/cmd/bltest/tests/rsa_pss/plaintext9 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed0 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed1 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed10 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed11 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed12 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed13 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed14 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed15 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed16 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed17 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed18 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed19 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed2 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed20 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed21 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed3 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed4 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed5 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed6 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed7 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed8 | 1 + security/nss/cmd/bltest/tests/rsa_pss/seed9 | 1 + security/nss/cmd/bltest/tests/seed_cbc/ciphertext0 | 1 + security/nss/cmd/bltest/tests/seed_cbc/iv0 | 1 + security/nss/cmd/bltest/tests/seed_cbc/key0 | 1 + security/nss/cmd/bltest/tests/seed_cbc/numtests | 1 + security/nss/cmd/bltest/tests/seed_cbc/plaintext0 | 1 + security/nss/cmd/bltest/tests/seed_ecb/ciphertext0 | 1 + security/nss/cmd/bltest/tests/seed_ecb/iv0 | 1 + security/nss/cmd/bltest/tests/seed_ecb/key0 | 1 + security/nss/cmd/bltest/tests/seed_ecb/numtests | 1 + security/nss/cmd/bltest/tests/seed_ecb/plaintext0 | 1 + security/nss/cmd/bltest/tests/sha1/ciphertext0 | 1 + security/nss/cmd/bltest/tests/sha1/numtests | 1 + security/nss/cmd/bltest/tests/sha1/plaintext0 | 1 + security/nss/cmd/bltest/tests/sha224/ciphertext0 | 2 + security/nss/cmd/bltest/tests/sha224/ciphertext1 | 2 + security/nss/cmd/bltest/tests/sha224/numtests | 1 + security/nss/cmd/bltest/tests/sha224/plaintext0 | 1 + security/nss/cmd/bltest/tests/sha224/plaintext1 | 1 + security/nss/cmd/bltest/tests/sha256/ciphertext0 | 1 + security/nss/cmd/bltest/tests/sha256/ciphertext1 | 1 + security/nss/cmd/bltest/tests/sha256/numtests | 1 + security/nss/cmd/bltest/tests/sha256/plaintext0 | 1 + security/nss/cmd/bltest/tests/sha256/plaintext1 | 1 + security/nss/cmd/bltest/tests/sha384/ciphertext0 | 1 + security/nss/cmd/bltest/tests/sha384/ciphertext1 | 1 + security/nss/cmd/bltest/tests/sha384/numtests | 1 + security/nss/cmd/bltest/tests/sha384/plaintext0 | 1 + security/nss/cmd/bltest/tests/sha384/plaintext1 | 1 + security/nss/cmd/bltest/tests/sha512/ciphertext0 | 2 + security/nss/cmd/bltest/tests/sha512/ciphertext1 | 2 + security/nss/cmd/bltest/tests/sha512/numtests | 1 + security/nss/cmd/bltest/tests/sha512/plaintext0 | 1 + security/nss/cmd/bltest/tests/sha512/plaintext1 | 1 + security/nss/cmd/btoa/Makefile | 47 + security/nss/cmd/btoa/btoa.c | 218 + security/nss/cmd/btoa/btoa.gyp | 30 + security/nss/cmd/btoa/manifest.mn | 21 + security/nss/cmd/certutil/Makefile | 48 + security/nss/cmd/certutil/certext.c | 2266 +++++ security/nss/cmd/certutil/certutil.c | 4038 +++++++++ security/nss/cmd/certutil/certutil.gyp | 32 + security/nss/cmd/certutil/certutil.h | 57 + security/nss/cmd/certutil/keystuff.c | 595 ++ security/nss/cmd/certutil/manifest.mn | 25 + security/nss/cmd/chktest/Makefile | 47 + security/nss/cmd/chktest/chktest.c | 45 + security/nss/cmd/chktest/chktest.gyp | 32 + security/nss/cmd/chktest/manifest.mn | 21 + security/nss/cmd/crlutil/Makefile | 53 + security/nss/cmd/crlutil/crlgen.c | 1541 ++++ security/nss/cmd/crlutil/crlgen.h | 178 + security/nss/cmd/crlutil/crlgen_lex.c | 1773 ++++ security/nss/cmd/crlutil/crlgen_lex_fix.sed | 6 + security/nss/cmd/crlutil/crlgen_lex_orig.l | 181 + security/nss/cmd/crlutil/crlutil.c | 1144 +++ security/nss/cmd/crlutil/crlutil.gyp | 32 + security/nss/cmd/crlutil/manifest.mn | 25 + security/nss/cmd/crmf-cgi/Makefile | 53 + security/nss/cmd/crmf-cgi/crmfcgi.c | 1090 +++ security/nss/cmd/crmf-cgi/crmfcgi.html | 136 + security/nss/cmd/crmf-cgi/manifest.mn | 29 + security/nss/cmd/crmftest/Makefile | 61 + security/nss/cmd/crmftest/crmftest.gyp | 25 + security/nss/cmd/crmftest/manifest.mn | 21 + security/nss/cmd/crmftest/testcrmf.c | 1655 ++++ security/nss/cmd/dbck/Makefile | 47 + security/nss/cmd/dbck/dbck.c | 1348 +++ security/nss/cmd/dbck/dbrecover.c | 669 ++ security/nss/cmd/dbck/manifest.mn | 22 + security/nss/cmd/dbtest/Makefile | 46 + security/nss/cmd/dbtest/dbtest.c | 243 + security/nss/cmd/dbtest/dbtest.gyp | 25 + security/nss/cmd/dbtest/manifest.mn | 22 + security/nss/cmd/derdump/Makefile | 48 + security/nss/cmd/derdump/derdump.c | 128 + security/nss/cmd/derdump/derdump.gyp | 30 + security/nss/cmd/derdump/manifest.mn | 21 + security/nss/cmd/digest/Makefile | 48 + security/nss/cmd/digest/digest.c | 228 + security/nss/cmd/digest/digest.gyp | 30 + security/nss/cmd/digest/manifest.mn | 22 + security/nss/cmd/ecperf/Makefile | 46 + security/nss/cmd/ecperf/ecperf.c | 637 ++ security/nss/cmd/ecperf/ecperf.gyp | 35 + security/nss/cmd/ecperf/manifest.mn | 18 + security/nss/cmd/fbectest/Makefile | 46 + security/nss/cmd/fbectest/fbectest.c | 275 + security/nss/cmd/fbectest/fbectest.gyp | 34 + security/nss/cmd/fbectest/manifest.mn | 18 + security/nss/cmd/fbectest/testvecs.h | 818 ++ security/nss/cmd/fipstest/Makefile | 49 + security/nss/cmd/fipstest/README | 1 + security/nss/cmd/fipstest/fipstest.c | 8923 ++++++++++++++++++++ security/nss/cmd/fipstest/fipstest.gyp | 31 + security/nss/cmd/fipstest/manifest.mn | 17 + security/nss/cmd/httpserv/Makefile | 46 + security/nss/cmd/httpserv/httpserv.c | 1447 ++++ security/nss/cmd/httpserv/httpserv.gyp | 30 + security/nss/cmd/httpserv/manifest.mn | 20 + security/nss/cmd/lib/Makefile | 48 + security/nss/cmd/lib/basicutil.c | 868 ++ security/nss/cmd/lib/basicutil.h | 139 + security/nss/cmd/lib/berparse.c | 388 + security/nss/cmd/lib/derprint.c | 596 ++ security/nss/cmd/lib/exports.gyp | 27 + security/nss/cmd/lib/ffs.c | 21 + security/nss/cmd/lib/lib.gyp | 37 + security/nss/cmd/lib/manifest.mn | 42 + security/nss/cmd/lib/moreoids.c | 167 + security/nss/cmd/lib/pk11table.c | 1517 ++++ security/nss/cmd/lib/pk11table.h | 178 + security/nss/cmd/lib/pppolicy.c | 263 + security/nss/cmd/lib/secpwd.c | 163 + security/nss/cmd/lib/secutil.c | 4735 +++++++++++ security/nss/cmd/lib/secutil.h | 450 + security/nss/cmd/libpkix/Makefile | 46 + security/nss/cmd/libpkix/manifest.mn | 11 + security/nss/cmd/libpkix/perf/Makefile | 44 + .../nss/cmd/libpkix/perf/libpkix_buildthreads.c | 337 + security/nss/cmd/libpkix/perf/manifest.mn | 22 + security/nss/cmd/libpkix/perf/nss_threads.c | 158 + security/nss/cmd/libpkix/pkix/Makefile | 46 + security/nss/cmd/libpkix/pkix/certsel/Makefile | 45 + security/nss/cmd/libpkix/pkix/certsel/manifest.mn | 22 + .../cmd/libpkix/pkix/certsel/test_certselector.c | 1677 ++++ .../libpkix/pkix/certsel/test_comcertselparams.c | 800 ++ security/nss/cmd/libpkix/pkix/checker/Makefile | 45 + security/nss/cmd/libpkix/pkix/checker/manifest.mn | 20 + .../libpkix/pkix/checker/test_certchainchecker.c | 185 + security/nss/cmd/libpkix/pkix/crlsel/Makefile | 45 + security/nss/cmd/libpkix/pkix/crlsel/manifest.mn | 22 + .../cmd/libpkix/pkix/crlsel/test_comcrlselparams.c | 406 + .../nss/cmd/libpkix/pkix/crlsel/test_crlselector.c | 168 + security/nss/cmd/libpkix/pkix/manifest.mn | 11 + security/nss/cmd/libpkix/pkix/params/Makefile | 45 + security/nss/cmd/libpkix/pkix/params/manifest.mn | 24 + .../nss/cmd/libpkix/pkix/params/test_procparams.c | 478 ++ .../cmd/libpkix/pkix/params/test_resourcelimits.c | 99 + .../nss/cmd/libpkix/pkix/params/test_trustanchor.c | 251 + .../nss/cmd/libpkix/pkix/params/test_valparams.c | 261 + security/nss/cmd/libpkix/pkix/results/Makefile | 45 + security/nss/cmd/libpkix/pkix/results/manifest.mn | 24 + .../cmd/libpkix/pkix/results/test_buildresult.c | 212 + .../nss/cmd/libpkix/pkix/results/test_policynode.c | 612 ++ .../nss/cmd/libpkix/pkix/results/test_valresult.c | 199 + .../nss/cmd/libpkix/pkix/results/test_verifynode.c | 112 + security/nss/cmd/libpkix/pkix/store/Makefile | 45 + security/nss/cmd/libpkix/pkix/store/manifest.mn | 20 + security/nss/cmd/libpkix/pkix/store/test_store.c | 194 + security/nss/cmd/libpkix/pkix/top/Makefile | 45 + security/nss/cmd/libpkix/pkix/top/manifest.mn | 34 + .../nss/cmd/libpkix/pkix/top/test_basicchecker.c | 238 + .../pkix/top/test_basicconstraintschecker.c | 145 + .../nss/cmd/libpkix/pkix/top/test_buildchain.c | 418 + .../pkix/top/test_buildchain_partialchain.c | 725 ++ .../pkix/top/test_buildchain_resourcelimits.c | 438 + .../libpkix/pkix/top/test_buildchain_uchecker.c | 327 + .../cmd/libpkix/pkix/top/test_customcrlchecker.c | 435 + .../pkix/top/test_defaultcrlchecker2stores.c | 230 + security/nss/cmd/libpkix/pkix/top/test_ocsp.c | 288 + .../nss/cmd/libpkix/pkix/top/test_policychecker.c | 535 ++ .../cmd/libpkix/pkix/top/test_subjaltnamechecker.c | 261 + .../nss/cmd/libpkix/pkix/top/test_validatechain.c | 221 + .../cmd/libpkix/pkix/top/test_validatechain_NB.c | 351 + .../cmd/libpkix/pkix/top/test_validatechain_bc.c | 233 + security/nss/cmd/libpkix/pkix/util/Makefile | 45 + security/nss/cmd/libpkix/pkix/util/manifest.mn | 24 + security/nss/cmd/libpkix/pkix/util/test_error.c | 385 + security/nss/cmd/libpkix/pkix/util/test_list.c | 765 ++ security/nss/cmd/libpkix/pkix/util/test_list2.c | 118 + security/nss/cmd/libpkix/pkix/util/test_logger.c | 314 + security/nss/cmd/libpkix/pkix_pl/Makefile | 46 + security/nss/cmd/libpkix/pkix_pl/manifest.mn | 11 + security/nss/cmd/libpkix/pkix_pl/module/Makefile | 45 + .../nss/cmd/libpkix/pkix_pl/module/manifest.mn | 25 + .../cmd/libpkix/pkix_pl/module/test_colcertstore.c | 247 + .../cmd/libpkix/pkix_pl/module/test_ekuchecker.c | 275 + .../libpkix/pkix_pl/module/test_httpcertstore.c | 300 + .../libpkix/pkix_pl/module/test_pk11certstore.c | 580 ++ .../nss/cmd/libpkix/pkix_pl/module/test_socket.c | 571 ++ security/nss/cmd/libpkix/pkix_pl/pki/Makefile | 45 + security/nss/cmd/libpkix/pkix_pl/pki/manifest.mn | 29 + .../libpkix/pkix_pl/pki/test_authorityinfoaccess.c | 105 + security/nss/cmd/libpkix/pkix_pl/pki/test_cert.c | 2088 +++++ security/nss/cmd/libpkix/pkix_pl/pki/test_crl.c | 302 + .../nss/cmd/libpkix/pkix_pl/pki/test_crlentry.c | 208 + security/nss/cmd/libpkix/pkix_pl/pki/test_date.c | 106 + .../nss/cmd/libpkix/pkix_pl/pki/test_generalname.c | 123 + .../cmd/libpkix/pkix_pl/pki/test_nameconstraints.c | 127 + .../libpkix/pkix_pl/pki/test_subjectinfoaccess.c | 121 + .../nss/cmd/libpkix/pkix_pl/pki/test_x500name.c | 169 + security/nss/cmd/libpkix/pkix_pl/system/Makefile | 45 + .../nss/cmd/libpkix/pkix_pl/system/manifest.mn | 38 + .../nss/cmd/libpkix/pkix_pl/system/stress_test.c | 146 + .../nss/cmd/libpkix/pkix_pl/system/test_bigint.c | 189 + .../cmd/libpkix/pkix_pl/system/test_bytearray.c | 231 + .../cmd/libpkix/pkix_pl/system/test_hashtable.c | 380 + security/nss/cmd/libpkix/pkix_pl/system/test_mem.c | 133 + .../cmd/libpkix/pkix_pl/system/test_monitorlock.c | 104 + .../nss/cmd/libpkix/pkix_pl/system/test_mutex.c | 102 + .../nss/cmd/libpkix/pkix_pl/system/test_mutex2.c | 166 + .../nss/cmd/libpkix/pkix_pl/system/test_mutex3.c | 104 + .../nss/cmd/libpkix/pkix_pl/system/test_object.c | 281 + security/nss/cmd/libpkix/pkix_pl/system/test_oid.c | 212 + .../nss/cmd/libpkix/pkix_pl/system/test_rwlock.c | 204 + .../nss/cmd/libpkix/pkix_pl/system/test_string.c | 434 + .../nss/cmd/libpkix/pkix_pl/system/test_string2.c | 337 + security/nss/cmd/libpkix/pkixlibs.mk | 27 + security/nss/cmd/libpkix/pkixrules.mk | 7 + security/nss/cmd/libpkix/pkixutil/Makefile | 43 + security/nss/cmd/libpkix/pkixutil/manifest.mn | 41 + security/nss/cmd/libpkix/pkixutil/pkixutil.c | 299 + security/nss/cmd/libpkix/sample_apps/Makefile | 46 + security/nss/cmd/libpkix/sample_apps/build_chain.c | 242 + security/nss/cmd/libpkix/sample_apps/dumpcert.c | 182 + security/nss/cmd/libpkix/sample_apps/dumpcrl.c | 186 + security/nss/cmd/libpkix/sample_apps/manifest.mn | 23 + .../nss/cmd/libpkix/sample_apps/validate_chain.c | 220 + security/nss/cmd/libpkix/testutil/Makefile | 50 + security/nss/cmd/libpkix/testutil/config.mk | 8 + security/nss/cmd/libpkix/testutil/manifest.mn | 27 + security/nss/cmd/libpkix/testutil/pkixutil.def | 48 + security/nss/cmd/libpkix/testutil/testutil.c | 576 ++ security/nss/cmd/libpkix/testutil/testutil.h | 292 + security/nss/cmd/libpkix/testutil/testutil_nss.c | 579 ++ security/nss/cmd/libpkix/testutil/testutil_nss.h | 119 + security/nss/cmd/listsuites/Makefile | 47 + security/nss/cmd/listsuites/listsuites.c | 108 + security/nss/cmd/listsuites/listsuites.gyp | 24 + security/nss/cmd/listsuites/manifest.mn | 15 + security/nss/cmd/lowhashtest/Makefile | 57 + security/nss/cmd/lowhashtest/lowhashtest.c | 501 ++ security/nss/cmd/lowhashtest/lowhashtest.gyp | 32 + security/nss/cmd/lowhashtest/manifest.mn | 18 + security/nss/cmd/makepqg/Makefile | 49 + security/nss/cmd/makepqg/makepqg.c | 353 + security/nss/cmd/makepqg/makepqg.gyp | 25 + security/nss/cmd/makepqg/manifest.mn | 19 + security/nss/cmd/makepqg/testit.ksh | 13 + security/nss/cmd/manifest.mn | 112 + security/nss/cmd/modutil/Makefile | 54 + security/nss/cmd/modutil/README | 7 + security/nss/cmd/modutil/error.h | 142 + security/nss/cmd/modutil/install-ds.c | 1522 ++++ security/nss/cmd/modutil/install-ds.h | 260 + security/nss/cmd/modutil/install.c | 941 +++ security/nss/cmd/modutil/install.h | 100 + security/nss/cmd/modutil/installparse.c | 479 ++ security/nss/cmd/modutil/installparse.h | 7 + security/nss/cmd/modutil/installparse.l | 137 + security/nss/cmd/modutil/installparse.y | 104 + security/nss/cmd/modutil/instsec.c | 153 + security/nss/cmd/modutil/lex.Pk11Install_yy.c | 1600 ++++ security/nss/cmd/modutil/manifest.mn | 32 + security/nss/cmd/modutil/modutil.c | 996 +++ security/nss/cmd/modutil/modutil.gyp | 44 + security/nss/cmd/modutil/modutil.h | 42 + security/nss/cmd/modutil/pk11.c | 1050 +++ security/nss/cmd/modutil/pk11jar.html | 279 + security/nss/cmd/modutil/rules.mk | 26 + security/nss/cmd/modutil/specification.html | 322 + security/nss/cmd/mpitests/mpi-test.c | 2146 +++++ security/nss/cmd/mpitests/mpitests.gyp | 54 + security/nss/cmd/mpitests/test-info.c | 157 + security/nss/cmd/multinit/Makefile | 47 + security/nss/cmd/multinit/manifest.mn | 13 + security/nss/cmd/multinit/multinit.c | 878 ++ security/nss/cmd/multinit/multinit.gyp | 24 + security/nss/cmd/nss-policy-check/Makefile | 47 + security/nss/cmd/nss-policy-check/manifest.mn | 15 + .../nss/cmd/nss-policy-check/nss-policy-check.c | 305 + .../nss/cmd/nss-policy-check/nss-policy-check.gyp | 24 + security/nss/cmd/ocspclnt/Makefile | 45 + security/nss/cmd/ocspclnt/manifest.mn | 24 + security/nss/cmd/ocspclnt/ocspclnt.c | 1248 +++ security/nss/cmd/ocspclnt/ocspclnt.gyp | 25 + security/nss/cmd/ocspresp/Makefile | 47 + security/nss/cmd/ocspresp/manifest.mn | 15 + security/nss/cmd/ocspresp/ocspresp.c | 251 + security/nss/cmd/ocspresp/ocspresp.gyp | 24 + security/nss/cmd/oidcalc/Makefile | 48 + security/nss/cmd/oidcalc/manifest.mn | 19 + security/nss/cmd/oidcalc/oidcalc.c | 86 + security/nss/cmd/oidcalc/oidcalc.gyp | 30 + security/nss/cmd/p7content/Makefile | 47 + security/nss/cmd/p7content/manifest.mn | 15 + security/nss/cmd/p7content/p7content.c | 269 + security/nss/cmd/p7content/p7content.gyp | 24 + security/nss/cmd/p7env/Makefile | 47 + security/nss/cmd/p7env/manifest.mn | 15 + security/nss/cmd/p7env/p7env.c | 261 + security/nss/cmd/p7env/p7env.gyp | 24 + security/nss/cmd/p7sign/Makefile | 47 + security/nss/cmd/p7sign/manifest.mn | 15 + security/nss/cmd/p7sign/p7sign.c | 281 + security/nss/cmd/p7sign/p7sign.gyp | 24 + security/nss/cmd/p7verify/Makefile | 47 + security/nss/cmd/p7verify/manifest.mn | 15 + security/nss/cmd/p7verify/p7verify.c | 284 + security/nss/cmd/p7verify/p7verify.gyp | 24 + security/nss/cmd/pk11ectest/Makefile | 46 + security/nss/cmd/pk11ectest/manifest.mn | 16 + security/nss/cmd/pk11ectest/pk11ectest.c | 171 + security/nss/cmd/pk11ectest/pk11ectest.gyp | 31 + security/nss/cmd/pk11gcmtest/Makefile | 47 + security/nss/cmd/pk11gcmtest/manifest.mn | 14 + security/nss/cmd/pk11gcmtest/pk11gcmtest.c | 465 + security/nss/cmd/pk11gcmtest/pk11gcmtest.gyp | 24 + security/nss/cmd/pk11gcmtest/tests/README | 14 + .../nss/cmd/pk11gcmtest/tests/gcmDecrypt128.rsp | 1016 +++ .../nss/cmd/pk11gcmtest/tests/gcmDecrypt192.rsp | 1016 +++ .../nss/cmd/pk11gcmtest/tests/gcmDecrypt256.rsp | 1016 +++ .../cmd/pk11gcmtest/tests/gcmEncryptExtIV128.rsp | 1016 +++ .../cmd/pk11gcmtest/tests/gcmEncryptExtIV192.rsp | 1016 +++ .../cmd/pk11gcmtest/tests/gcmEncryptExtIV256.rsp | 1016 +++ security/nss/cmd/pk11importtest/Makefile | 43 + security/nss/cmd/pk11importtest/manifest.mn | 15 + security/nss/cmd/pk11importtest/pk11importtest.c | 407 + security/nss/cmd/pk11importtest/pk11importtest.gyp | 25 + security/nss/cmd/pk11mode/Makefile | 65 + security/nss/cmd/pk11mode/manifest.mn | 14 + security/nss/cmd/pk11mode/pk11mode.c | 5370 ++++++++++++ security/nss/cmd/pk11mode/pk11mode.gyp | 24 + security/nss/cmd/pk11util/Makefile | 48 + security/nss/cmd/pk11util/manifest.mn | 23 + security/nss/cmd/pk11util/pk11util.c | 2240 +++++ security/nss/cmd/pk11util/scripts/dosign | 162 + security/nss/cmd/pk11util/scripts/hssign | 48 + security/nss/cmd/pk11util/scripts/lcert | 35 + security/nss/cmd/pk11util/scripts/mechanisms | 11 + security/nss/cmd/pk11util/scripts/pLabel1 | 6 + security/nss/cmd/pk11util/scripts/pMechanisms | 8 + security/nss/cmd/pk11util/scripts/pcert | 30 + security/nss/cmd/pk12util/Makefile | 48 + security/nss/cmd/pk12util/manifest.mn | 23 + security/nss/cmd/pk12util/pk12util.c | 1223 +++ security/nss/cmd/pk12util/pk12util.gyp | 30 + security/nss/cmd/pk12util/pk12util.h | 40 + security/nss/cmd/pk1sign/Makefile | 47 + security/nss/cmd/pk1sign/manifest.mn | 15 + security/nss/cmd/pk1sign/pk1sign.c | 317 + security/nss/cmd/pk1sign/pk1sign.gyp | 24 + security/nss/cmd/pkix-errcodes/Makefile | 47 + security/nss/cmd/pkix-errcodes/manifest.mn | 15 + security/nss/cmd/pkix-errcodes/pkix-errcodes.c | 34 + security/nss/cmd/pkix-errcodes/pkix-errcodes.gyp | 24 + security/nss/cmd/platlibs.gypi | 62 + security/nss/cmd/platlibs.mk | 260 + security/nss/cmd/platrules.mk | 19 + security/nss/cmd/pp/Makefile | 47 + security/nss/cmd/pp/manifest.mn | 19 + security/nss/cmd/pp/pp.c | 200 + security/nss/cmd/pp/pp.gyp | 30 + security/nss/cmd/ppcertdata/Makefile | 48 + security/nss/cmd/ppcertdata/manifest.mn | 22 + security/nss/cmd/ppcertdata/ppcertdata.c | 99 + security/nss/cmd/pwdecrypt/Makefile | 45 + security/nss/cmd/pwdecrypt/manifest.mn | 26 + security/nss/cmd/pwdecrypt/pwdecrypt.c | 330 + security/nss/cmd/pwdecrypt/pwdecrypt.gyp | 25 + security/nss/cmd/rsaperf/Makefile | 46 + security/nss/cmd/rsaperf/defkey.c | 293 + security/nss/cmd/rsaperf/manifest.mn | 24 + security/nss/cmd/rsaperf/rsaperf.c | 695 ++ security/nss/cmd/rsaperf/rsaperf.gyp | 36 + security/nss/cmd/rsapoptst/Makefile | 54 + security/nss/cmd/rsapoptst/manifest.mn | 16 + security/nss/cmd/rsapoptst/rsapoptst.c | 639 ++ security/nss/cmd/rsapoptst/rsapoptst.gyp | 25 + security/nss/cmd/samples/cert | 15 + security/nss/cmd/samples/cert0 | Bin 0 -> 505 bytes security/nss/cmd/samples/cert1 | Bin 0 -> 515 bytes security/nss/cmd/samples/cert2 | Bin 0 -> 528 bytes security/nss/cmd/samples/pkcs7.ber | Bin 0 -> 1771 bytes security/nss/cmd/samples/pkcs7bday.ber | Bin 0 -> 1881 bytes security/nss/cmd/samples/pkcs7cnet.ber | Bin 0 -> 3330 bytes security/nss/cmd/samples/pkcs7news.ber | Bin 0 -> 255328 bytes security/nss/cmd/samples/x509v3.der | Bin 0 -> 463 bytes security/nss/cmd/samples/x509v3.txt | 10 + security/nss/cmd/sdbthreadtst/Makefile | 48 + security/nss/cmd/sdbthreadtst/manifest.mn | 22 + security/nss/cmd/sdbthreadtst/sdbthreadtst.c | 217 + security/nss/cmd/sdbthreadtst/sdbthreadtst.gyp | 29 + security/nss/cmd/sdrtest/Makefile | 45 + security/nss/cmd/sdrtest/manifest.mn | 26 + security/nss/cmd/sdrtest/sdrtest.c | 427 + security/nss/cmd/sdrtest/sdrtest.gyp | 25 + security/nss/cmd/selfserv/Makefile | 46 + security/nss/cmd/selfserv/manifest.mn | 20 + security/nss/cmd/selfserv/selfserv.c | 3148 +++++++ security/nss/cmd/selfserv/selfserv.gyp | 30 + security/nss/cmd/shlibsign/Makefile | 101 + security/nss/cmd/shlibsign/mangle/Makefile | 65 + security/nss/cmd/shlibsign/mangle/mangle.c | 140 + security/nss/cmd/shlibsign/mangle/mangle.gyp | 31 + security/nss/cmd/shlibsign/mangle/manifest.mn | 24 + security/nss/cmd/shlibsign/manifest.mn | 27 + security/nss/cmd/shlibsign/shlibsign.c | 1643 ++++ security/nss/cmd/shlibsign/shlibsign.gyp | 30 + security/nss/cmd/shlibsign/sign.cmd | 25 + security/nss/cmd/shlibsign/sign.sh | 51 + security/nss/cmd/signtool/Makefile | 44 + security/nss/cmd/signtool/README | 128 + security/nss/cmd/signtool/certgen.c | 713 ++ security/nss/cmd/signtool/javascript.c | 1817 ++++ security/nss/cmd/signtool/list.c | 206 + security/nss/cmd/signtool/manifest.mn | 27 + security/nss/cmd/signtool/sign.c | 872 ++ security/nss/cmd/signtool/signtool.c | 1066 +++ security/nss/cmd/signtool/signtool.gyp | 33 + security/nss/cmd/signtool/signtool.h | 113 + security/nss/cmd/signtool/util.c | 1046 +++ security/nss/cmd/signtool/verify.c | 337 + security/nss/cmd/signtool/zip.c | 676 ++ security/nss/cmd/signtool/zip.h | 69 + security/nss/cmd/signver/Makefile | 43 + security/nss/cmd/signver/examples/1/form.pl | 22 + .../nss/cmd/signver/examples/1/signedForm.html | 55 + .../nss/cmd/signver/examples/1/signedForm.nt.html | 55 + security/nss/cmd/signver/examples/1/signedForm.pl | 60 + security/nss/cmd/signver/manifest.mn | 24 + security/nss/cmd/signver/pk7print.c | 907 ++ security/nss/cmd/signver/signver.c | 313 + security/nss/cmd/signver/signver.gyp | 26 + security/nss/cmd/smimetools/Makefile | 49 + security/nss/cmd/smimetools/cmsutil.c | 1625 ++++ security/nss/cmd/smimetools/manifest.mn | 17 + security/nss/cmd/smimetools/rules.mk | 7 + security/nss/cmd/smimetools/smime | 547 ++ security/nss/cmd/smimetools/smimetools.gyp | 25 + security/nss/cmd/ssltap/Makefile | 51 + security/nss/cmd/ssltap/manifest.mn | 21 + security/nss/cmd/ssltap/ssltap-manual.html | 170 + security/nss/cmd/ssltap/ssltap.c | 2584 ++++++ security/nss/cmd/ssltap/ssltap.gyp | 25 + security/nss/cmd/strsclnt/Makefile | 47 + security/nss/cmd/strsclnt/manifest.mn | 19 + security/nss/cmd/strsclnt/strsclnt.c | 1611 ++++ security/nss/cmd/strsclnt/strsclnt.gyp | 30 + security/nss/cmd/symkeyutil/Makefile | 48 + security/nss/cmd/symkeyutil/manifest.mn | 23 + security/nss/cmd/symkeyutil/symkey.man | 182 + security/nss/cmd/symkeyutil/symkeyutil.c | 1105 +++ security/nss/cmd/symkeyutil/symkeyutil.gyp | 30 + security/nss/cmd/tests/Makefile | 45 + security/nss/cmd/tests/baddbdir.c | 38 + security/nss/cmd/tests/conflict.c | 27 + security/nss/cmd/tests/dertimetest.c | 102 + security/nss/cmd/tests/encodeinttest.c | 62 + security/nss/cmd/tests/manifest.mn | 29 + security/nss/cmd/tests/nonspr10.c | 88 + security/nss/cmd/tests/remtest.c | 136 + security/nss/cmd/tests/secmodtest.c | 126 + security/nss/cmd/tests/tests.gyp | 91 + security/nss/cmd/tstclnt/Makefile | 46 + security/nss/cmd/tstclnt/manifest.mn | 23 + security/nss/cmd/tstclnt/tstclnt.c | 2437 ++++++ security/nss/cmd/tstclnt/tstclnt.gyp | 31 + security/nss/cmd/validation/Makefile | 48 + security/nss/cmd/validation/manifest.mn | 23 + security/nss/cmd/validation/validation.c | 250 + security/nss/cmd/validation/validation.gyp | 30 + security/nss/cmd/vfychain/Makefile | 46 + security/nss/cmd/vfychain/manifest.mn | 23 + security/nss/cmd/vfychain/vfychain.c | 821 ++ security/nss/cmd/vfychain/vfychain.gyp | 30 + security/nss/cmd/vfyserv/Makefile | 46 + security/nss/cmd/vfyserv/manifest.mn | 23 + security/nss/cmd/vfyserv/vfyserv.c | 575 ++ security/nss/cmd/vfyserv/vfyserv.gyp | 32 + security/nss/cmd/vfyserv/vfyserv.h | 138 + security/nss/cmd/vfyserv/vfyutil.c | 620 ++ 1345 files changed, 141397 insertions(+) create mode 100644 security/nss/cmd/Makefile create mode 100644 security/nss/cmd/addbuiltin/Makefile create mode 100644 security/nss/cmd/addbuiltin/addbuiltin.c create mode 100644 security/nss/cmd/addbuiltin/addbuiltin.gyp create mode 100644 security/nss/cmd/addbuiltin/manifest.mn create mode 100644 security/nss/cmd/atob/Makefile create mode 100644 security/nss/cmd/atob/atob.c create mode 100644 security/nss/cmd/atob/atob.gyp create mode 100644 security/nss/cmd/atob/manifest.mn create mode 100644 security/nss/cmd/bltest/Makefile create mode 100644 security/nss/cmd/bltest/blapitest.c create mode 100644 security/nss/cmd/bltest/bltest.gyp create mode 100644 security/nss/cmd/bltest/manifest.mn create mode 100644 security/nss/cmd/bltest/pkcs1_vectors.h create mode 100644 security/nss/cmd/bltest/tests/README create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext10 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext11 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext12 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext13 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext14 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext15 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext16 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext17 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext18 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext19 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext20 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext21 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext22 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext23 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext24 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext7 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext8 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/ciphertext9 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv1 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv10 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv11 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv12 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv13 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv14 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv15 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv16 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv17 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv18 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv19 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv2 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv20 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv21 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv22 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv23 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv24 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv3 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv4 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv5 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv6 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv7 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv8 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/iv9 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key1 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key10 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key11 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key12 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key13 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key14 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key15 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key16 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key17 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key18 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key19 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key2 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key20 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key21 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key22 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key23 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key24 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key3 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key4 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key5 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key6 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key7 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key8 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/key9 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/mktst.sh create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext10 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext11 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext12 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext13 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext14 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext15 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext16 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext17 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext18 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext19 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext20 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext21 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext22 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext23 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext24 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext7 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext8 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/plaintext9 create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test1.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test10.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test11.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test12.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test13.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test14.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test15.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test16.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test17.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test18.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test19.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test2.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test20.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test21.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test22.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test23.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test24.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test3.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test4.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test5.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test6.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test7.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test8.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cbc/test9.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_0.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_1.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_2.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/aes_ctr_tests_source.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/iv0 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/iv1 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/iv2 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/key0 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/key1 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/key2 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/mktst.sh create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/numtests create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/aes_ctr/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes-cts-type-1-vectors.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes_cts_0.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes_cts_1.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes_cts_2.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes_cts_3.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes_cts_4.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/aes_cts_5.txt create mode 100644 security/nss/cmd/bltest/tests/aes_cts/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/iv0 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/iv1 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/iv2 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/iv3 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/iv4 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/iv5 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/key0 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/key1 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/key2 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/key3 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/key4 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/key5 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/mktst.sh create mode 100644 security/nss/cmd/bltest/tests/aes_cts/numtests create mode 100644 security/nss/cmd/bltest/tests/aes_cts/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/aes_cts/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key1 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key2 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key3 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key4 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key5 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/key6 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/mktst.sh create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/test1.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/test2.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/test3.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/test4.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/test5.txt create mode 100644 security/nss/cmd/bltest/tests/aes_ecb/test6.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad0 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad1 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad10 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad11 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad12 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad13 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad14 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad15 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad16 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad17 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad2 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad3 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad4 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad5 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad6 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad7 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad8 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/aad9 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext10 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext11 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext12 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext13 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext14 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext15 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext16 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext17 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext7 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext8 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/ciphertext9 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/hex.c create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv0 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv1 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv10 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv11 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv12 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv13 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv14 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv15 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv16 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv17 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv2 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv3 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv4 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv5 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv6 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv7 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv8 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/iv9 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key0 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key1 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key10 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key11 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key12 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key13 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key14 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key15 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key16 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key17 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key2 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key3 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key4 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key5 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key6 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key7 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key8 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/key9 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/mktst.sh create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/numtests create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext10 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext11 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext12 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext13 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext14 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext15 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext16 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext17 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext7 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext8 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/plaintext9 create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test0.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test1.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test10.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test11.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test12.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test13.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test14.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test15.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test16.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test17.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test2.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test3.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test4.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test5.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test6.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test7.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test8.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test9.txt create mode 100644 security/nss/cmd/bltest/tests/aes_gcm/test_source.txt create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/key1 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/key2 create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/camellia_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/key1 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/key2 create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/camellia_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/aad0 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/aad1 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/iv0 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/iv1 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/key0 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/key1 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/numtests create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/des3_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/des3_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/des3_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/des3_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/des3_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/des3_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/des3_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/des3_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/des3_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/des_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/des_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/des_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/des_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/des_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/des_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/des_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/des_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/des_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext10 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext11 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext12 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext13 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext14 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext15 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext16 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext17 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext18 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext19 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext20 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext7 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext8 create mode 100644 security/nss/cmd/bltest/tests/dsa/ciphertext9 create mode 100644 security/nss/cmd/bltest/tests/dsa/dsa_fips.txt create mode 100644 security/nss/cmd/bltest/tests/dsa/key0 create mode 100644 security/nss/cmd/bltest/tests/dsa/key1 create mode 100644 security/nss/cmd/bltest/tests/dsa/key10 create mode 100644 security/nss/cmd/bltest/tests/dsa/key11 create mode 100644 security/nss/cmd/bltest/tests/dsa/key12 create mode 100644 security/nss/cmd/bltest/tests/dsa/key13 create mode 100644 security/nss/cmd/bltest/tests/dsa/key14 create mode 100644 security/nss/cmd/bltest/tests/dsa/key15 create mode 100644 security/nss/cmd/bltest/tests/dsa/key16 create mode 100644 security/nss/cmd/bltest/tests/dsa/key17 create mode 100644 security/nss/cmd/bltest/tests/dsa/key18 create mode 100644 security/nss/cmd/bltest/tests/dsa/key19 create mode 100644 security/nss/cmd/bltest/tests/dsa/key2 create mode 100644 security/nss/cmd/bltest/tests/dsa/key20 create mode 100644 security/nss/cmd/bltest/tests/dsa/key3 create mode 100644 security/nss/cmd/bltest/tests/dsa/key4 create mode 100644 security/nss/cmd/bltest/tests/dsa/key5 create mode 100644 security/nss/cmd/bltest/tests/dsa/key6 create mode 100644 security/nss/cmd/bltest/tests/dsa/key7 create mode 100644 security/nss/cmd/bltest/tests/dsa/key8 create mode 100644 security/nss/cmd/bltest/tests/dsa/key9 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed0 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed1 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed10 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed11 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed12 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed13 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed14 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed15 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed16 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed17 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed18 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed19 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed2 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed20 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed3 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed4 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed5 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed6 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed7 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed8 create mode 100644 security/nss/cmd/bltest/tests/dsa/keyseed9 create mode 100644 security/nss/cmd/bltest/tests/dsa/numtests create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext10 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext11 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext12 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext13 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext14 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext15 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext16 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext17 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext18 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext19 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext20 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext7 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext8 create mode 100644 security/nss/cmd/bltest/tests/dsa/plaintext9 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg0 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg1 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg10 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg11 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg12 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg13 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg14 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg15 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg16 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg17 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg18 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg19 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg2 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg20 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg3 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg4 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg5 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg6 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg7 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg8 create mode 100644 security/nss/cmd/bltest/tests/dsa/pqg9 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed0 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed1 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed10 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed11 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed12 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed13 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed14 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed15 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed16 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed17 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed18 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed19 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed2 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed20 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed3 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed4 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed5 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed6 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed7 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed8 create mode 100644 security/nss/cmd/bltest/tests/dsa/sigseed9 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/README create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext10 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext11 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext12 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext13 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext14 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext15 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext16 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext17 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext18 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext19 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext20 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext7 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext8 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/ciphertext9 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key0 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key1 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key10 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key11 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key12 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key13 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key14 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key15 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key16 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key17 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key18 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key19 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key2 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key20 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key3 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key4 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key5 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key6 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key7 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key8 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/key9 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/numtests create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext10 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext11 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext12 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext13 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext14 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext15 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext16 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext17 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext18 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext19 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext20 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext7 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext8 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/plaintext9 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed0 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed1 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed10 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed11 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed12 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed13 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed14 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed15 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed16 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed17 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed18 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed19 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed2 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed20 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed3 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed4 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed5 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed6 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed7 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed8 create mode 100644 security/nss/cmd/bltest/tests/ecdsa/sigseed9 create mode 100644 security/nss/cmd/bltest/tests/md2/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/md2/numtests create mode 100644 security/nss/cmd/bltest/tests/md2/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/md5/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/md5/numtests create mode 100644 security/nss/cmd/bltest/tests/md5/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rc2_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/rc2_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/rc2_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/rc2_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rc2_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/rc2_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/rc2_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rc4/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rc4/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/rc4/key0 create mode 100644 security/nss/cmd/bltest/tests/rc4/key1 create mode 100644 security/nss/cmd/bltest/tests/rc4/numtests create mode 100644 security/nss/cmd/bltest/tests/rc4/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rc4/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rc5_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/rc5_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/rc5_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/rc5_cbc/params0 create mode 100644 security/nss/cmd/bltest/tests/rc5_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rc5_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/rc5_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/rc5_ecb/params0 create mode 100644 security/nss/cmd/bltest/tests/rc5_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rsa/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rsa/key0 create mode 100644 security/nss/cmd/bltest/tests/rsa/numtests create mode 100644 security/nss/cmd/bltest/tests/rsa/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext10 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext11 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext12 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext13 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext14 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext15 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext16 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext17 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext7 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext8 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/ciphertext9 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash1 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash10 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash11 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash12 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash13 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash14 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash15 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash16 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash17 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash2 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash3 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash4 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash5 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash6 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash7 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash8 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/hash9 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key1 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key10 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key11 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key12 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key13 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key14 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key15 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key16 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key17 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key2 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key3 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key4 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key5 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key6 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key7 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key8 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/key9 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash1 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash10 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash11 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash12 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash13 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash14 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash15 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash16 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash17 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash2 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash3 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash4 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash5 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash6 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash7 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash8 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/maskhash9 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/numtests create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext10 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext11 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext12 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext13 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext14 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext15 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext16 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext17 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext7 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext8 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/plaintext9 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed0 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed1 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed10 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed11 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed12 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed13 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed14 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed15 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed16 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed17 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed2 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed3 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed4 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed5 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed6 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed7 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed8 create mode 100644 security/nss/cmd/bltest/tests/rsa_oaep/seed9 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/README create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext10 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext11 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext12 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext13 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext14 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext15 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext16 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext17 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext18 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext19 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext2 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext20 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext21 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext3 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext4 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext5 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext6 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext7 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext8 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/ciphertext9 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash0 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash1 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash10 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash11 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash12 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash13 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash14 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash15 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash16 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash17 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash18 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash19 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash2 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash20 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash21 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash3 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash4 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash5 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash6 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash7 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash8 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/hash9 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key0 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key1 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key10 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key11 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key12 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key13 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key14 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key15 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key16 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key17 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key18 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key19 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key2 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key20 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key21 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key3 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key4 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key5 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key6 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key7 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key8 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/key9 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash0 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash1 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash10 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash11 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash12 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash13 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash14 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash15 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash16 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash17 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash18 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash19 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash2 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash20 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash21 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash3 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash4 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash5 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash6 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash7 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash8 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/maskhash9 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/numtests create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext10 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext11 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext12 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext13 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext14 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext15 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext16 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext17 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext18 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext19 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext2 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext20 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext21 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext3 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext4 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext5 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext6 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext7 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext8 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/plaintext9 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed0 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed1 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed10 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed11 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed12 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed13 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed14 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed15 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed16 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed17 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed18 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed19 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed2 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed20 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed21 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed3 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed4 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed5 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed6 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed7 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed8 create mode 100644 security/nss/cmd/bltest/tests/rsa_pss/seed9 create mode 100644 security/nss/cmd/bltest/tests/seed_cbc/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/seed_cbc/iv0 create mode 100644 security/nss/cmd/bltest/tests/seed_cbc/key0 create mode 100644 security/nss/cmd/bltest/tests/seed_cbc/numtests create mode 100644 security/nss/cmd/bltest/tests/seed_cbc/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/seed_ecb/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/seed_ecb/iv0 create mode 100644 security/nss/cmd/bltest/tests/seed_ecb/key0 create mode 100644 security/nss/cmd/bltest/tests/seed_ecb/numtests create mode 100644 security/nss/cmd/bltest/tests/seed_ecb/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/sha1/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/sha1/numtests create mode 100644 security/nss/cmd/bltest/tests/sha1/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/sha224/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/sha224/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/sha224/numtests create mode 100644 security/nss/cmd/bltest/tests/sha224/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/sha224/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/sha256/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/sha256/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/sha256/numtests create mode 100644 security/nss/cmd/bltest/tests/sha256/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/sha256/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/sha384/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/sha384/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/sha384/numtests create mode 100644 security/nss/cmd/bltest/tests/sha384/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/sha384/plaintext1 create mode 100644 security/nss/cmd/bltest/tests/sha512/ciphertext0 create mode 100644 security/nss/cmd/bltest/tests/sha512/ciphertext1 create mode 100644 security/nss/cmd/bltest/tests/sha512/numtests create mode 100644 security/nss/cmd/bltest/tests/sha512/plaintext0 create mode 100644 security/nss/cmd/bltest/tests/sha512/plaintext1 create mode 100644 security/nss/cmd/btoa/Makefile create mode 100644 security/nss/cmd/btoa/btoa.c create mode 100644 security/nss/cmd/btoa/btoa.gyp create mode 100644 security/nss/cmd/btoa/manifest.mn create mode 100644 security/nss/cmd/certutil/Makefile create mode 100644 security/nss/cmd/certutil/certext.c create mode 100644 security/nss/cmd/certutil/certutil.c create mode 100644 security/nss/cmd/certutil/certutil.gyp create mode 100644 security/nss/cmd/certutil/certutil.h create mode 100644 security/nss/cmd/certutil/keystuff.c create mode 100644 security/nss/cmd/certutil/manifest.mn create mode 100644 security/nss/cmd/chktest/Makefile create mode 100644 security/nss/cmd/chktest/chktest.c create mode 100644 security/nss/cmd/chktest/chktest.gyp create mode 100644 security/nss/cmd/chktest/manifest.mn create mode 100644 security/nss/cmd/crlutil/Makefile create mode 100644 security/nss/cmd/crlutil/crlgen.c create mode 100644 security/nss/cmd/crlutil/crlgen.h create mode 100644 security/nss/cmd/crlutil/crlgen_lex.c create mode 100644 security/nss/cmd/crlutil/crlgen_lex_fix.sed create mode 100644 security/nss/cmd/crlutil/crlgen_lex_orig.l create mode 100644 security/nss/cmd/crlutil/crlutil.c create mode 100644 security/nss/cmd/crlutil/crlutil.gyp create mode 100644 security/nss/cmd/crlutil/manifest.mn create mode 100644 security/nss/cmd/crmf-cgi/Makefile create mode 100644 security/nss/cmd/crmf-cgi/crmfcgi.c create mode 100644 security/nss/cmd/crmf-cgi/crmfcgi.html create mode 100644 security/nss/cmd/crmf-cgi/manifest.mn create mode 100644 security/nss/cmd/crmftest/Makefile create mode 100644 security/nss/cmd/crmftest/crmftest.gyp create mode 100644 security/nss/cmd/crmftest/manifest.mn create mode 100644 security/nss/cmd/crmftest/testcrmf.c create mode 100644 security/nss/cmd/dbck/Makefile create mode 100644 security/nss/cmd/dbck/dbck.c create mode 100644 security/nss/cmd/dbck/dbrecover.c create mode 100644 security/nss/cmd/dbck/manifest.mn create mode 100644 security/nss/cmd/dbtest/Makefile create mode 100644 security/nss/cmd/dbtest/dbtest.c create mode 100644 security/nss/cmd/dbtest/dbtest.gyp create mode 100644 security/nss/cmd/dbtest/manifest.mn create mode 100644 security/nss/cmd/derdump/Makefile create mode 100644 security/nss/cmd/derdump/derdump.c create mode 100644 security/nss/cmd/derdump/derdump.gyp create mode 100644 security/nss/cmd/derdump/manifest.mn create mode 100644 security/nss/cmd/digest/Makefile create mode 100644 security/nss/cmd/digest/digest.c create mode 100644 security/nss/cmd/digest/digest.gyp create mode 100644 security/nss/cmd/digest/manifest.mn create mode 100644 security/nss/cmd/ecperf/Makefile create mode 100644 security/nss/cmd/ecperf/ecperf.c create mode 100644 security/nss/cmd/ecperf/ecperf.gyp create mode 100644 security/nss/cmd/ecperf/manifest.mn create mode 100644 security/nss/cmd/fbectest/Makefile create mode 100644 security/nss/cmd/fbectest/fbectest.c create mode 100644 security/nss/cmd/fbectest/fbectest.gyp create mode 100644 security/nss/cmd/fbectest/manifest.mn create mode 100644 security/nss/cmd/fbectest/testvecs.h create mode 100644 security/nss/cmd/fipstest/Makefile create mode 100644 security/nss/cmd/fipstest/README create mode 100644 security/nss/cmd/fipstest/fipstest.c create mode 100644 security/nss/cmd/fipstest/fipstest.gyp create mode 100644 security/nss/cmd/fipstest/manifest.mn create mode 100644 security/nss/cmd/httpserv/Makefile create mode 100644 security/nss/cmd/httpserv/httpserv.c create mode 100644 security/nss/cmd/httpserv/httpserv.gyp create mode 100644 security/nss/cmd/httpserv/manifest.mn create mode 100644 security/nss/cmd/lib/Makefile create mode 100644 security/nss/cmd/lib/basicutil.c create mode 100644 security/nss/cmd/lib/basicutil.h create mode 100644 security/nss/cmd/lib/berparse.c create mode 100644 security/nss/cmd/lib/derprint.c create mode 100644 security/nss/cmd/lib/exports.gyp create mode 100644 security/nss/cmd/lib/ffs.c create mode 100644 security/nss/cmd/lib/lib.gyp create mode 100644 security/nss/cmd/lib/manifest.mn create mode 100644 security/nss/cmd/lib/moreoids.c create mode 100644 security/nss/cmd/lib/pk11table.c create mode 100644 security/nss/cmd/lib/pk11table.h create mode 100644 security/nss/cmd/lib/pppolicy.c create mode 100644 security/nss/cmd/lib/secpwd.c create mode 100644 security/nss/cmd/lib/secutil.c create mode 100644 security/nss/cmd/lib/secutil.h create mode 100644 security/nss/cmd/libpkix/Makefile create mode 100644 security/nss/cmd/libpkix/manifest.mn create mode 100644 security/nss/cmd/libpkix/perf/Makefile create mode 100644 security/nss/cmd/libpkix/perf/libpkix_buildthreads.c create mode 100644 security/nss/cmd/libpkix/perf/manifest.mn create mode 100644 security/nss/cmd/libpkix/perf/nss_threads.c create mode 100644 security/nss/cmd/libpkix/pkix/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/certsel/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/certsel/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/certsel/test_certselector.c create mode 100644 security/nss/cmd/libpkix/pkix/certsel/test_comcertselparams.c create mode 100644 security/nss/cmd/libpkix/pkix/checker/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/checker/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/checker/test_certchainchecker.c create mode 100644 security/nss/cmd/libpkix/pkix/crlsel/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/crlsel/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/crlsel/test_comcrlselparams.c create mode 100644 security/nss/cmd/libpkix/pkix/crlsel/test_crlselector.c create mode 100644 security/nss/cmd/libpkix/pkix/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/params/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/params/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/params/test_procparams.c create mode 100644 security/nss/cmd/libpkix/pkix/params/test_resourcelimits.c create mode 100644 security/nss/cmd/libpkix/pkix/params/test_trustanchor.c create mode 100644 security/nss/cmd/libpkix/pkix/params/test_valparams.c create mode 100644 security/nss/cmd/libpkix/pkix/results/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/results/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/results/test_buildresult.c create mode 100644 security/nss/cmd/libpkix/pkix/results/test_policynode.c create mode 100644 security/nss/cmd/libpkix/pkix/results/test_valresult.c create mode 100644 security/nss/cmd/libpkix/pkix/results/test_verifynode.c create mode 100644 security/nss/cmd/libpkix/pkix/store/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/store/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/store/test_store.c create mode 100644 security/nss/cmd/libpkix/pkix/top/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/top/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/top/test_basicchecker.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_basicconstraintschecker.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_buildchain.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_buildchain_partialchain.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_buildchain_resourcelimits.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_buildchain_uchecker.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_customcrlchecker.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_defaultcrlchecker2stores.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_ocsp.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_policychecker.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_subjaltnamechecker.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_validatechain.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_validatechain_NB.c create mode 100644 security/nss/cmd/libpkix/pkix/top/test_validatechain_bc.c create mode 100644 security/nss/cmd/libpkix/pkix/util/Makefile create mode 100644 security/nss/cmd/libpkix/pkix/util/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix/util/test_error.c create mode 100644 security/nss/cmd/libpkix/pkix/util/test_list.c create mode 100644 security/nss/cmd/libpkix/pkix/util/test_list2.c create mode 100644 security/nss/cmd/libpkix/pkix/util/test_logger.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/Makefile create mode 100644 security/nss/cmd/libpkix/pkix_pl/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/Makefile create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/test_colcertstore.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/test_ekuchecker.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/test_httpcertstore.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/test_pk11certstore.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/module/test_socket.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/Makefile create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_authorityinfoaccess.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_cert.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_crl.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_crlentry.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_date.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_generalname.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_nameconstraints.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_subjectinfoaccess.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/pki/test_x500name.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/Makefile create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/stress_test.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_bigint.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_bytearray.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_hashtable.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_mem.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_monitorlock.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_mutex.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_mutex2.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_mutex3.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_object.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_oid.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_rwlock.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_string.c create mode 100644 security/nss/cmd/libpkix/pkix_pl/system/test_string2.c create mode 100755 security/nss/cmd/libpkix/pkixlibs.mk create mode 100755 security/nss/cmd/libpkix/pkixrules.mk create mode 100644 security/nss/cmd/libpkix/pkixutil/Makefile create mode 100644 security/nss/cmd/libpkix/pkixutil/manifest.mn create mode 100644 security/nss/cmd/libpkix/pkixutil/pkixutil.c create mode 100644 security/nss/cmd/libpkix/sample_apps/Makefile create mode 100644 security/nss/cmd/libpkix/sample_apps/build_chain.c create mode 100644 security/nss/cmd/libpkix/sample_apps/dumpcert.c create mode 100644 security/nss/cmd/libpkix/sample_apps/dumpcrl.c create mode 100644 security/nss/cmd/libpkix/sample_apps/manifest.mn create mode 100644 security/nss/cmd/libpkix/sample_apps/validate_chain.c create mode 100644 security/nss/cmd/libpkix/testutil/Makefile create mode 100644 security/nss/cmd/libpkix/testutil/config.mk create mode 100644 security/nss/cmd/libpkix/testutil/manifest.mn create mode 100644 security/nss/cmd/libpkix/testutil/pkixutil.def create mode 100644 security/nss/cmd/libpkix/testutil/testutil.c create mode 100644 security/nss/cmd/libpkix/testutil/testutil.h create mode 100644 security/nss/cmd/libpkix/testutil/testutil_nss.c create mode 100644 security/nss/cmd/libpkix/testutil/testutil_nss.h create mode 100644 security/nss/cmd/listsuites/Makefile create mode 100644 security/nss/cmd/listsuites/listsuites.c create mode 100644 security/nss/cmd/listsuites/listsuites.gyp create mode 100644 security/nss/cmd/listsuites/manifest.mn create mode 100644 security/nss/cmd/lowhashtest/Makefile create mode 100644 security/nss/cmd/lowhashtest/lowhashtest.c create mode 100644 security/nss/cmd/lowhashtest/lowhashtest.gyp create mode 100644 security/nss/cmd/lowhashtest/manifest.mn create mode 100644 security/nss/cmd/makepqg/Makefile create mode 100644 security/nss/cmd/makepqg/makepqg.c create mode 100644 security/nss/cmd/makepqg/makepqg.gyp create mode 100644 security/nss/cmd/makepqg/manifest.mn create mode 100644 security/nss/cmd/makepqg/testit.ksh create mode 100644 security/nss/cmd/manifest.mn create mode 100644 security/nss/cmd/modutil/Makefile create mode 100644 security/nss/cmd/modutil/README create mode 100644 security/nss/cmd/modutil/error.h create mode 100644 security/nss/cmd/modutil/install-ds.c create mode 100644 security/nss/cmd/modutil/install-ds.h create mode 100644 security/nss/cmd/modutil/install.c create mode 100644 security/nss/cmd/modutil/install.h create mode 100644 security/nss/cmd/modutil/installparse.c create mode 100644 security/nss/cmd/modutil/installparse.h create mode 100644 security/nss/cmd/modutil/installparse.l create mode 100644 security/nss/cmd/modutil/installparse.y create mode 100644 security/nss/cmd/modutil/instsec.c create mode 100644 security/nss/cmd/modutil/lex.Pk11Install_yy.c create mode 100644 security/nss/cmd/modutil/manifest.mn create mode 100644 security/nss/cmd/modutil/modutil.c create mode 100644 security/nss/cmd/modutil/modutil.gyp create mode 100644 security/nss/cmd/modutil/modutil.h create mode 100644 security/nss/cmd/modutil/pk11.c create mode 100644 security/nss/cmd/modutil/pk11jar.html create mode 100644 security/nss/cmd/modutil/rules.mk create mode 100644 security/nss/cmd/modutil/specification.html create mode 100644 security/nss/cmd/mpitests/mpi-test.c create mode 100644 security/nss/cmd/mpitests/mpitests.gyp create mode 100644 security/nss/cmd/mpitests/test-info.c create mode 100644 security/nss/cmd/multinit/Makefile create mode 100644 security/nss/cmd/multinit/manifest.mn create mode 100644 security/nss/cmd/multinit/multinit.c create mode 100644 security/nss/cmd/multinit/multinit.gyp create mode 100644 security/nss/cmd/nss-policy-check/Makefile create mode 100644 security/nss/cmd/nss-policy-check/manifest.mn create mode 100644 security/nss/cmd/nss-policy-check/nss-policy-check.c create mode 100644 security/nss/cmd/nss-policy-check/nss-policy-check.gyp create mode 100644 security/nss/cmd/ocspclnt/Makefile create mode 100644 security/nss/cmd/ocspclnt/manifest.mn create mode 100644 security/nss/cmd/ocspclnt/ocspclnt.c create mode 100644 security/nss/cmd/ocspclnt/ocspclnt.gyp create mode 100644 security/nss/cmd/ocspresp/Makefile create mode 100644 security/nss/cmd/ocspresp/manifest.mn create mode 100644 security/nss/cmd/ocspresp/ocspresp.c create mode 100644 security/nss/cmd/ocspresp/ocspresp.gyp create mode 100644 security/nss/cmd/oidcalc/Makefile create mode 100644 security/nss/cmd/oidcalc/manifest.mn create mode 100644 security/nss/cmd/oidcalc/oidcalc.c create mode 100644 security/nss/cmd/oidcalc/oidcalc.gyp create mode 100644 security/nss/cmd/p7content/Makefile create mode 100644 security/nss/cmd/p7content/manifest.mn create mode 100644 security/nss/cmd/p7content/p7content.c create mode 100644 security/nss/cmd/p7content/p7content.gyp create mode 100644 security/nss/cmd/p7env/Makefile create mode 100644 security/nss/cmd/p7env/manifest.mn create mode 100644 security/nss/cmd/p7env/p7env.c create mode 100644 security/nss/cmd/p7env/p7env.gyp create mode 100644 security/nss/cmd/p7sign/Makefile create mode 100644 security/nss/cmd/p7sign/manifest.mn create mode 100644 security/nss/cmd/p7sign/p7sign.c create mode 100644 security/nss/cmd/p7sign/p7sign.gyp create mode 100644 security/nss/cmd/p7verify/Makefile create mode 100644 security/nss/cmd/p7verify/manifest.mn create mode 100644 security/nss/cmd/p7verify/p7verify.c create mode 100644 security/nss/cmd/p7verify/p7verify.gyp create mode 100644 security/nss/cmd/pk11ectest/Makefile create mode 100644 security/nss/cmd/pk11ectest/manifest.mn create mode 100644 security/nss/cmd/pk11ectest/pk11ectest.c create mode 100644 security/nss/cmd/pk11ectest/pk11ectest.gyp create mode 100644 security/nss/cmd/pk11gcmtest/Makefile create mode 100644 security/nss/cmd/pk11gcmtest/manifest.mn create mode 100644 security/nss/cmd/pk11gcmtest/pk11gcmtest.c create mode 100644 security/nss/cmd/pk11gcmtest/pk11gcmtest.gyp create mode 100644 security/nss/cmd/pk11gcmtest/tests/README create mode 100644 security/nss/cmd/pk11gcmtest/tests/gcmDecrypt128.rsp create mode 100644 security/nss/cmd/pk11gcmtest/tests/gcmDecrypt192.rsp create mode 100644 security/nss/cmd/pk11gcmtest/tests/gcmDecrypt256.rsp create mode 100644 security/nss/cmd/pk11gcmtest/tests/gcmEncryptExtIV128.rsp create mode 100644 security/nss/cmd/pk11gcmtest/tests/gcmEncryptExtIV192.rsp create mode 100644 security/nss/cmd/pk11gcmtest/tests/gcmEncryptExtIV256.rsp create mode 100644 security/nss/cmd/pk11importtest/Makefile create mode 100644 security/nss/cmd/pk11importtest/manifest.mn create mode 100644 security/nss/cmd/pk11importtest/pk11importtest.c create mode 100644 security/nss/cmd/pk11importtest/pk11importtest.gyp create mode 100644 security/nss/cmd/pk11mode/Makefile create mode 100644 security/nss/cmd/pk11mode/manifest.mn create mode 100644 security/nss/cmd/pk11mode/pk11mode.c create mode 100644 security/nss/cmd/pk11mode/pk11mode.gyp create mode 100644 security/nss/cmd/pk11util/Makefile create mode 100644 security/nss/cmd/pk11util/manifest.mn create mode 100644 security/nss/cmd/pk11util/pk11util.c create mode 100644 security/nss/cmd/pk11util/scripts/dosign create mode 100644 security/nss/cmd/pk11util/scripts/hssign create mode 100644 security/nss/cmd/pk11util/scripts/lcert create mode 100644 security/nss/cmd/pk11util/scripts/mechanisms create mode 100644 security/nss/cmd/pk11util/scripts/pLabel1 create mode 100644 security/nss/cmd/pk11util/scripts/pMechanisms create mode 100644 security/nss/cmd/pk11util/scripts/pcert create mode 100644 security/nss/cmd/pk12util/Makefile create mode 100644 security/nss/cmd/pk12util/manifest.mn create mode 100644 security/nss/cmd/pk12util/pk12util.c create mode 100644 security/nss/cmd/pk12util/pk12util.gyp create mode 100644 security/nss/cmd/pk12util/pk12util.h create mode 100644 security/nss/cmd/pk1sign/Makefile create mode 100644 security/nss/cmd/pk1sign/manifest.mn create mode 100644 security/nss/cmd/pk1sign/pk1sign.c create mode 100644 security/nss/cmd/pk1sign/pk1sign.gyp create mode 100644 security/nss/cmd/pkix-errcodes/Makefile create mode 100644 security/nss/cmd/pkix-errcodes/manifest.mn create mode 100644 security/nss/cmd/pkix-errcodes/pkix-errcodes.c create mode 100644 security/nss/cmd/pkix-errcodes/pkix-errcodes.gyp create mode 100644 security/nss/cmd/platlibs.gypi create mode 100644 security/nss/cmd/platlibs.mk create mode 100644 security/nss/cmd/platrules.mk create mode 100644 security/nss/cmd/pp/Makefile create mode 100644 security/nss/cmd/pp/manifest.mn create mode 100644 security/nss/cmd/pp/pp.c create mode 100644 security/nss/cmd/pp/pp.gyp create mode 100644 security/nss/cmd/ppcertdata/Makefile create mode 100644 security/nss/cmd/ppcertdata/manifest.mn create mode 100644 security/nss/cmd/ppcertdata/ppcertdata.c create mode 100644 security/nss/cmd/pwdecrypt/Makefile create mode 100644 security/nss/cmd/pwdecrypt/manifest.mn create mode 100644 security/nss/cmd/pwdecrypt/pwdecrypt.c create mode 100644 security/nss/cmd/pwdecrypt/pwdecrypt.gyp create mode 100644 security/nss/cmd/rsaperf/Makefile create mode 100644 security/nss/cmd/rsaperf/defkey.c create mode 100644 security/nss/cmd/rsaperf/manifest.mn create mode 100644 security/nss/cmd/rsaperf/rsaperf.c create mode 100644 security/nss/cmd/rsaperf/rsaperf.gyp create mode 100644 security/nss/cmd/rsapoptst/Makefile create mode 100644 security/nss/cmd/rsapoptst/manifest.mn create mode 100644 security/nss/cmd/rsapoptst/rsapoptst.c create mode 100644 security/nss/cmd/rsapoptst/rsapoptst.gyp create mode 100644 security/nss/cmd/samples/cert create mode 100644 security/nss/cmd/samples/cert0 create mode 100644 security/nss/cmd/samples/cert1 create mode 100644 security/nss/cmd/samples/cert2 create mode 100644 security/nss/cmd/samples/pkcs7.ber create mode 100644 security/nss/cmd/samples/pkcs7bday.ber create mode 100644 security/nss/cmd/samples/pkcs7cnet.ber create mode 100644 security/nss/cmd/samples/pkcs7news.ber create mode 100644 security/nss/cmd/samples/x509v3.der create mode 100644 security/nss/cmd/samples/x509v3.txt create mode 100644 security/nss/cmd/sdbthreadtst/Makefile create mode 100644 security/nss/cmd/sdbthreadtst/manifest.mn create mode 100644 security/nss/cmd/sdbthreadtst/sdbthreadtst.c create mode 100644 security/nss/cmd/sdbthreadtst/sdbthreadtst.gyp create mode 100644 security/nss/cmd/sdrtest/Makefile create mode 100644 security/nss/cmd/sdrtest/manifest.mn create mode 100644 security/nss/cmd/sdrtest/sdrtest.c create mode 100644 security/nss/cmd/sdrtest/sdrtest.gyp create mode 100644 security/nss/cmd/selfserv/Makefile create mode 100644 security/nss/cmd/selfserv/manifest.mn create mode 100644 security/nss/cmd/selfserv/selfserv.c create mode 100644 security/nss/cmd/selfserv/selfserv.gyp create mode 100644 security/nss/cmd/shlibsign/Makefile create mode 100644 security/nss/cmd/shlibsign/mangle/Makefile create mode 100644 security/nss/cmd/shlibsign/mangle/mangle.c create mode 100644 security/nss/cmd/shlibsign/mangle/mangle.gyp create mode 100644 security/nss/cmd/shlibsign/mangle/manifest.mn create mode 100644 security/nss/cmd/shlibsign/manifest.mn create mode 100644 security/nss/cmd/shlibsign/shlibsign.c create mode 100644 security/nss/cmd/shlibsign/shlibsign.gyp create mode 100644 security/nss/cmd/shlibsign/sign.cmd create mode 100644 security/nss/cmd/shlibsign/sign.sh create mode 100644 security/nss/cmd/signtool/Makefile create mode 100644 security/nss/cmd/signtool/README create mode 100644 security/nss/cmd/signtool/certgen.c create mode 100644 security/nss/cmd/signtool/javascript.c create mode 100644 security/nss/cmd/signtool/list.c create mode 100644 security/nss/cmd/signtool/manifest.mn create mode 100644 security/nss/cmd/signtool/sign.c create mode 100644 security/nss/cmd/signtool/signtool.c create mode 100644 security/nss/cmd/signtool/signtool.gyp create mode 100644 security/nss/cmd/signtool/signtool.h create mode 100644 security/nss/cmd/signtool/util.c create mode 100644 security/nss/cmd/signtool/verify.c create mode 100644 security/nss/cmd/signtool/zip.c create mode 100644 security/nss/cmd/signtool/zip.h create mode 100644 security/nss/cmd/signver/Makefile create mode 100755 security/nss/cmd/signver/examples/1/form.pl create mode 100644 security/nss/cmd/signver/examples/1/signedForm.html create mode 100644 security/nss/cmd/signver/examples/1/signedForm.nt.html create mode 100755 security/nss/cmd/signver/examples/1/signedForm.pl create mode 100644 security/nss/cmd/signver/manifest.mn create mode 100644 security/nss/cmd/signver/pk7print.c create mode 100644 security/nss/cmd/signver/signver.c create mode 100644 security/nss/cmd/signver/signver.gyp create mode 100644 security/nss/cmd/smimetools/Makefile create mode 100644 security/nss/cmd/smimetools/cmsutil.c create mode 100644 security/nss/cmd/smimetools/manifest.mn create mode 100644 security/nss/cmd/smimetools/rules.mk create mode 100755 security/nss/cmd/smimetools/smime create mode 100644 security/nss/cmd/smimetools/smimetools.gyp create mode 100644 security/nss/cmd/ssltap/Makefile create mode 100644 security/nss/cmd/ssltap/manifest.mn create mode 100644 security/nss/cmd/ssltap/ssltap-manual.html create mode 100644 security/nss/cmd/ssltap/ssltap.c create mode 100644 security/nss/cmd/ssltap/ssltap.gyp create mode 100644 security/nss/cmd/strsclnt/Makefile create mode 100644 security/nss/cmd/strsclnt/manifest.mn create mode 100644 security/nss/cmd/strsclnt/strsclnt.c create mode 100644 security/nss/cmd/strsclnt/strsclnt.gyp create mode 100644 security/nss/cmd/symkeyutil/Makefile create mode 100644 security/nss/cmd/symkeyutil/manifest.mn create mode 100644 security/nss/cmd/symkeyutil/symkey.man create mode 100644 security/nss/cmd/symkeyutil/symkeyutil.c create mode 100644 security/nss/cmd/symkeyutil/symkeyutil.gyp create mode 100644 security/nss/cmd/tests/Makefile create mode 100644 security/nss/cmd/tests/baddbdir.c create mode 100644 security/nss/cmd/tests/conflict.c create mode 100644 security/nss/cmd/tests/dertimetest.c create mode 100644 security/nss/cmd/tests/encodeinttest.c create mode 100644 security/nss/cmd/tests/manifest.mn create mode 100644 security/nss/cmd/tests/nonspr10.c create mode 100644 security/nss/cmd/tests/remtest.c create mode 100644 security/nss/cmd/tests/secmodtest.c create mode 100644 security/nss/cmd/tests/tests.gyp create mode 100644 security/nss/cmd/tstclnt/Makefile create mode 100644 security/nss/cmd/tstclnt/manifest.mn create mode 100644 security/nss/cmd/tstclnt/tstclnt.c create mode 100644 security/nss/cmd/tstclnt/tstclnt.gyp create mode 100644 security/nss/cmd/validation/Makefile create mode 100644 security/nss/cmd/validation/manifest.mn create mode 100644 security/nss/cmd/validation/validation.c create mode 100644 security/nss/cmd/validation/validation.gyp create mode 100644 security/nss/cmd/vfychain/Makefile create mode 100644 security/nss/cmd/vfychain/manifest.mn create mode 100644 security/nss/cmd/vfychain/vfychain.c create mode 100644 security/nss/cmd/vfychain/vfychain.gyp create mode 100644 security/nss/cmd/vfyserv/Makefile create mode 100644 security/nss/cmd/vfyserv/manifest.mn create mode 100644 security/nss/cmd/vfyserv/vfyserv.c create mode 100644 security/nss/cmd/vfyserv/vfyserv.gyp create mode 100644 security/nss/cmd/vfyserv/vfyserv.h create mode 100644 security/nss/cmd/vfyserv/vfyutil.c (limited to 'security/nss/cmd') diff --git a/security/nss/cmd/Makefile b/security/nss/cmd/Makefile new file mode 100644 index 0000000000..292c737239 --- /dev/null +++ b/security/nss/cmd/Makefile @@ -0,0 +1,46 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +CORE_DEPTH = .. +DEPTH = .. + +include manifest.mn +include $(CORE_DEPTH)/coreconf/config.mk + +ifdef BUILD_LIBPKIX_TESTS +DIRS += libpkix +endif + +ifeq ($(NSS_BUILD_WITHOUT_SOFTOKEN),1) +BLTEST_SRCDIR = +ECPERF_SRCDIR = +FREEBL_ECTEST_SRCDIR = +FIPSTEST_SRCDIR = +SHLIBSIGN_SRCDIR = +else +BLTEST_SRCDIR = bltest +ECPERF_SRCDIR = ecperf +FREEBL_ECTEST_SRCDIR = fbectest +FIPSTEST_SRCDIR = fipstest +SHLIBSIGN_SRCDIR = shlibsign +endif + +LOWHASHTEST_SRCDIR= +ifeq ($(FREEBL_LOWHASH),1) +LOWHASHTEST_SRCDIR = lowhashtest # Add the lowhashtest directory to DIRS. +endif + +INCLUDES += \ + -I$(DIST)/../public/security \ + -I./include \ + $(NULL) + +$(SOFTOKEN_SRCDIRS) $(NSS_SRCDIRS): $(LIB_SRCDIRS) + +include $(CORE_DEPTH)/coreconf/rules.mk + +symbols: + @echo "TARGETS = $(TARGETS)" diff --git a/security/nss/cmd/addbuiltin/Makefile b/security/nss/cmd/addbuiltin/Makefile new file mode 100644 index 0000000000..74ae200208 --- /dev/null +++ b/security/nss/cmd/addbuiltin/Makefile @@ -0,0 +1,48 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + +include ../platrules.mk + diff --git a/security/nss/cmd/addbuiltin/addbuiltin.c b/security/nss/cmd/addbuiltin/addbuiltin.c new file mode 100644 index 0000000000..da2533144e --- /dev/null +++ b/security/nss/cmd/addbuiltin/addbuiltin.c @@ -0,0 +1,610 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* + * Tool for converting builtin CA certs. + */ + +#include "nssrenam.h" +#include "nss.h" +#include "cert.h" +#include "certdb.h" +#include "secutil.h" +#include "pk11func.h" + +#if defined(WIN32) +#include +#include +#endif + +void +dumpbytes(unsigned char *buf, int len) +{ + int i; + for (i = 0; i < len; i++) { + if ((i != 0) && ((i & 0xf) == 0)) { + printf("\n"); + } + printf("\\%03o", buf[i]); + } + printf("\n"); +} + +int +hasPositiveTrust(unsigned int trust) +{ + if (trust & CERTDB_TRUSTED) { + if (trust & CERTDB_TRUSTED_CA) { + return PR_TRUE; + } else { + return PR_FALSE; + } + } else { + if (trust & CERTDB_TRUSTED_CA) { + return PR_TRUE; + } else if (trust & CERTDB_VALID_CA) { + return PR_TRUE; + } else if (trust & CERTDB_TERMINAL_RECORD) { + return PR_FALSE; + } else { + return PR_FALSE; + } + } + return PR_FALSE; +} + +char * +getTrustString(unsigned int trust) +{ + if (trust & CERTDB_TRUSTED) { + if (trust & CERTDB_TRUSTED_CA) { + return "CKT_NSS_TRUSTED_DELEGATOR"; + } else { + return "CKT_NSS_TRUSTED"; + } + } else { + if (trust & CERTDB_TRUSTED_CA) { + return "CKT_NSS_TRUSTED_DELEGATOR"; + } else if (trust & CERTDB_VALID_CA) { + return "CKT_NSS_VALID_DELEGATOR"; + } else if (trust & CERTDB_TERMINAL_RECORD) { + return "CKT_NSS_NOT_TRUSTED"; + } else { + return "CKT_NSS_MUST_VERIFY_TRUST"; + } + } +} + +static const SEC_ASN1Template serialTemplate[] = { + { SEC_ASN1_INTEGER, offsetof(CERTCertificate, serialNumber) }, + { 0 } +}; + +void +print_crl_info(CERTName *name, SECItem *serial) +{ + PRBool saveWrapeState = SECU_GetWrapEnabled(); + SECU_EnableWrap(PR_FALSE); + + SECU_PrintNameQuotesOptional(stdout, name, "# Issuer", 0, PR_FALSE); + printf("\n"); + + SECU_PrintInteger(stdout, serial, "# Serial Number", 0); + + SECU_EnableWrap(saveWrapeState); +} + +static SECStatus +ConvertCRLEntry(SECItem *sdder, PRInt32 crlentry, char *nickname) +{ + int rv; + PLArenaPool *arena = NULL; + CERTSignedCrl *newCrl = NULL; + CERTCrlEntry *entry; + + CERTName *name = NULL; + SECItem *derName = NULL; + SECItem *serial = NULL; + + rv = SEC_ERROR_NO_MEMORY; + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) + return rv; + + newCrl = CERT_DecodeDERCrlWithFlags(arena, sdder, SEC_CRL_TYPE, + CRL_DECODE_DEFAULT_OPTIONS); + if (!newCrl) + return SECFailure; + + name = &newCrl->crl.name; + derName = &newCrl->crl.derName; + + if (newCrl->crl.entries != NULL) { + PRInt32 iv = 0; + while ((entry = newCrl->crl.entries[iv++]) != NULL) { + if (crlentry == iv) { + serial = &entry->serialNumber; + break; + } + } + } + + if (!name || !derName || !serial) + return SECFailure; + + printf("\n# Distrust \"%s\"\n", nickname); + print_crl_info(name, serial); + + printf("CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST\n"); + printf("CKA_TOKEN CK_BBOOL CK_TRUE\n"); + printf("CKA_PRIVATE CK_BBOOL CK_FALSE\n"); + printf("CKA_MODIFIABLE CK_BBOOL CK_FALSE\n"); + printf("CKA_LABEL UTF8 \"%s\"\n", nickname); + + printf("CKA_ISSUER MULTILINE_OCTAL\n"); + dumpbytes(derName->data, derName->len); + printf("END\n"); + printf("CKA_SERIAL_NUMBER MULTILINE_OCTAL\n"); + printf("\\002\\%03o", serial->len); /* 002: type integer; len >=3 digits */ + dumpbytes(serial->data, serial->len); + printf("END\n"); + + printf("CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_NOT_TRUSTED\n"); + printf("CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_NOT_TRUSTED\n"); + printf("CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_NOT_TRUSTED\n"); + printf("CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE\n"); + + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +void +print_info(SECItem *sdder, CERTCertificate *c) +{ + PRBool saveWrapeState = SECU_GetWrapEnabled(); + SECU_EnableWrap(PR_FALSE); + + SECU_PrintNameQuotesOptional(stdout, &c->issuer, "# Issuer", 0, PR_FALSE); + printf("\n"); + + SECU_PrintInteger(stdout, &c->serialNumber, "# Serial Number", 0); + + SECU_PrintNameQuotesOptional(stdout, &c->subject, "# Subject", 0, PR_FALSE); + printf("\n"); + + SECU_PrintTimeChoice(stdout, &c->validity.notBefore, "# Not Valid Before", 0); + SECU_PrintTimeChoice(stdout, &c->validity.notAfter, "# Not Valid After ", 0); + + SECU_PrintFingerprints(stdout, sdder, "# Fingerprint", 0); + + SECU_EnableWrap(saveWrapeState); +} + +static SECStatus +ConvertCertificate(SECItem *sdder, char *nickname, CERTCertTrust *trust, + PRBool excludeCert, PRBool excludeHash) +{ + SECStatus rv = SECSuccess; + CERTCertificate *cert; + unsigned char sha1_hash[SHA1_LENGTH]; + unsigned char md5_hash[MD5_LENGTH]; + SECItem *serial = NULL; + PRBool step_up = PR_FALSE; + const char *trust_info; + + cert = CERT_DecodeDERCertificate(sdder, PR_FALSE, nickname); + if (!cert) { + return SECFailure; + } + serial = SEC_ASN1EncodeItem(NULL, NULL, cert, serialTemplate); + if (!serial) { + return SECFailure; + } + + if (!excludeCert) { + printf("\n#\n# Certificate \"%s\"\n#\n", nickname); + print_info(sdder, cert); + printf("CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE\n"); + printf("CKA_TOKEN CK_BBOOL CK_TRUE\n"); + printf("CKA_PRIVATE CK_BBOOL CK_FALSE\n"); + printf("CKA_MODIFIABLE CK_BBOOL CK_FALSE\n"); + printf("CKA_LABEL UTF8 \"%s\"\n", nickname); + printf("CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509\n"); + printf("CKA_SUBJECT MULTILINE_OCTAL\n"); + dumpbytes(cert->derSubject.data, cert->derSubject.len); + printf("END\n"); + printf("CKA_ID UTF8 \"0\"\n"); + printf("CKA_ISSUER MULTILINE_OCTAL\n"); + dumpbytes(cert->derIssuer.data, cert->derIssuer.len); + printf("END\n"); + printf("CKA_SERIAL_NUMBER MULTILINE_OCTAL\n"); + dumpbytes(serial->data, serial->len); + printf("END\n"); + printf("CKA_VALUE MULTILINE_OCTAL\n"); + dumpbytes(sdder->data, sdder->len); + printf("END\n"); + if (hasPositiveTrust(trust->sslFlags) || + hasPositiveTrust(trust->emailFlags) || + hasPositiveTrust(trust->objectSigningFlags)) { + printf("CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE\n"); + } + printf("CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE\n"); + printf("CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE\n"); + } + + if ((trust->sslFlags | trust->emailFlags | trust->objectSigningFlags) == + CERTDB_TERMINAL_RECORD) + trust_info = "Distrust"; + else + trust_info = "Trust for"; + + printf("\n# %s \"%s\"\n", trust_info, nickname); + print_info(sdder, cert); + + printf("CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST\n"); + printf("CKA_TOKEN CK_BBOOL CK_TRUE\n"); + printf("CKA_PRIVATE CK_BBOOL CK_FALSE\n"); + printf("CKA_MODIFIABLE CK_BBOOL CK_FALSE\n"); + printf("CKA_LABEL UTF8 \"%s\"\n", nickname); + + if (!excludeHash) { + PK11_HashBuf(SEC_OID_SHA1, sha1_hash, sdder->data, sdder->len); + printf("CKA_CERT_SHA1_HASH MULTILINE_OCTAL\n"); + dumpbytes(sha1_hash, SHA1_LENGTH); + printf("END\n"); + PK11_HashBuf(SEC_OID_MD5, md5_hash, sdder->data, sdder->len); + printf("CKA_CERT_MD5_HASH MULTILINE_OCTAL\n"); + dumpbytes(md5_hash, MD5_LENGTH); + printf("END\n"); + } + + printf("CKA_ISSUER MULTILINE_OCTAL\n"); + dumpbytes(cert->derIssuer.data, cert->derIssuer.len); + printf("END\n"); + printf("CKA_SERIAL_NUMBER MULTILINE_OCTAL\n"); + dumpbytes(serial->data, serial->len); + printf("END\n"); + + printf("CKA_TRUST_SERVER_AUTH CK_TRUST %s\n", + getTrustString(trust->sslFlags)); + printf("CKA_TRUST_EMAIL_PROTECTION CK_TRUST %s\n", + getTrustString(trust->emailFlags)); + printf("CKA_TRUST_CODE_SIGNING CK_TRUST %s\n", + getTrustString(trust->objectSigningFlags)); +#ifdef notdef + printf("CKA_TRUST_CLIENT_AUTH CK_TRUST CKT_NSS_TRUSTED\n"); + printf("CKA_TRUST_DIGITAL_SIGNATURE CK_TRUST CKT_NSS_TRUSTED_DELEGATOR\n"); + printf("CKA_TRUST_NON_REPUDIATION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR\n"); + printf("CKA_TRUST_KEY_ENCIPHERMENT CK_TRUST CKT_NSS_TRUSTED_DELEGATOR\n"); + printf("CKA_TRUST_DATA_ENCIPHERMENT CK_TRUST CKT_NSS_TRUSTED_DELEGATOR\n"); + printf("CKA_TRUST_KEY_AGREEMENT CK_TRUST CKT_NSS_TRUSTED_DELEGATOR\n"); + printf("CKA_TRUST_KEY_CERT_SIGN CK_TRUST CKT_NSS_TRUSTED_DELEGATOR\n"); +#endif + + step_up = (trust->sslFlags & CERTDB_GOVT_APPROVED_CA); + printf("CKA_TRUST_STEP_UP_APPROVED CK_BBOOL %s\n", + step_up ? "CK_TRUE" : "CK_FALSE"); + + PORT_Free(sdder->data); + return (rv); +} + +void +printheader() +{ + printf("# \n" + "# This Source Code Form is subject to the terms of the Mozilla Public\n" + "# License, v. 2.0. If a copy of the MPL was not distributed with this\n" + "# file, You can obtain one at http://mozilla.org/MPL/2.0/.\n" + "#\n" + "# certdata.txt\n" + "#\n" + "# This file contains the object definitions for the certs and other\n" + "# information \"built into\" NSS.\n" + "#\n" + "# Object definitions:\n" + "#\n" + "# Certificates\n" + "#\n" + "# -- Attribute -- -- type -- -- value --\n" + "# CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE\n" + "# CKA_TOKEN CK_BBOOL CK_TRUE\n" + "# CKA_PRIVATE CK_BBOOL CK_FALSE\n" + "# CKA_MODIFIABLE CK_BBOOL CK_FALSE\n" + "# CKA_LABEL UTF8 (varies)\n" + "# CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509\n" + "# CKA_SUBJECT DER+base64 (varies)\n" + "# CKA_ID byte array (varies)\n" + "# CKA_ISSUER DER+base64 (varies)\n" + "# CKA_SERIAL_NUMBER DER+base64 (varies)\n" + "# CKA_VALUE DER+base64 (varies)\n" + "# CKA_NSS_EMAIL ASCII7 (unused here)\n" + "# CKA_NSS_SERVER_DISTRUST_AFTER DER+base64 (varies)\n" + "# CKA_NSS_EMAIL_DISTRUST_AFTER DER+base64 (varies)\n" + "#\n" + "# Trust\n" + "#\n" + "# -- Attribute -- -- type -- -- value --\n" + "# CKA_CLASS CK_OBJECT_CLASS CKO_TRUST\n" + "# CKA_TOKEN CK_BBOOL CK_TRUE\n" + "# CKA_PRIVATE CK_BBOOL CK_FALSE\n" + "# CKA_MODIFIABLE CK_BBOOL CK_FALSE\n" + "# CKA_LABEL UTF8 (varies)\n" + "# CKA_ISSUER DER+base64 (varies)\n" + "# CKA_SERIAL_NUMBER DER+base64 (varies)\n" + "# CKA_CERT_HASH binary+base64 (varies)\n" + "# CKA_EXPIRES CK_DATE (not used here)\n" + "# CKA_TRUST_DIGITAL_SIGNATURE CK_TRUST (varies)\n" + "# CKA_TRUST_NON_REPUDIATION CK_TRUST (varies)\n" + "# CKA_TRUST_KEY_ENCIPHERMENT CK_TRUST (varies)\n" + "# CKA_TRUST_DATA_ENCIPHERMENT CK_TRUST (varies)\n" + "# CKA_TRUST_KEY_AGREEMENT CK_TRUST (varies)\n" + "# CKA_TRUST_KEY_CERT_SIGN CK_TRUST (varies)\n" + "# CKA_TRUST_CRL_SIGN CK_TRUST (varies)\n" + "# CKA_TRUST_SERVER_AUTH CK_TRUST (varies)\n" + "# CKA_TRUST_CLIENT_AUTH CK_TRUST (varies)\n" + "# CKA_TRUST_CODE_SIGNING CK_TRUST (varies)\n" + "# CKA_TRUST_EMAIL_PROTECTION CK_TRUST (varies)\n" + "# CKA_TRUST_IPSEC_END_SYSTEM CK_TRUST (varies)\n" + "# CKA_TRUST_IPSEC_TUNNEL CK_TRUST (varies)\n" + "# CKA_TRUST_IPSEC_USER CK_TRUST (varies)\n" + "# CKA_TRUST_TIME_STAMPING CK_TRUST (varies)\n" + "# (other trust attributes can be defined)\n" + "#\n" + "\n" + "#\n" + "# The object to tell NSS that this is a root list and we don't\n" + "# have to go looking for others.\n" + "#\n" + "BEGINDATA\n" + "CKA_CLASS CK_OBJECT_CLASS CKO_NSS_BUILTIN_ROOT_LIST\n" + "CKA_TOKEN CK_BBOOL CK_TRUE\n" + "CKA_PRIVATE CK_BBOOL CK_FALSE\n" + "CKA_MODIFIABLE CK_BBOOL CK_FALSE\n" + "CKA_LABEL UTF8 \"Mozilla Builtin Roots\"\n"); +} + +static void +Usage(char *progName) +{ + fprintf(stderr, "%s -t trust -n nickname [-i certfile] [-c] [-h]\n", progName); + fprintf(stderr, + "\tRead a der-encoded cert from certfile or stdin, and output\n" + "\tit to stdout in a format suitable for the builtin root module.\n" + "\tExample: %s -n MyCA -t \"C,C,C\" -i myca.der >> certdata.txt\n", + progName); + fprintf(stderr, "%s -D -n label [-i certfile]\n", progName); + fprintf(stderr, + "\tRead a der-encoded cert from certfile or stdin, and output\n" + "\ta distrust record.\n" + "\t(-D is equivalent to -t p,p,p -c -h)\n"); + fprintf(stderr, "%s -C -e crl-entry-number -n label [-i crlfile]\n", progName); + fprintf(stderr, + "\tRead a CRL from crlfile or stdin, and output\n" + "\ta distrust record (issuer+serial).\n" + "\t(-C implies -c -h)\n"); + fprintf(stderr, "%-15s trust flags (cCTpPuw).\n", "-t trust"); + fprintf(stderr, "%-15s nickname to assign to builtin cert, or\n", + "-n nickname"); + fprintf(stderr, "%-15s a label for the distrust record.\n", ""); + fprintf(stderr, "%-15s exclude the certificate (only add a trust record)\n", "-c"); + fprintf(stderr, "%-15s exclude hash from trust record\n", "-h"); + fprintf(stderr, "%-15s (useful to distrust any matching issuer/serial)\n", ""); + fprintf(stderr, "%-15s (not allowed when adding positive trust)\n", ""); + fprintf(stderr, "%-15s a CRL entry number, as shown by \"crlutil -S\"\n", "-e"); + fprintf(stderr, "%-15s input file to read (default stdin)\n", "-i file"); + fprintf(stderr, "%-15s (pipe through atob if the cert is b64-encoded)\n", ""); + fprintf(stderr, "%-15s convert a timestamp to DER, and output.\n", "-d timestamp"); + fprintf(stderr, "%-15s useful to fill server and email distrust fields\n", ""); + fprintf(stderr, "%-15s Example: %s -d 1561939200\n", "", progName); + fprintf(stderr, "%-15s NOTE: The informed timestamp are interpreted as seconds\n", ""); + fprintf(stderr, "%-15s since unix epoch.\n", ""); + fprintf(stderr, "%-15s TIP: date -d \"2019-07-01 00:00:00 UTC\" +%%s\n", ""); + exit(-1); +} + +enum { + opt_Input = 0, + opt_Nickname, + opt_Trust, + opt_Distrust, + opt_ExcludeCert, + opt_ExcludeHash, + opt_DistrustCRL, + opt_CRLEntry, + opt_ConvertDate +}; + +static secuCommandFlag addbuiltin_options[] = { + { /* opt_Input */ 'i', PR_TRUE, 0, PR_FALSE }, + { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE }, + { /* opt_Trust */ 't', PR_TRUE, 0, PR_FALSE }, + { /* opt_Distrust */ 'D', PR_FALSE, 0, PR_FALSE }, + { /* opt_ExcludeCert */ 'c', PR_FALSE, 0, PR_FALSE }, + { /* opt_ExcludeHash */ 'h', PR_FALSE, 0, PR_FALSE }, + { /* opt_DistrustCRL */ 'C', PR_FALSE, 0, PR_FALSE }, + { /* opt_CRLEntry */ 'e', PR_TRUE, 0, PR_FALSE }, + { /* opt_ConvertDate */ 'd', PR_TRUE, 0, PR_FALSE }, +}; + +int +main(int argc, char **argv) +{ + SECStatus rv; + char *nickname = NULL; + char *trusts = NULL; + char *progName; + PRFileDesc *infile; + CERTCertTrust trust = { 0 }; + SECItem derItem = { 0 }; + PRInt32 crlentry = 0; + PRInt32 mutuallyExclusiveOpts = 0; + PRBool decodeTrust = PR_FALSE; + + secuCommand addbuiltin = { 0 }; + addbuiltin.numOptions = sizeof(addbuiltin_options) / sizeof(secuCommandFlag); + addbuiltin.options = addbuiltin_options; + + progName = strrchr(argv[0], '/'); + progName = progName ? progName + 1 : argv[0]; + + rv = SECU_ParseCommandLine(argc, argv, progName, &addbuiltin); + + if (rv != SECSuccess) + Usage(progName); + + if (addbuiltin.options[opt_ConvertDate].activated) { + char *endPtr; + PRTime distrustTimestamp = strtol(addbuiltin.options[opt_ConvertDate].arg, &endPtr, 0) * PR_USEC_PER_SEC; + if (*endPtr != '\0' && distrustTimestamp > 0) { + Usage(progName); + exit(1); + } + SECItem encTime; + DER_EncodeTimeChoice(NULL, &encTime, distrustTimestamp); + SECU_PrintTimeChoice(stdout, &encTime, "The timestamp represents this date", 0); + printf("Locate the entry of the desired certificate in certdata.txt\n" + "Erase the CKA_NSS_[SERVER|EMAIL]_DISTRUST_AFTER CK_BBOOL CK_FALSE\n" + "And override with the following respective entry:\n\n"); + SECU_PrintTimeChoice(stdout, &encTime, "# For Server Distrust After", 0); + printf("CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL\n"); + dumpbytes(encTime.data, encTime.len); + printf("END\n"); + SECU_PrintTimeChoice(stdout, &encTime, "# For Email Distrust After", 0); + printf("CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL\n"); + dumpbytes(encTime.data, encTime.len); + printf("END\n"); + exit(0); + } + + if (addbuiltin.options[opt_Trust].activated) + ++mutuallyExclusiveOpts; + if (addbuiltin.options[opt_Distrust].activated) + ++mutuallyExclusiveOpts; + if (addbuiltin.options[opt_DistrustCRL].activated) + ++mutuallyExclusiveOpts; + + if (mutuallyExclusiveOpts != 1) { + fprintf(stderr, "%s: you must specify exactly one of -t or -D or -C\n", + progName); + Usage(progName); + } + + if (addbuiltin.options[opt_DistrustCRL].activated) { + if (!addbuiltin.options[opt_CRLEntry].activated) { + fprintf(stderr, "%s: you must specify the CRL entry number.\n", + progName); + Usage(progName); + } else { + crlentry = atoi(addbuiltin.options[opt_CRLEntry].arg); + if (crlentry < 1) { + fprintf(stderr, "%s: The CRL entry number must be > 0.\n", + progName); + Usage(progName); + } + } + } + + if (!addbuiltin.options[opt_Nickname].activated) { + fprintf(stderr, "%s: you must specify parameter -n (a nickname or a label).\n", + progName); + Usage(progName); + } + + if (addbuiltin.options[opt_Input].activated) { + infile = PR_Open(addbuiltin.options[opt_Input].arg, PR_RDONLY, 00660); + if (!infile) { + fprintf(stderr, "%s: failed to open input file.\n", progName); + exit(1); + } + } else { +#if defined(WIN32) + /* If we're going to read binary data from stdin, we must put stdin + ** into O_BINARY mode or else incoming \r\n's will become \n's, + ** and latin-1 characters will be altered. + */ + + int smrv = _setmode(_fileno(stdin), _O_BINARY); + if (smrv == -1) { + fprintf(stderr, + "%s: Cannot change stdin to binary mode. Use -i option instead.\n", + progName); + exit(1); + } +#endif + infile = PR_STDIN; + } + +#if defined(WIN32) + /* We must put stdout into O_BINARY mode or else the output will include + ** carriage returns. + */ + { + int smrv = _setmode(_fileno(stdout), _O_BINARY); + if (smrv == -1) { + fprintf(stderr, "%s: Cannot change stdout to binary mode.\n", progName); + exit(1); + } + } +#endif + + nickname = strdup(addbuiltin.options[opt_Nickname].arg); + + if (NSS_NoDB_Init(NULL) != SECSuccess) { + exit(1); + } + + if (addbuiltin.options[opt_Distrust].activated || + addbuiltin.options[opt_DistrustCRL].activated) { + addbuiltin.options[opt_ExcludeCert].activated = PR_TRUE; + addbuiltin.options[opt_ExcludeHash].activated = PR_TRUE; + } + + if (addbuiltin.options[opt_Distrust].activated) { + trusts = strdup("p,p,p"); + decodeTrust = PR_TRUE; + } else if (addbuiltin.options[opt_Trust].activated) { + trusts = strdup(addbuiltin.options[opt_Trust].arg); + decodeTrust = PR_TRUE; + } + + if (decodeTrust) { + rv = CERT_DecodeTrustString(&trust, trusts); + if (rv) { + fprintf(stderr, "%s: incorrectly formatted trust string.\n", progName); + Usage(progName); + } + } + + if (addbuiltin.options[opt_Trust].activated && + addbuiltin.options[opt_ExcludeHash].activated) { + if ((trust.sslFlags | trust.emailFlags | trust.objectSigningFlags) != + CERTDB_TERMINAL_RECORD) { + fprintf(stderr, "%s: Excluding the hash only allowed with distrust.\n", progName); + Usage(progName); + } + } + + SECU_FileToItem(&derItem, infile); + + /*printheader();*/ + + if (addbuiltin.options[opt_DistrustCRL].activated) { + rv = ConvertCRLEntry(&derItem, crlentry, nickname); + } else { + rv = ConvertCertificate(&derItem, nickname, &trust, + addbuiltin.options[opt_ExcludeCert].activated, + addbuiltin.options[opt_ExcludeHash].activated); + if (rv) { + fprintf(stderr, "%s: failed to convert certificate.\n", progName); + exit(1); + } + } + + if (NSS_Shutdown() != SECSuccess) { + exit(1); + } + + return (SECSuccess); +} diff --git a/security/nss/cmd/addbuiltin/addbuiltin.gyp b/security/nss/cmd/addbuiltin/addbuiltin.gyp new file mode 100644 index 0000000000..a8d1382e39 --- /dev/null +++ b/security/nss/cmd/addbuiltin/addbuiltin.gyp @@ -0,0 +1,24 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +{ + 'includes': [ + '../../coreconf/config.gypi', + '../../cmd/platlibs.gypi' + ], + 'targets': [ + { + 'target_name': 'addbuiltin', + 'type': 'executable', + 'sources': [ + 'addbuiltin.c' + ], + 'dependencies': [ + '<(DEPTH)/exports.gyp:nss_exports' + ] + } + ], + 'variables': { + 'module': 'nss' + } +} \ No newline at end of file diff --git a/security/nss/cmd/addbuiltin/manifest.mn b/security/nss/cmd/addbuiltin/manifest.mn new file mode 100644 index 0000000000..9c44c089ad --- /dev/null +++ b/security/nss/cmd/addbuiltin/manifest.mn @@ -0,0 +1,20 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +CORE_DEPTH = ../.. + +# MODULE public and private header directories are implicitly REQUIRED. +MODULE = nss + +CSRCS = \ + addbuiltin.c \ + $(NULL) + +# The MODULE is always implicitly required. +# Listing it here in REQUIRES makes it appear twice in the cc command line. +REQUIRES = seccmd + +PROGRAM = addbuiltin + diff --git a/security/nss/cmd/atob/Makefile b/security/nss/cmd/atob/Makefile new file mode 100644 index 0000000000..2aaef8fe5b --- /dev/null +++ b/security/nss/cmd/atob/Makefile @@ -0,0 +1,48 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + +include ../platrules.mk + diff --git a/security/nss/cmd/atob/atob.c b/security/nss/cmd/atob/atob.c new file mode 100644 index 0000000000..3e15ceadb0 --- /dev/null +++ b/security/nss/cmd/atob/atob.c @@ -0,0 +1,188 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "plgetopt.h" +#include "secutil.h" +#include "nssb64.h" +#include + +#if defined(XP_WIN) || (defined(__sun) && !defined(SVR4)) +#if !defined(WIN32) +extern int fread(char *, size_t, size_t, FILE *); +extern int fwrite(char *, size_t, size_t, FILE *); +extern int fprintf(FILE *, char *, ...); +#endif +#endif + +#if defined(WIN32) +#include "fcntl.h" +#include "io.h" +#endif + +static PRInt32 +output_binary(void *arg, const unsigned char *obuf, PRInt32 size) +{ + FILE *outFile = arg; + int nb; + + nb = fwrite(obuf, 1, size, outFile); + if (nb != size) { + PORT_SetError(SEC_ERROR_IO); + return -1; + } + + return nb; +} + +static PRBool +isBase64Char(char c) +{ + return ((c >= 'A' && c <= 'Z') || + (c >= 'a' && c <= 'z') || + (c >= '0' && c <= '9') || + c == '+' || c == '/' || + c == '='); +} + +static SECStatus +decode_file(FILE *outFile, FILE *inFile) +{ + NSSBase64Decoder *cx; + SECStatus status = SECFailure; + char ibuf[4096]; + const char *ptr; + + cx = NSSBase64Decoder_Create(output_binary, outFile); + if (!cx) { + return -1; + } + + for (;;) { + if (feof(inFile)) + break; + if (!fgets(ibuf, sizeof(ibuf), inFile)) { + if (ferror(inFile)) { + PORT_SetError(SEC_ERROR_IO); + goto loser; + } + /* eof */ + break; + } + for (ptr = ibuf; *ptr; ++ptr) { + char c = *ptr; + if (c == '\n' || c == '\r') { + break; /* found end of line */ + } + if (!isBase64Char(c)) { + ptr = ibuf; /* ignore line */ + break; + } + } + if (ibuf == ptr) { + continue; /* skip empty or non-base64 line */ + } + + status = NSSBase64Decoder_Update(cx, ibuf, ptr - ibuf); + if (status != SECSuccess) + goto loser; + } + + return NSSBase64Decoder_Destroy(cx, PR_FALSE); + +loser: + (void)NSSBase64Decoder_Destroy(cx, PR_TRUE); + return status; +} + +static void +Usage(char *progName) +{ + fprintf(stderr, + "Usage: %s [-i input] [-o output]\n", + progName); + fprintf(stderr, "%-20s Define an input file to use (default is stdin)\n", + "-i input"); + fprintf(stderr, "%-20s Define an output file to use (default is stdout)\n", + "-o output"); +} + +int +main(int argc, char **argv) +{ + char *progName; + SECStatus rv; + FILE *inFile = NULL, *outFile = NULL; + PRBool closeIn = PR_TRUE, closeOut = PR_TRUE; + PLOptState *optstate = NULL; + PLOptStatus status; + int exitCode = -1; + + progName = strrchr(argv[0], '/'); + progName = progName ? progName + 1 : argv[0]; + + /* Parse command line arguments */ + optstate = PL_CreateOptState(argc, argv, "?hi:o:"); + while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { + switch (optstate->option) { + case '?': + case 'h': + Usage(progName); + goto loser; + break; + + case 'i': + inFile = fopen(optstate->value, "r"); + if (!inFile) { + fprintf(stderr, "%s: unable to open \"%s\" for reading\n", + progName, optstate->value); + goto loser; + } + break; + + case 'o': + outFile = fopen(optstate->value, "wb"); + if (!outFile) { + fprintf(stderr, "%s: unable to open \"%s\" for writing\n", + progName, optstate->value); + goto loser; + } + break; + } + } + if (!inFile) { + inFile = stdin; + closeIn = PR_FALSE; + } + if (!outFile) { +#if defined(WIN32) + int smrv = _setmode(_fileno(stdout), _O_BINARY); + if (smrv == -1) { + fprintf(stderr, + "%s: Cannot change stdout to binary mode. Use -o option instead.\n", + progName); + goto loser; + } +#endif + outFile = stdout; + closeOut = PR_FALSE; + } + rv = decode_file(outFile, inFile); + if (rv != SECSuccess) { + fprintf(stderr, "%s: lossage: error=%d errno=%d\n", + progName, PORT_GetError(), errno); + goto loser; + } + exitCode = 0; +loser: + if (optstate) { + PL_DestroyOptState(optstate); + } + if (inFile && closeIn) { + fclose(inFile); + } + if (outFile && closeOut) { + fclose(outFile); + } + return exitCode; +} diff --git a/security/nss/cmd/atob/atob.gyp b/security/nss/cmd/atob/atob.gyp new file mode 100644 index 0000000000..af972c2e9f --- /dev/null +++ b/security/nss/cmd/atob/atob.gyp @@ -0,0 +1,30 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +{ + 'includes': [ + '../../coreconf/config.gypi', + '../../cmd/platlibs.gypi' + ], + 'targets': [ + { + 'target_name': 'atob', + 'type': 'executable', + 'sources': [ + 'atob.c' + ], + 'dependencies': [ + '<(DEPTH)/exports.gyp:dbm_exports', + '<(DEPTH)/exports.gyp:nss_exports' + ] + } + ], + 'target_defaults': { + 'defines': [ + 'NSPR20' + ] + }, + 'variables': { + 'module': 'nss' + } +} \ No newline at end of file diff --git a/security/nss/cmd/atob/manifest.mn b/security/nss/cmd/atob/manifest.mn new file mode 100644 index 0000000000..5d822b96ec --- /dev/null +++ b/security/nss/cmd/atob/manifest.mn @@ -0,0 +1,22 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +CORE_DEPTH = ../.. + +# MODULE public and private header directories are implicitly REQUIRED. +MODULE = nss + +# This next line is used by .mk files +# and gets translated into $LINCS in manifest.mnw +# The MODULE is always implicitly required. +# Listing it here in REQUIRES makes it appear twice in the cc command line. +REQUIRES = seccmd dbm + +DEFINES = -DNSPR20 + +CSRCS = atob.c + +PROGRAM = atob + diff --git a/security/nss/cmd/bltest/Makefile b/security/nss/cmd/bltest/Makefile new file mode 100644 index 0000000000..a5e83efdfa --- /dev/null +++ b/security/nss/cmd/bltest/Makefile @@ -0,0 +1,54 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn +#MKPROG = purify -cache-dir=/u/mcgreer/pcache -best-effort \ +# -always-use-cache-dir $(CC) + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + +#EXTRA_SHARED_LIBS += \ +# -L/usr/lib \ +# -lposix4 \ +# $(NULL) + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + +include ../platrules.mk diff --git a/security/nss/cmd/bltest/blapitest.c b/security/nss/cmd/bltest/blapitest.c new file mode 100644 index 0000000000..199d5a450a --- /dev/null +++ b/security/nss/cmd/bltest/blapitest.c @@ -0,0 +1,4274 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include +#include + +#include "blapi.h" +#include "secrng.h" +#include "prmem.h" +#include "prprf.h" +#include "prtime.h" +#include "prsystem.h" +#include "plstr.h" +#include "nssb64.h" +#include "basicutil.h" +#include "plgetopt.h" +#include "softoken.h" +#include "nspr.h" +#include "secport.h" +#include "secoid.h" +#include "nssutil.h" +#include "ecl-curve.h" +#include "chacha20poly1305.h" + +#include "pkcs1_vectors.h" + +SECStatus EC_DecodeParams(const SECItem *encodedParams, + ECParams **ecparams); +SECStatus EC_CopyParams(PLArenaPool *arena, ECParams *dstParams, + const ECParams *srcParams); + +char *progName; +char *testdir = NULL; + +#define BLTEST_DEFAULT_CHUNKSIZE 4096 + +#define WORDSIZE sizeof(unsigned long) + +#define CHECKERROR(rv, ln) \ + if (rv) { \ + PRErrorCode prerror = PR_GetError(); \ + PR_fprintf(PR_STDERR, "%s: ERR %d (%s) at line %d.\n", progName, \ + prerror, PORT_ErrorToString(prerror), ln); \ + exit(-1); \ + } + +/* Macros for performance timing. */ +#define TIMESTART() \ + time1 = PR_IntervalNow(); + +#define TIMEFINISH(time, reps) \ + time2 = (PRIntervalTime)(PR_IntervalNow() - time1); \ + time1 = PR_IntervalToMilliseconds(time2); \ + time = ((double)(time1)) / reps; + +#define TIMEMARK(seconds) \ + time1 = PR_SecondsToInterval(seconds); \ + { \ + PRInt64 tmp; \ + if (time2 == 0) { \ + time2 = 1; \ + } \ + LL_DIV(tmp, time1, time2); \ + if (tmp < 10) { \ + if (tmp == 0) { \ + opsBetweenChecks = 1; \ + } else { \ + LL_L2I(opsBetweenChecks, tmp); \ + } \ + } else { \ + opsBetweenChecks = 10; \ + } \ + } \ + time2 = time1; \ + time1 = PR_IntervalNow(); + +#define TIMETOFINISH() \ + PR_IntervalNow() - time1 >= time2 + +static void +Usage() +{ +#define PRINTUSAGE(subject, option, predicate) \ + fprintf(stderr, "%10s %s\t%s\n", subject, option, predicate); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "[-DEHSVR]", "List available cipher modes"); /* XXX */ + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-E -m mode ", "Encrypt a buffer"); + PRINTUSAGE("", "", "[-i plaintext] [-o ciphertext] [-k key] [-v iv]"); + PRINTUSAGE("", "", "[-b bufsize] [-g keysize] [-e exp] [-r rounds]"); + PRINTUSAGE("", "", "[-w wordsize] [-p repetitions | -5 time_interval]"); + PRINTUSAGE("", "", "[-4 th_num]"); + PRINTUSAGE("", "-m", "cipher mode to use"); + PRINTUSAGE("", "-i", "file which contains input buffer"); + PRINTUSAGE("", "-o", "file for output buffer"); + PRINTUSAGE("", "-k", "file which contains key"); + PRINTUSAGE("", "-v", "file which contains initialization vector"); + PRINTUSAGE("", "-b", "size of input buffer"); + PRINTUSAGE("", "-g", "key size (in bytes)"); + PRINTUSAGE("", "-p", "do performance test"); + PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads"); + PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)"); + PRINTUSAGE("", "--aad", "File with contains additional auth data"); + PRINTUSAGE("(rsa)", "-e", "rsa public exponent"); + PRINTUSAGE("(rc5)", "-r", "number of rounds"); + PRINTUSAGE("(rc5)", "-w", "wordsize (32 or 64)"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-D -m mode", "Decrypt a buffer"); + PRINTUSAGE("", "", "[-i plaintext] [-o ciphertext] [-k key] [-v iv]"); + PRINTUSAGE("", "", "[-p repetitions | -5 time_interval] [-4 th_num]"); + PRINTUSAGE("", "-m", "cipher mode to use"); + PRINTUSAGE("", "-i", "file which contains input buffer"); + PRINTUSAGE("", "-o", "file for output buffer"); + PRINTUSAGE("", "-k", "file which contains key"); + PRINTUSAGE("", "-v", "file which contains initialization vector"); + PRINTUSAGE("", "-p", "do performance test"); + PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads"); + PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)"); + PRINTUSAGE("", "--aad", "File with contains additional auth data"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-H -m mode", "Hash a buffer"); + PRINTUSAGE("", "", "[-i plaintext] [-o hash]"); + PRINTUSAGE("", "", "[-b bufsize]"); + PRINTUSAGE("", "", "[-p repetitions | -5 time_interval] [-4 th_num]"); + PRINTUSAGE("", "-m", "cipher mode to use"); + PRINTUSAGE("", "-i", "file which contains input buffer"); + PRINTUSAGE("", "-o", "file for hash"); + PRINTUSAGE("", "-b", "size of input buffer"); + PRINTUSAGE("", "-p", "do performance test"); + PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads"); + PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-S -m mode", "Sign a buffer"); + PRINTUSAGE("", "", "[-i plaintext] [-o signature] [-k key]"); + PRINTUSAGE("", "", "[-b bufsize]"); + PRINTUSAGE("", "", "[-n curvename]"); + PRINTUSAGE("", "", "[-p repetitions | -5 time_interval] [-4 th_num]"); + PRINTUSAGE("", "-m", "cipher mode to use"); + PRINTUSAGE("", "-i", "file which contains input buffer"); + PRINTUSAGE("", "-o", "file for signature"); + PRINTUSAGE("", "-k", "file which contains key"); + PRINTUSAGE("", "-n", "name of curve for EC key generation; one of:"); + PRINTUSAGE("", "", " nistp256, nistp384, nistp521"); + PRINTUSAGE("", "-p", "do performance test"); + PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads"); + PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-V -m mode", "Verify a signed buffer"); + PRINTUSAGE("", "", "[-i plaintext] [-s signature] [-k key]"); + PRINTUSAGE("", "", "[-p repetitions | -5 time_interval] [-4 th_num]"); + PRINTUSAGE("", "-m", "cipher mode to use"); + PRINTUSAGE("", "-i", "file which contains input buffer"); + PRINTUSAGE("", "-s", "file which contains signature of input buffer"); + PRINTUSAGE("", "-k", "file which contains key"); + PRINTUSAGE("", "-p", "do performance test"); + PRINTUSAGE("", "-4", "run test in multithread mode. th_num number of parallel threads"); + PRINTUSAGE("", "-5", "run test for specified time interval(in seconds)"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-N -m mode -b bufsize", + "Create a nonce plaintext and key"); + PRINTUSAGE("", "", "[-g keysize] [-u cxreps]"); + PRINTUSAGE("", "-g", "key size (in bytes)"); + PRINTUSAGE("", "-u", "number of repetitions of context creation"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-R [-g keysize] [-e exp]", + "Test the RSA populate key function"); + PRINTUSAGE("", "", "[-r repetitions]"); + PRINTUSAGE("", "-g", "key size (in bytes)"); + PRINTUSAGE("", "-e", "rsa public exponent"); + PRINTUSAGE("", "-r", "repetitions of the test"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-F", "Run the FIPS self-test"); + fprintf(stderr, "\n"); + PRINTUSAGE(progName, "-T [-m mode1,mode2...]", "Run the BLAPI self-test"); + fprintf(stderr, "\n"); + exit(1); +} + +/* Helper functions for ascii<-->binary conversion/reading/writing */ + +/* XXX argh */ +struct item_with_arena { + SECItem *item; + PLArenaPool *arena; +}; + +static PRInt32 +get_binary(void *arg, const unsigned char *ibuf, PRInt32 size) +{ + struct item_with_arena *it = arg; + SECItem *binary = it->item; + SECItem *tmp; + int index; + if (binary->data == NULL) { + tmp = SECITEM_AllocItem(it->arena, NULL, size); + binary->data = tmp->data; + binary->len = tmp->len; + index = 0; + } else { + SECITEM_ReallocItem(NULL, binary, binary->len, binary->len + size); + index = binary->len; + } + PORT_Memcpy(&binary->data[index], ibuf, size); + return binary->len; +} + +static SECStatus +atob(SECItem *ascii, SECItem *binary, PLArenaPool *arena) +{ + SECStatus status; + NSSBase64Decoder *cx; + struct item_with_arena it; + int len; + binary->data = NULL; + binary->len = 0; + it.item = binary; + it.arena = arena; + len = (strncmp((const char *)&ascii->data[ascii->len - 2], "\r\n", 2)) ? ascii->len + : ascii->len - 2; + cx = NSSBase64Decoder_Create(get_binary, &it); + status = NSSBase64Decoder_Update(cx, (const char *)ascii->data, len); + status = NSSBase64Decoder_Destroy(cx, PR_FALSE); + return status; +} + +static PRInt32 +output_ascii(void *arg, const char *obuf, PRInt32 size) +{ + PRFileDesc *outfile = arg; + PRInt32 nb = PR_Write(outfile, obuf, size); + if (nb != size) { + PORT_SetError(SEC_ERROR_IO); + return -1; + } + return nb; +} + +static SECStatus +btoa_file(SECItem *binary, PRFileDesc *outfile) +{ + SECStatus status; + NSSBase64Encoder *cx; + if (binary->len == 0) + return SECSuccess; + cx = NSSBase64Encoder_Create(output_ascii, outfile); + status = NSSBase64Encoder_Update(cx, binary->data, binary->len); + status = NSSBase64Encoder_Destroy(cx, PR_FALSE); + status = PR_Write(outfile, "\r\n", 2); + return status; +} + +SECStatus +hex_from_2char(unsigned char *c2, unsigned char *byteval) +{ + int i; + unsigned char offset; + *byteval = 0; + for (i = 0; i < 2; i++) { + if (c2[i] >= '0' && c2[i] <= '9') { + offset = c2[i] - '0'; + *byteval |= offset << 4 * (1 - i); + } else if (c2[i] >= 'a' && c2[i] <= 'f') { + offset = c2[i] - 'a'; + *byteval |= (offset + 10) << 4 * (1 - i); + } else if (c2[i] >= 'A' && c2[i] <= 'F') { + offset = c2[i] - 'A'; + *byteval |= (offset + 10) << 4 * (1 - i); + } else { + return SECFailure; + } + } + return SECSuccess; +} + +SECStatus +char2_from_hex(unsigned char byteval, char *c2) +{ + int i; + unsigned char offset; + for (i = 0; i < 2; i++) { + offset = (byteval >> 4 * (1 - i)) & 0x0f; + if (offset < 10) { + c2[i] = '0' + offset; + } else { + c2[i] = 'A' + offset - 10; + } + } + return SECSuccess; +} + +void +serialize_key(SECItem *it, int ni, PRFileDesc *file) +{ + unsigned char len[4]; + int i; + NSSBase64Encoder *cx; + cx = NSSBase64Encoder_Create(output_ascii, file); + for (i = 0; i < ni; i++, it++) { + len[0] = (it->len >> 24) & 0xff; + len[1] = (it->len >> 16) & 0xff; + len[2] = (it->len >> 8) & 0xff; + len[3] = (it->len & 0xff); + NSSBase64Encoder_Update(cx, len, 4); + NSSBase64Encoder_Update(cx, it->data, it->len); + } + NSSBase64Encoder_Destroy(cx, PR_FALSE); + PR_Write(file, "\r\n", 2); +} + +void +key_from_filedata(PLArenaPool *arena, SECItem *it, int ns, int ni, SECItem *filedata) +{ + int fpos = 0; + int i, len; + unsigned char *buf = filedata->data; + for (i = 0; i < ni; i++) { + len = (buf[fpos++] & 0xff) << 24; + len |= (buf[fpos++] & 0xff) << 16; + len |= (buf[fpos++] & 0xff) << 8; + len |= (buf[fpos++] & 0xff); + if (ns <= i) { + if (len > 0) { + it->len = len; + it->data = PORT_ArenaAlloc(arena, it->len); + PORT_Memcpy(it->data, &buf[fpos], it->len); + } else { + it->len = 0; + it->data = NULL; + } + it++; + } + fpos += len; + } +} + +static RSAPrivateKey * +rsakey_from_filedata(PLArenaPool *arena, SECItem *filedata) +{ + RSAPrivateKey *key; + key = (RSAPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(RSAPrivateKey)); + key->arena = arena; + key_from_filedata(arena, &key->version, 0, 9, filedata); + return key; +} + +static PQGParams * +pqg_from_filedata(PLArenaPool *arena, SECItem *filedata) +{ + PQGParams *pqg; + pqg = (PQGParams *)PORT_ArenaZAlloc(arena, sizeof(PQGParams)); + pqg->arena = arena; + key_from_filedata(arena, &pqg->prime, 0, 3, filedata); + return pqg; +} + +static DSAPrivateKey * +dsakey_from_filedata(PLArenaPool *arena, SECItem *filedata) +{ + DSAPrivateKey *key; + key = (DSAPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(DSAPrivateKey)); + key->params.arena = arena; + key_from_filedata(arena, &key->params.prime, 0, 5, filedata); + return key; +} + +static ECPrivateKey * +eckey_from_filedata(PLArenaPool *arena, SECItem *filedata) +{ + ECPrivateKey *key; + SECStatus rv; + ECParams *tmpECParams = NULL; + key = (ECPrivateKey *)PORT_ArenaZAlloc(arena, sizeof(ECPrivateKey)); + /* read and convert params */ + key->ecParams.arena = arena; + key_from_filedata(arena, &key->ecParams.DEREncoding, 0, 1, filedata); + rv = SECOID_Init(); + CHECKERROR(rv, __LINE__); + rv = EC_DecodeParams(&key->ecParams.DEREncoding, &tmpECParams); + CHECKERROR(rv, __LINE__); + rv = EC_CopyParams(key->ecParams.arena, &key->ecParams, tmpECParams); + CHECKERROR(rv, __LINE__); + rv = SECOID_Shutdown(); + CHECKERROR(rv, __LINE__); + PORT_FreeArena(tmpECParams->arena, PR_TRUE); + /* read key */ + key_from_filedata(arena, &key->publicValue, 1, 3, filedata); + return key; +} + +typedef struct curveNameTagPairStr { + char *curveName; + 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 SECItem * +getECParams(const char *curve) +{ + SECItem *ecparams; + SECOidData *oidData = NULL; + SECOidTag curveOidTag = SEC_OID_UNKNOWN; /* default */ + int i, numCurves; + + if (curve != NULL) { + numCurves = sizeof(nameTagPair) / sizeof(CurveNameTagPair); + for (i = 0; ((i < numCurves) && (curveOidTag == SEC_OID_UNKNOWN)); + i++) { + if (PL_strcmp(curve, nameTagPair[i].curveName) == 0) + curveOidTag = nameTagPair[i].curveOidTag; + } + } + + /* Return NULL if curve name is not recognized */ + if ((curveOidTag == SEC_OID_UNKNOWN) || + (oidData = SECOID_FindOIDByTag(curveOidTag)) == NULL) { + fprintf(stderr, "Unrecognized elliptic curve %s\n", curve); + return NULL; + } + + ecparams = SECITEM_AllocItem(NULL, NULL, (2 + oidData->oid.len)); + + /* + * ecparams->data needs to contain the ASN encoding of an object ID (OID) + * representing the named curve. The actual OID is in + * oidData->oid.data so we simply prepend 0x06 and OID length + */ + ecparams->data[0] = SEC_ASN1_OBJECT_ID; + ecparams->data[1] = oidData->oid.len; + memcpy(ecparams->data + 2, oidData->oid.data, oidData->oid.len); + + return ecparams; +} + +static void +dump_pqg(PQGParams *pqg) +{ + SECU_PrintInteger(stdout, &pqg->prime, "PRIME:", 0); + SECU_PrintInteger(stdout, &pqg->subPrime, "SUBPRIME:", 0); + SECU_PrintInteger(stdout, &pqg->base, "BASE:", 0); +} + +static void +dump_dsakey(DSAPrivateKey *key) +{ + dump_pqg(&key->params); + SECU_PrintInteger(stdout, &key->publicValue, "PUBLIC VALUE:", 0); + SECU_PrintInteger(stdout, &key->privateValue, "PRIVATE VALUE:", 0); +} + +static void +dump_ecp(ECParams *ecp) +{ + /* TODO other fields */ + SECU_PrintInteger(stdout, &ecp->base, "BASE POINT:", 0); +} + +static void +dump_eckey(ECPrivateKey *key) +{ + dump_ecp(&key->ecParams); + SECU_PrintInteger(stdout, &key->publicValue, "PUBLIC VALUE:", 0); + SECU_PrintInteger(stdout, &key->privateValue, "PRIVATE VALUE:", 0); +} + +static void +dump_rsakey(RSAPrivateKey *key) +{ + SECU_PrintInteger(stdout, &key->version, "VERSION:", 0); + SECU_PrintInteger(stdout, &key->modulus, "MODULUS:", 0); + SECU_PrintInteger(stdout, &key->publicExponent, "PUBLIC EXP:", 0); + SECU_PrintInteger(stdout, &key->privateExponent, "PRIVATE EXP:", 0); + SECU_PrintInteger(stdout, &key->prime1, "CRT PRIME 1:", 0); + SECU_PrintInteger(stdout, &key->prime2, "CRT PRIME 2:", 0); + SECU_PrintInteger(stdout, &key->exponent1, "CRT EXP 1:", 0); + SECU_PrintInteger(stdout, &key->exponent2, "CRT EXP 2:", 0); + SECU_PrintInteger(stdout, &key->coefficient, "CRT COEFFICIENT:", 0); +} + +typedef enum { + bltestBase64Encoded, /* Base64 encoded ASCII */ + bltestBinary, /* straight binary */ + bltestHexSpaceDelim, /* 0x12 0x34 0xab 0xCD ... */ + bltestHexStream /* 1234abCD ... */ +} bltestIOMode; + +typedef struct +{ + SECItem buf; + SECItem pBuf; + bltestIOMode mode; + PRFileDesc *file; +} bltestIO; + +typedef SECStatus (*bltestSymmCipherFn)(void *cx, + unsigned char *output, + unsigned int *outputLen, + unsigned int maxOutputLen, + const unsigned char *input, + unsigned int inputLen); + +typedef SECStatus (*bltestAEADFn)(void *cx, + unsigned char *output, + unsigned int *outputLen, + unsigned int maxOutputLen, + const unsigned char *input, + unsigned int inputLen, + const unsigned char *nonce, + unsigned int nonceLen, + const unsigned char *ad, + unsigned int adLen); + +typedef SECStatus (*bltestPubKeyCipherFn)(void *key, + SECItem *output, + const SECItem *input); + +typedef SECStatus (*bltestHashCipherFn)(unsigned char *dest, + const unsigned char *src, + PRUint32 src_length); + +/* Note: Algorithms are grouped in order to support is_symmkeyCipher / + * is_pubkeyCipher / is_hashCipher / is_sigCipher + */ +typedef enum { + bltestINVALID = -1, + bltestDES_ECB, /* Symmetric Key Ciphers */ + bltestDES_CBC, /* . */ + bltestDES_EDE_ECB, /* . */ + bltestDES_EDE_CBC, /* . */ +#ifndef NSS_DISABLE_DEPRECATED_RC2 + bltestRC2_ECB, /* . */ + bltestRC2_CBC, /* . */ +#endif + bltestRC4, /* . */ +#ifdef NSS_SOFTOKEN_DOES_RC5 + bltestRC5_ECB, /* . */ + bltestRC5_CBC, /* . */ +#endif + bltestAES_ECB, /* . */ + bltestAES_CBC, /* . */ + bltestAES_CTS, /* . */ + bltestAES_CTR, /* . */ + bltestAES_GCM, /* . */ + bltestCAMELLIA_ECB, /* . */ + bltestCAMELLIA_CBC, /* . */ +#ifndef NSS_DISABLE_DEPRECATED_SEED + bltestSEED_ECB, /* SEED algorithm */ + bltestSEED_CBC, /* SEED algorithm */ +#endif + bltestCHACHA20_CTR, /* ChaCha20 block cipher */ + bltestCHACHA20, /* ChaCha20 + Poly1305 */ + bltestRSA, /* Public Key Ciphers */ + bltestRSA_OAEP, /* . (Public Key Enc.) */ + bltestRSA_PSS, /* . (Public Key Sig.) */ + bltestECDSA, /* . (Public Key Sig.) */ + bltestDSA, /* . (Public Key Sig.) */ + bltestMD2, /* Hash algorithms */ + bltestMD5, /* . */ + bltestSHA1, /* . */ + bltestSHA224, /* . */ + bltestSHA256, /* . */ + bltestSHA384, /* . */ + bltestSHA512, /* . */ + NUMMODES +} bltestCipherMode; + +static char *mode_strings[] = { + "des_ecb", + "des_cbc", + "des3_ecb", + "des3_cbc", +#ifndef NSS_DISABLE_DEPRECATED_RC2 + "rc2_ecb", + "rc2_cbc", +#endif + "rc4", +#ifdef NSS_SOFTOKEN_DOES_RC5 + "rc5_ecb", + "rc5_cbc", +#endif + "aes_ecb", + "aes_cbc", + "aes_cts", + "aes_ctr", + "aes_gcm", + "camellia_ecb", + "camellia_cbc", +#ifndef NSS_DISABLE_DEPRECATED_SEED + "seed_ecb", + "seed_cbc", +#endif + "chacha20_ctr", + "chacha20_poly1305", + "rsa", + "rsa_oaep", + "rsa_pss", + "ecdsa", + /*"pqg",*/ + "dsa", + "md2", + "md5", + "sha1", + "sha224", + "sha256", + "sha384", + "sha512", +}; + +typedef struct +{ + bltestIO key; + bltestIO iv; +} bltestSymmKeyParams; + +typedef struct +{ + bltestSymmKeyParams sk; /* must be first */ + bltestIO aad; +} bltestAuthSymmKeyParams; + +typedef struct +{ + bltestIO key; + bltestIO iv; + int rounds; + int wordsize; +} bltestRC5Params; + +typedef struct +{ + bltestIO key; + int keysizeInBits; + + /* OAEP & PSS */ + HASH_HashType hashAlg; + HASH_HashType maskHashAlg; + bltestIO seed; /* salt if PSS */ +} bltestRSAParams; + +typedef struct +{ + bltestIO pqgdata; + unsigned int keysize; + bltestIO keyseed; + bltestIO sigseed; + PQGParams *pqg; +} bltestDSAParams; + +typedef struct +{ + char *curveName; + bltestIO sigseed; +} bltestECDSAParams; + +typedef struct +{ + bltestIO key; + void *privKey; + void *pubKey; + bltestIO sig; /* if doing verify, the signature (which may come + * from sigfile. */ + + union { + bltestRSAParams rsa; + bltestDSAParams dsa; + bltestECDSAParams ecdsa; + } cipherParams; +} bltestAsymKeyParams; + +typedef struct +{ + bltestIO key; /* unused */ + PRBool restart; +} bltestHashParams; + +typedef union { + bltestIO key; + bltestSymmKeyParams sk; + bltestAuthSymmKeyParams ask; + bltestRC5Params rc5; + bltestAsymKeyParams asymk; + bltestHashParams hash; +} bltestParams; + +typedef struct bltestCipherInfoStr bltestCipherInfo; + +struct bltestCipherInfoStr { + PLArenaPool *arena; + /* link to next in multithreaded test */ + bltestCipherInfo *next; + PRThread *cipherThread; + + /* MonteCarlo test flag*/ + PRBool mCarlo; + /* cipher context */ + void *cx; + /* I/O streams */ + bltestIO input; + bltestIO output; + /* Cipher-specific parameters */ + bltestParams params; + /* Cipher mode */ + bltestCipherMode mode; + /* Cipher function (encrypt/decrypt/sign/verify/hash) */ + union { + bltestSymmCipherFn symmkeyCipher; + bltestAEADFn aeadCipher; + bltestPubKeyCipherFn pubkeyCipher; + bltestHashCipherFn hashCipher; + } cipher; + /* performance testing */ + int repetitionsToPerfom; + int seconds; + int repetitions; + int cxreps; + double cxtime; + double optime; +}; + +PRBool +is_symmkeyCipher(bltestCipherMode mode) +{ + /* change as needed! */ + if (mode >= bltestDES_ECB && mode <= bltestCHACHA20_CTR) + return PR_TRUE; + return PR_FALSE; +} + +PRBool +is_aeadCipher(bltestCipherMode mode) +{ + /* change as needed! */ + switch (mode) { + case bltestCHACHA20: + return PR_TRUE; + default: + return PR_FALSE; + } +} + +PRBool +is_authCipher(bltestCipherMode mode) +{ + /* change as needed! */ + switch (mode) { + case bltestAES_GCM: + case bltestCHACHA20: + return PR_TRUE; + default: + return PR_FALSE; + } +} + +PRBool +is_singleShotCipher(bltestCipherMode mode) +{ + /* change as needed! */ + switch (mode) { + case bltestAES_GCM: + case bltestAES_CTS: + case bltestCHACHA20_CTR: + case bltestCHACHA20: + return PR_TRUE; + default: + return PR_FALSE; + } +} + +PRBool +is_pubkeyCipher(bltestCipherMode mode) +{ + /* change as needed! */ + if (mode >= bltestRSA && mode <= bltestDSA) + return PR_TRUE; + return PR_FALSE; +} + +PRBool +is_hashCipher(bltestCipherMode mode) +{ + /* change as needed! */ + if (mode >= bltestMD2 && mode <= bltestSHA512) + return PR_TRUE; + return PR_FALSE; +} + +PRBool +is_sigCipher(bltestCipherMode mode) +{ + /* change as needed! */ + if (mode >= bltestRSA_PSS && mode <= bltestDSA) + return PR_TRUE; + return PR_FALSE; +} + +PRBool +cipher_requires_IV(bltestCipherMode mode) +{ + /* change as needed! */ + switch (mode) { + case bltestDES_CBC: + case bltestDES_EDE_CBC: +#ifndef NSS_DISABLE_DEPRECATED_RC2 + case bltestRC2_CBC: +#endif +#ifdef NSS_SOFTOKEN_DOES_RC5 + case bltestRC5_CBC: +#endif + case bltestAES_CBC: + case bltestAES_CTS: + case bltestAES_CTR: + case bltestAES_GCM: + case bltestCAMELLIA_CBC: +#ifndef NSS_DISABLE_DEPRECATED_SEED + case bltestSEED_CBC: +#endif + case bltestCHACHA20_CTR: + case bltestCHACHA20: + return PR_TRUE; + default: + return PR_FALSE; + } +} + +SECStatus finishIO(bltestIO *output, PRFileDesc *file); + +SECStatus +setupIO(PLArenaPool *arena, bltestIO *input, PRFileDesc *file, + char *str, int numBytes) +{ + SECStatus rv = SECSuccess; + SECItem fileData; + SECItem *in; + unsigned char *tok; + unsigned int i, j; + PRBool needToFreeFile = PR_FALSE; + + if (file && (numBytes == 0 || file == PR_STDIN)) { + /* grabbing data from a file */ + rv = SECU_FileToItem(&fileData, file); + if (rv != SECSuccess) + return SECFailure; + in = &fileData; + needToFreeFile = PR_TRUE; + } else if (str) { + /* grabbing data from command line */ + fileData.data = (unsigned char *)str; + fileData.len = PL_strlen(str); + in = &fileData; + } else if (file) { + /* create nonce */ + SECITEM_AllocItem(arena, &input->buf, numBytes); + RNG_GenerateGlobalRandomBytes(input->buf.data, numBytes); + return finishIO(input, file); + } else { + return SECFailure; + } + + switch (input->mode) { + case bltestBase64Encoded: + if (in->len == 0) { + input->buf.data = NULL; + input->buf.len = 0; + break; + } + rv = atob(in, &input->buf, arena); + break; + case bltestBinary: + if (in->len == 0) { + input->buf.data = NULL; + input->buf.len = 0; + break; + } + if (in->data[in->len - 1] == '\n') + --in->len; + if (in->data[in->len - 1] == '\r') + --in->len; + rv = SECITEM_CopyItem(arena, &input->buf, in); + break; + case bltestHexSpaceDelim: + SECITEM_AllocItem(arena, &input->buf, in->len / 5); + for (i = 0, j = 0; i < in->len; i += 5, j++) { + tok = &in->data[i]; + if (tok[0] != '0' || tok[1] != 'x' || tok[4] != ' ') + /* bad hex token */ + break; + + rv = hex_from_2char(&tok[2], input->buf.data + j); + if (rv) + break; + } + break; + case bltestHexStream: + SECITEM_AllocItem(arena, &input->buf, in->len / 2); + for (i = 0, j = 0; i < in->len; i += 2, j++) { + tok = &in->data[i]; + rv = hex_from_2char(tok, input->buf.data + j); + if (rv) + break; + } + break; + } + + if (needToFreeFile) + SECITEM_FreeItem(&fileData, PR_FALSE); + return rv; +} + +SECStatus +finishIO(bltestIO *output, PRFileDesc *file) +{ + SECStatus rv = SECSuccess; + PRInt32 nb; + unsigned char byteval; + SECItem *it; + char hexstr[5]; + unsigned int i; + if (output->pBuf.len > 0) { + it = &output->pBuf; + } else { + it = &output->buf; + } + switch (output->mode) { + case bltestBase64Encoded: + rv = btoa_file(it, file); + break; + case bltestBinary: + nb = PR_Write(file, it->data, it->len); + rv = (nb == (PRInt32)it->len) ? SECSuccess : SECFailure; + break; + case bltestHexSpaceDelim: + hexstr[0] = '0'; + hexstr[1] = 'x'; + hexstr[4] = ' '; + for (i = 0; i < it->len; i++) { + byteval = it->data[i]; + rv = char2_from_hex(byteval, hexstr + 2); + nb = PR_Write(file, hexstr, 5); + if (rv) + break; + } + PR_Write(file, "\n", 1); + break; + case bltestHexStream: + for (i = 0; i < it->len; i++) { + byteval = it->data[i]; + rv = char2_from_hex(byteval, hexstr); + if (rv) + break; + nb = PR_Write(file, hexstr, 2); + } + PR_Write(file, "\n", 1); + break; + } + return rv; +} + +SECStatus +bltestCopyIO(PLArenaPool *arena, bltestIO *dest, bltestIO *src) +{ + if (SECITEM_CopyItem(arena, &dest->buf, &src->buf) != SECSuccess) { + return SECFailure; + } + if (src->pBuf.len > 0) { + dest->pBuf.len = src->pBuf.len; + dest->pBuf.data = dest->buf.data + (src->pBuf.data - src->buf.data); + } + dest->mode = src->mode; + dest->file = src->file; + + return SECSuccess; +} + +void +misalignBuffer(PLArenaPool *arena, bltestIO *io, int off) +{ + ptrdiff_t offset = (ptrdiff_t)io->buf.data % WORDSIZE; + int length = io->buf.len; + if (offset != off) { + SECITEM_ReallocItemV2(arena, &io->buf, length + 2 * WORDSIZE); + /* offset may have changed? */ + offset = (ptrdiff_t)io->buf.data % WORDSIZE; + if (offset != off) { + memmove(io->buf.data + off, io->buf.data, length); + io->pBuf.data = io->buf.data + off; + io->pBuf.len = length; + } else { + io->pBuf.data = io->buf.data; + io->pBuf.len = length; + } + } else { + io->pBuf.data = io->buf.data; + io->pBuf.len = length; + } +} + +SECStatus +des_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return DES_Encrypt((DESContext *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +des_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return DES_Decrypt((DESContext *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +#ifndef NSS_DISABLE_DEPRECATED_RC2 +SECStatus +rc2_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return RC2_Encrypt((RC2Context *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +rc2_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return RC2_Decrypt((RC2Context *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} +#endif /* NSS_DISABLE_DEPRECATED_RC2 */ + +SECStatus +rc4_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return RC4_Encrypt((RC4Context *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +rc4_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return RC4_Decrypt((RC4Context *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +aes_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return AES_Encrypt((AESContext *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +aes_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return AES_Decrypt((AESContext *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +chacha20_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + if (maxOutputLen < inputLen) { + PORT_SetError(SEC_ERROR_OUTPUT_LEN); + return SECFailure; + } + ChaCha20Context *ctx = cx; + *outputLen = inputLen; + return ChaCha20_Xor(output, input, inputLen, ctx->key, ctx->nonce, + ctx->counter); +} + +SECStatus +chacha20_poly1305_Encrypt(void *cx, unsigned char *output, + unsigned int *outputLen, unsigned int maxOutputLen, + const unsigned char *input, unsigned int inputLen, + const unsigned char *nonce, unsigned int nonceLen, + const unsigned char *ad, unsigned int adLen) +{ + return ChaCha20Poly1305_Seal((ChaCha20Poly1305Context *)cx, output, + outputLen, maxOutputLen, input, inputLen, + nonce, nonceLen, ad, adLen); +} + +SECStatus +chacha20_poly1305_Decrypt(void *cx, unsigned char *output, + unsigned int *outputLen, unsigned int maxOutputLen, + const unsigned char *input, unsigned int inputLen, + const unsigned char *nonce, unsigned int nonceLen, + const unsigned char *ad, unsigned int adLen) +{ + return ChaCha20Poly1305_Open((ChaCha20Poly1305Context *)cx, output, + outputLen, maxOutputLen, input, inputLen, + nonce, nonceLen, ad, adLen); +} + +SECStatus +camellia_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return Camellia_Encrypt((CamelliaContext *)cx, output, outputLen, + maxOutputLen, + input, inputLen); +} + +SECStatus +camellia_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return Camellia_Decrypt((CamelliaContext *)cx, output, outputLen, + maxOutputLen, + input, inputLen); +} + +#ifndef NSS_DISABLE_DEPRECATED_SEED +SECStatus +seed_Encrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return SEED_Encrypt((SEEDContext *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} + +SECStatus +seed_Decrypt(void *cx, unsigned char *output, unsigned int *outputLen, + unsigned int maxOutputLen, const unsigned char *input, + unsigned int inputLen) +{ + return SEED_Decrypt((SEEDContext *)cx, output, outputLen, maxOutputLen, + input, inputLen); +} +#endif /* NSS_DISABLE_DEPRECATED_SEED */ + +SECStatus +rsa_PublicKeyOp(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + RSAPublicKey *pubKey = (RSAPublicKey *)params->pubKey; + SECStatus rv = RSA_PublicKeyOp(pubKey, output->data, input->data); + if (rv == SECSuccess) { + output->len = pubKey->modulus.data[0] ? pubKey->modulus.len : pubKey->modulus.len - 1; + } + return rv; +} + +SECStatus +rsa_PrivateKeyOp(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + RSAPrivateKey *privKey = (RSAPrivateKey *)params->privKey; + SECStatus rv = RSA_PrivateKeyOp(privKey, output->data, input->data); + if (rv == SECSuccess) { + output->len = privKey->modulus.data[0] ? privKey->modulus.len : privKey->modulus.len - 1; + } + return rv; +} + +SECStatus +rsa_signDigestPSS(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + bltestRSAParams *rsaParams = ¶ms->cipherParams.rsa; + return RSA_SignPSS((RSAPrivateKey *)params->privKey, + rsaParams->hashAlg, + rsaParams->maskHashAlg, + rsaParams->seed.buf.data, + rsaParams->seed.buf.len, + output->data, &output->len, output->len, + input->data, input->len); +} + +SECStatus +rsa_verifyDigestPSS(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + bltestRSAParams *rsaParams = ¶ms->cipherParams.rsa; + return RSA_CheckSignPSS((RSAPublicKey *)params->pubKey, + rsaParams->hashAlg, + rsaParams->maskHashAlg, + rsaParams->seed.buf.len, + output->data, output->len, + input->data, input->len); +} + +SECStatus +rsa_encryptOAEP(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + bltestRSAParams *rsaParams = ¶ms->cipherParams.rsa; + return RSA_EncryptOAEP((RSAPublicKey *)params->pubKey, + rsaParams->hashAlg, + rsaParams->maskHashAlg, + NULL, 0, + rsaParams->seed.buf.data, + rsaParams->seed.buf.len, + output->data, &output->len, output->len, + input->data, input->len); +} + +SECStatus +rsa_decryptOAEP(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + bltestRSAParams *rsaParams = ¶ms->cipherParams.rsa; + return RSA_DecryptOAEP((RSAPrivateKey *)params->privKey, + rsaParams->hashAlg, + rsaParams->maskHashAlg, + NULL, 0, + output->data, &output->len, output->len, + input->data, input->len); +} + +SECStatus +dsa_signDigest(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + if (params->cipherParams.dsa.sigseed.buf.len > 0) { + return DSA_SignDigestWithSeed((DSAPrivateKey *)params->privKey, + output, input, + params->cipherParams.dsa.sigseed.buf.data); + } + return DSA_SignDigest((DSAPrivateKey *)params->privKey, output, input); +} + +SECStatus +dsa_verifyDigest(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + return DSA_VerifyDigest((DSAPublicKey *)params->pubKey, output, input); +} + +SECStatus +ecdsa_signDigest(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + if (params->cipherParams.ecdsa.sigseed.buf.len > 0) { + return ECDSA_SignDigestWithSeed( + (ECPrivateKey *)params->privKey, + output, input, + params->cipherParams.ecdsa.sigseed.buf.data, + params->cipherParams.ecdsa.sigseed.buf.len); + } + return ECDSA_SignDigest((ECPrivateKey *)params->privKey, output, input); +} + +SECStatus +ecdsa_verifyDigest(void *cx, SECItem *output, const SECItem *input) +{ + bltestAsymKeyParams *params = (bltestAsymKeyParams *)cx; + return ECDSA_VerifyDigest((ECPublicKey *)params->pubKey, output, input); +} + +SECStatus +bltest_des_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + PRIntervalTime time1, time2; + bltestSymmKeyParams *desp = &cipherInfo->params.sk; + int minorMode; + int i; + switch (cipherInfo->mode) { + case bltestDES_ECB: + minorMode = NSS_DES; + break; + case bltestDES_CBC: + minorMode = NSS_DES_CBC; + break; + case bltestDES_EDE_ECB: + minorMode = NSS_DES_EDE3; + break; + case bltestDES_EDE_CBC: + minorMode = NSS_DES_EDE3_CBC; + break; + default: + return SECFailure; + } + cipherInfo->cx = (void *)DES_CreateContext(desp->key.buf.data, + desp->iv.buf.data, + minorMode, encrypt); + if (cipherInfo->cxreps > 0) { + DESContext **dummycx; + dummycx = PORT_Alloc(cipherInfo->cxreps * sizeof(DESContext *)); + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummycx[i] = (void *)DES_CreateContext(desp->key.buf.data, + desp->iv.buf.data, + minorMode, encrypt); + } + TIMEFINISH(cipherInfo->cxtime, 1.0); + for (i = 0; i < cipherInfo->cxreps; i++) { + DES_DestroyContext(dummycx[i], PR_TRUE); + } + PORT_Free(dummycx); + } + if (encrypt) + cipherInfo->cipher.symmkeyCipher = des_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = des_Decrypt; + return SECSuccess; +} + +#ifndef NSS_DISABLE_DEPRECATED_RC2 +SECStatus +bltest_rc2_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + PRIntervalTime time1, time2; + bltestSymmKeyParams *rc2p = &cipherInfo->params.sk; + int minorMode; + int i; + switch (cipherInfo->mode) { + case bltestRC2_ECB: + minorMode = NSS_RC2; + break; + case bltestRC2_CBC: + minorMode = NSS_RC2_CBC; + break; + default: + return SECFailure; + } + cipherInfo->cx = (void *)RC2_CreateContext(rc2p->key.buf.data, + rc2p->key.buf.len, + rc2p->iv.buf.data, + minorMode, + rc2p->key.buf.len); + if (cipherInfo->cxreps > 0) { + RC2Context **dummycx; + dummycx = PORT_Alloc(cipherInfo->cxreps * sizeof(RC2Context *)); + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummycx[i] = (void *)RC2_CreateContext(rc2p->key.buf.data, + rc2p->key.buf.len, + rc2p->iv.buf.data, + minorMode, + rc2p->key.buf.len); + } + TIMEFINISH(cipherInfo->cxtime, 1.0); + for (i = 0; i < cipherInfo->cxreps; i++) { + RC2_DestroyContext(dummycx[i], PR_TRUE); + } + PORT_Free(dummycx); + } + if (encrypt) + cipherInfo->cipher.symmkeyCipher = rc2_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = rc2_Decrypt; + return SECSuccess; +} +#endif /* NSS_DISABLE_DEPRECATED_RC2 */ + +SECStatus +bltest_rc4_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + PRIntervalTime time1, time2; + int i; + bltestSymmKeyParams *rc4p = &cipherInfo->params.sk; + cipherInfo->cx = (void *)RC4_CreateContext(rc4p->key.buf.data, + rc4p->key.buf.len); + if (cipherInfo->cxreps > 0) { + RC4Context **dummycx; + dummycx = PORT_Alloc(cipherInfo->cxreps * sizeof(RC4Context *)); + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummycx[i] = (void *)RC4_CreateContext(rc4p->key.buf.data, + rc4p->key.buf.len); + } + TIMEFINISH(cipherInfo->cxtime, 1.0); + for (i = 0; i < cipherInfo->cxreps; i++) { + RC4_DestroyContext(dummycx[i], PR_TRUE); + } + PORT_Free(dummycx); + } + if (encrypt) + cipherInfo->cipher.symmkeyCipher = rc4_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = rc4_Decrypt; + return SECSuccess; +} + +SECStatus +bltest_rc5_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ +#ifdef NSS_SOFTOKEN_DOES_RC5 + PRIntervalTime time1, time2; + bltestRC5Params *rc5p = &cipherInfo->params.rc5; + int minorMode; + switch (cipherInfo->mode) { + case bltestRC5_ECB: + minorMode = NSS_RC5; + break; + case bltestRC5_CBC: + minorMode = NSS_RC5_CBC; + break; + default: + return SECFailure; + } + TIMESTART(); + cipherInfo->cx = (void *)RC5_CreateContext(&rc5p->key.buf, + rc5p->rounds, rc5p->wordsize, + rc5p->iv.buf.data, minorMode); + TIMEFINISH(cipherInfo->cxtime, 1.0); + if (encrypt) + cipherInfo->cipher.symmkeyCipher = RC5_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = RC5_Decrypt; + return SECSuccess; +#else + return SECFailure; +#endif +} + +SECStatus +bltest_aes_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + bltestSymmKeyParams *aesp = &cipherInfo->params.sk; + bltestAuthSymmKeyParams *gcmp = &cipherInfo->params.ask; + int minorMode; + int i; + int keylen = aesp->key.buf.len; + unsigned int blocklen = AES_BLOCK_SIZE; + PRIntervalTime time1, time2; + unsigned char *params; + int len; + CK_AES_CTR_PARAMS ctrParams; + CK_NSS_GCM_PARAMS gcmParams; + + params = aesp->iv.buf.data; + switch (cipherInfo->mode) { + case bltestAES_ECB: + minorMode = NSS_AES; + break; + case bltestAES_CBC: + minorMode = NSS_AES_CBC; + break; + case bltestAES_CTS: + minorMode = NSS_AES_CTS; + break; + case bltestAES_CTR: + minorMode = NSS_AES_CTR; + ctrParams.ulCounterBits = 32; + len = PR_MIN(aesp->iv.buf.len, blocklen); + PORT_Memset(ctrParams.cb, 0, blocklen); + PORT_Memcpy(ctrParams.cb, aesp->iv.buf.data, len); + params = (unsigned char *)&ctrParams; + break; + case bltestAES_GCM: + minorMode = NSS_AES_GCM; + gcmParams.pIv = gcmp->sk.iv.buf.data; + gcmParams.ulIvLen = gcmp->sk.iv.buf.len; + gcmParams.pAAD = gcmp->aad.buf.data; + gcmParams.ulAADLen = gcmp->aad.buf.len; + gcmParams.ulTagBits = blocklen * 8; + params = (unsigned char *)&gcmParams; + break; + default: + return SECFailure; + } + cipherInfo->cx = (void *)AES_CreateContext(aesp->key.buf.data, + params, + minorMode, encrypt, + keylen, blocklen); + if (cipherInfo->cxreps > 0) { + AESContext **dummycx; + dummycx = PORT_Alloc(cipherInfo->cxreps * sizeof(AESContext *)); + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummycx[i] = (void *)AES_CreateContext(aesp->key.buf.data, + params, + minorMode, encrypt, + keylen, blocklen); + } + TIMEFINISH(cipherInfo->cxtime, 1.0); + for (i = 0; i < cipherInfo->cxreps; i++) { + AES_DestroyContext(dummycx[i], PR_TRUE); + } + PORT_Free(dummycx); + } + if (encrypt) + cipherInfo->cipher.symmkeyCipher = aes_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = aes_Decrypt; + return SECSuccess; +} + +SECStatus +bltest_camellia_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + bltestSymmKeyParams *camelliap = &cipherInfo->params.sk; + int minorMode; + int i; + int keylen = camelliap->key.buf.len; + PRIntervalTime time1, time2; + + switch (cipherInfo->mode) { + case bltestCAMELLIA_ECB: + minorMode = NSS_CAMELLIA; + break; + case bltestCAMELLIA_CBC: + minorMode = NSS_CAMELLIA_CBC; + break; + default: + return SECFailure; + } + cipherInfo->cx = (void *)Camellia_CreateContext(camelliap->key.buf.data, + camelliap->iv.buf.data, + minorMode, encrypt, + keylen); + if (cipherInfo->cxreps > 0) { + CamelliaContext **dummycx; + dummycx = PORT_Alloc(cipherInfo->cxreps * sizeof(CamelliaContext *)); + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummycx[i] = (void *)Camellia_CreateContext(camelliap->key.buf.data, + camelliap->iv.buf.data, + minorMode, encrypt, + keylen); + } + TIMEFINISH(cipherInfo->cxtime, 1.0); + for (i = 0; i < cipherInfo->cxreps; i++) { + Camellia_DestroyContext(dummycx[i], PR_TRUE); + } + PORT_Free(dummycx); + } + if (encrypt) + cipherInfo->cipher.symmkeyCipher = camellia_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = camellia_Decrypt; + return SECSuccess; +} + +#ifndef NSS_DISABLE_DEPRECATED_SEED +SECStatus +bltest_seed_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + PRIntervalTime time1, time2; + bltestSymmKeyParams *seedp = &cipherInfo->params.sk; + int minorMode; + int i; + + switch (cipherInfo->mode) { + case bltestSEED_ECB: + minorMode = NSS_SEED; + break; + case bltestSEED_CBC: + minorMode = NSS_SEED_CBC; + break; + default: + return SECFailure; + } + cipherInfo->cx = (void *)SEED_CreateContext(seedp->key.buf.data, + seedp->iv.buf.data, + minorMode, encrypt); + if (cipherInfo->cxreps > 0) { + SEEDContext **dummycx; + dummycx = PORT_Alloc(cipherInfo->cxreps * sizeof(SEEDContext *)); + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummycx[i] = (void *)SEED_CreateContext(seedp->key.buf.data, + seedp->iv.buf.data, + minorMode, encrypt); + } + TIMEFINISH(cipherInfo->cxtime, 1.0); + for (i = 0; i < cipherInfo->cxreps; i++) { + SEED_DestroyContext(dummycx[i], PR_TRUE); + } + PORT_Free(dummycx); + } + if (encrypt) + cipherInfo->cipher.symmkeyCipher = seed_Encrypt; + else + cipherInfo->cipher.symmkeyCipher = seed_Decrypt; + + return SECSuccess; +} +#endif /* NSS_DISABLE_DEPRECATED_SEED */ + +SECStatus +bltest_chacha20_ctr_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + const PRUint32 counter = 1; + bltestSymmKeyParams *sk = &cipherInfo->params.sk; + cipherInfo->cx = ChaCha20_CreateContext(sk->key.buf.data, sk->key.buf.len, + sk->iv.buf.data, sk->iv.buf.len, + counter); + + if (cipherInfo->cx == NULL) { + PR_fprintf(PR_STDERR, "ChaCha20_CreateContext() returned NULL\n" + "key must be 32 bytes, iv must be 12 bytes\n"); + return SECFailure; + } + cipherInfo->cipher.symmkeyCipher = chacha20_Encrypt; + return SECSuccess; +} + +SECStatus +bltest_chacha20_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + const unsigned int tagLen = 16; + const bltestSymmKeyParams *sk = &cipherInfo->params.sk; + cipherInfo->cx = ChaCha20Poly1305_CreateContext(sk->key.buf.data, + sk->key.buf.len, tagLen); + + if (encrypt) + cipherInfo->cipher.aeadCipher = chacha20_poly1305_Encrypt; + else + cipherInfo->cipher.aeadCipher = chacha20_poly1305_Decrypt; + return SECSuccess; +} + +SECStatus +bltest_rsa_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + int i; + RSAPrivateKey **dummyKey; + RSAPrivateKey *privKey; + RSAPublicKey *pubKey; + PRIntervalTime time1, time2; + + bltestAsymKeyParams *asymk = &cipherInfo->params.asymk; + bltestRSAParams *rsap = &asymk->cipherParams.rsa; + + /* RSA key gen was done during parameter setup */ + cipherInfo->cx = asymk; + privKey = (RSAPrivateKey *)asymk->privKey; + + /* For performance testing */ + if (cipherInfo->cxreps > 0) { + /* Create space for n private key objects */ + dummyKey = (RSAPrivateKey **)PORT_Alloc(cipherInfo->cxreps * + sizeof(RSAPrivateKey *)); + /* Time n keygens, storing in the array */ + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) + dummyKey[i] = RSA_NewKey(rsap->keysizeInBits, + &privKey->publicExponent); + TIMEFINISH(cipherInfo->cxtime, cipherInfo->cxreps); + /* Free the n key objects */ + for (i = 0; i < cipherInfo->cxreps; i++) + PORT_FreeArena(dummyKey[i]->arena, PR_TRUE); + PORT_Free(dummyKey); + } + + if ((encrypt && !is_sigCipher(cipherInfo->mode)) || + (!encrypt && is_sigCipher(cipherInfo->mode))) { + /* Have to convert private key to public key. Memory + * is freed with private key's arena */ + pubKey = (RSAPublicKey *)PORT_ArenaAlloc(privKey->arena, + sizeof(RSAPublicKey)); + pubKey->modulus.len = privKey->modulus.len; + pubKey->modulus.data = privKey->modulus.data; + pubKey->publicExponent.len = privKey->publicExponent.len; + pubKey->publicExponent.data = privKey->publicExponent.data; + asymk->pubKey = (void *)pubKey; + } + switch (cipherInfo->mode) { + case bltestRSA: + cipherInfo->cipher.pubkeyCipher = encrypt ? rsa_PublicKeyOp + : rsa_PrivateKeyOp; + break; + case bltestRSA_PSS: + cipherInfo->cipher.pubkeyCipher = encrypt ? rsa_signDigestPSS + : rsa_verifyDigestPSS; + break; + case bltestRSA_OAEP: + cipherInfo->cipher.pubkeyCipher = encrypt ? rsa_encryptOAEP + : rsa_decryptOAEP; + break; + default: + break; + } + return SECSuccess; +} + +SECStatus +blapi_pqg_param_gen(unsigned int keysize, PQGParams **pqg, PQGVerify **vfy) +{ + if (keysize < 1024) { + int j = PQG_PBITS_TO_INDEX(keysize); + return PQG_ParamGen(j, pqg, vfy); + } + return PQG_ParamGenV2(keysize, 0, 0, pqg, vfy); +} + +SECStatus +bltest_pqg_init(bltestDSAParams *dsap) +{ + SECStatus rv, res; + PQGVerify *vfy = NULL; + rv = blapi_pqg_param_gen(dsap->keysize, &dsap->pqg, &vfy); + CHECKERROR(rv, __LINE__); + rv = PQG_VerifyParams(dsap->pqg, vfy, &res); + CHECKERROR(res, __LINE__); + CHECKERROR(rv, __LINE__); + return rv; +} + +SECStatus +bltest_dsa_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + int i; + DSAPrivateKey **dummyKey; + PQGParams *dummypqg; + PRIntervalTime time1, time2; + bltestAsymKeyParams *asymk = &cipherInfo->params.asymk; + bltestDSAParams *dsap = &asymk->cipherParams.dsa; + PQGVerify *ignore = NULL; + cipherInfo->cx = asymk; + /* For performance testing */ + if (cipherInfo->cxreps > 0) { + /* Create space for n private key objects */ + dummyKey = (DSAPrivateKey **)PORT_ZAlloc(cipherInfo->cxreps * + sizeof(DSAPrivateKey *)); + /* Time n keygens, storing in the array */ + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + dummypqg = NULL; + blapi_pqg_param_gen(dsap->keysize, &dummypqg, &ignore); + DSA_NewKey(dummypqg, &dummyKey[i]); + } + TIMEFINISH(cipherInfo->cxtime, cipherInfo->cxreps); + /* Free the n key objects */ + for (i = 0; i < cipherInfo->cxreps; i++) + PORT_FreeArena(dummyKey[i]->params.arena, PR_TRUE); + PORT_Free(dummyKey); + } + if (!dsap->pqg && dsap->pqgdata.buf.len > 0) { + dsap->pqg = pqg_from_filedata(cipherInfo->arena, &dsap->pqgdata.buf); + } + if (!asymk->privKey && asymk->key.buf.len > 0) { + asymk->privKey = dsakey_from_filedata(cipherInfo->arena, &asymk->key.buf); + } + if (encrypt) { + cipherInfo->cipher.pubkeyCipher = dsa_signDigest; + } else { + /* Have to convert private key to public key. Memory + * is freed with private key's arena */ + DSAPublicKey *pubkey; + DSAPrivateKey *key = (DSAPrivateKey *)asymk->privKey; + pubkey = (DSAPublicKey *)PORT_ArenaZAlloc(key->params.arena, + sizeof(DSAPublicKey)); + pubkey->params.prime.len = key->params.prime.len; + pubkey->params.prime.data = key->params.prime.data; + pubkey->params.subPrime.len = key->params.subPrime.len; + pubkey->params.subPrime.data = key->params.subPrime.data; + pubkey->params.base.len = key->params.base.len; + pubkey->params.base.data = key->params.base.data; + pubkey->publicValue.len = key->publicValue.len; + pubkey->publicValue.data = key->publicValue.data; + asymk->pubKey = pubkey; + cipherInfo->cipher.pubkeyCipher = dsa_verifyDigest; + } + return SECSuccess; +} + +SECStatus +bltest_ecdsa_init(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + int i; + ECPrivateKey **dummyKey; + PRIntervalTime time1, time2; + bltestAsymKeyParams *asymk = &cipherInfo->params.asymk; + cipherInfo->cx = asymk; + /* For performance testing */ + if (cipherInfo->cxreps > 0) { + /* Create space for n private key objects */ + dummyKey = (ECPrivateKey **)PORT_ZAlloc(cipherInfo->cxreps * + sizeof(ECPrivateKey *)); + /* Time n keygens, storing in the array */ + TIMESTART(); + for (i = 0; i < cipherInfo->cxreps; i++) { + EC_NewKey(&((ECPrivateKey *)asymk->privKey)->ecParams, &dummyKey[i]); + } + TIMEFINISH(cipherInfo->cxtime, cipherInfo->cxreps); + /* Free the n key objects */ + for (i = 0; i < cipherInfo->cxreps; i++) + PORT_FreeArena(dummyKey[i]->ecParams.arena, PR_TRUE); + PORT_Free(dummyKey); + } + if (!asymk->privKey && asymk->key.buf.len > 0) { + asymk->privKey = eckey_from_filedata(cipherInfo->arena, &asymk->key.buf); + } + if (encrypt) { + cipherInfo->cipher.pubkeyCipher = ecdsa_signDigest; + } else { + /* Have to convert private key to public key. Memory + * is freed with private key's arena */ + ECPublicKey *pubkey; + ECPrivateKey *key = (ECPrivateKey *)asymk->privKey; + pubkey = (ECPublicKey *)PORT_ArenaZAlloc(key->ecParams.arena, + sizeof(ECPublicKey)); + pubkey->ecParams.type = key->ecParams.type; + pubkey->ecParams.fieldID.size = key->ecParams.fieldID.size; + pubkey->ecParams.fieldID.type = key->ecParams.fieldID.type; + pubkey->ecParams.fieldID.u.prime.len = key->ecParams.fieldID.u.prime.len; + pubkey->ecParams.fieldID.u.prime.data = key->ecParams.fieldID.u.prime.data; + pubkey->ecParams.fieldID.k1 = key->ecParams.fieldID.k1; + pubkey->ecParams.fieldID.k2 = key->ecParams.fieldID.k2; + pubkey->ecParams.fieldID.k3 = key->ecParams.fieldID.k3; + pubkey->ecParams.curve.a.len = key->ecParams.curve.a.len; + pubkey->ecParams.curve.a.data = key->ecParams.curve.a.data; + pubkey->ecParams.curve.b.len = key->ecParams.curve.b.len; + pubkey->ecParams.curve.b.data = key->ecParams.curve.b.data; + pubkey->ecParams.curve.seed.len = key->ecParams.curve.seed.len; + pubkey->ecParams.curve.seed.data = key->ecParams.curve.seed.data; + pubkey->ecParams.base.len = key->ecParams.base.len; + pubkey->ecParams.base.data = key->ecParams.base.data; + pubkey->ecParams.order.len = key->ecParams.order.len; + pubkey->ecParams.order.data = key->ecParams.order.data; + pubkey->ecParams.cofactor = key->ecParams.cofactor; + pubkey->ecParams.DEREncoding.len = key->ecParams.DEREncoding.len; + pubkey->ecParams.DEREncoding.data = key->ecParams.DEREncoding.data; + pubkey->ecParams.name = key->ecParams.name; + pubkey->publicValue.len = key->publicValue.len; + pubkey->publicValue.data = key->publicValue.data; + asymk->pubKey = pubkey; + cipherInfo->cipher.pubkeyCipher = ecdsa_verifyDigest; + } + return SECSuccess; +} + +/* XXX unfortunately, this is not defined in blapi.h */ +SECStatus +md2_HashBuf(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + unsigned int len; + MD2Context *cx = MD2_NewContext(); + if (cx == NULL) + return SECFailure; + MD2_Begin(cx); + MD2_Update(cx, src, src_length); + MD2_End(cx, dest, &len, MD2_LENGTH); + MD2_DestroyContext(cx, PR_TRUE); + return SECSuccess; +} + +SECStatus +md2_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + MD2Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + SECStatus rv = SECSuccess; + cx = MD2_NewContext(); + MD2_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + MD2_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = MD2_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + MD2_Flatten(cx, cxbytes); + cx_cpy = MD2_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: MD2_Resurrect failed!\n", progName); + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + MD2_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: MD2_restart failed!\n", progName); + goto finish; + } + MD2_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + MD2_End(cx, dest, &len, MD2_LENGTH); +finish: + MD2_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +md5_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + SECStatus rv = SECSuccess; + MD5Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + cx = MD5_NewContext(); + MD5_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + MD5_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = MD5_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + MD5_Flatten(cx, cxbytes); + cx_cpy = MD5_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: MD5_Resurrect failed!\n", progName); + rv = SECFailure; + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + MD5_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: MD5_restart failed!\n", progName); + goto finish; + } + MD5_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + MD5_End(cx, dest, &len, MD5_LENGTH); +finish: + MD5_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +sha1_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + SECStatus rv = SECSuccess; + SHA1Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + cx = SHA1_NewContext(); + SHA1_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + SHA1_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = SHA1_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + SHA1_Flatten(cx, cxbytes); + cx_cpy = SHA1_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: SHA1_Resurrect failed!\n", progName); + rv = SECFailure; + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + SHA1_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: SHA1_restart failed!\n", progName); + goto finish; + } + SHA1_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + SHA1_End(cx, dest, &len, MD5_LENGTH); +finish: + SHA1_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +SHA224_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + SECStatus rv = SECSuccess; + SHA224Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + cx = SHA224_NewContext(); + SHA224_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + SHA224_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = SHA224_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + SHA224_Flatten(cx, cxbytes); + cx_cpy = SHA224_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: SHA224_Resurrect failed!\n", progName); + rv = SECFailure; + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + SHA224_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: SHA224_restart failed!\n", progName); + goto finish; + } + + SHA224_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + SHA224_End(cx, dest, &len, MD5_LENGTH); +finish: + SHA224_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +SHA256_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + SECStatus rv = SECSuccess; + SHA256Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + cx = SHA256_NewContext(); + SHA256_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + SHA256_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = SHA256_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + SHA256_Flatten(cx, cxbytes); + cx_cpy = SHA256_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: SHA256_Resurrect failed!\n", progName); + rv = SECFailure; + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + SHA256_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: SHA256_restart failed!\n", progName); + goto finish; + } + SHA256_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + SHA256_End(cx, dest, &len, MD5_LENGTH); +finish: + SHA256_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +SHA384_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + SECStatus rv = SECSuccess; + SHA384Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + cx = SHA384_NewContext(); + SHA384_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + SHA384_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = SHA384_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + SHA384_Flatten(cx, cxbytes); + cx_cpy = SHA384_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: SHA384_Resurrect failed!\n", progName); + rv = SECFailure; + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + SHA384_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: SHA384_restart failed!\n", progName); + goto finish; + } + SHA384_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + SHA384_End(cx, dest, &len, MD5_LENGTH); +finish: + SHA384_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +SHA512_restart(unsigned char *dest, const unsigned char *src, PRUint32 src_length) +{ + SECStatus rv = SECSuccess; + SHA512Context *cx, *cx_cpy; + unsigned char *cxbytes; + unsigned int len; + unsigned int i, quarter; + cx = SHA512_NewContext(); + SHA512_Begin(cx); + /* divide message by 4, restarting 3 times */ + quarter = (src_length + 3) / 4; + for (i = 0; i < 4 && src_length > 0; i++) { + SHA512_Update(cx, src + i * quarter, PR_MIN(quarter, src_length)); + len = SHA512_FlattenSize(cx); + cxbytes = PORT_Alloc(len); + SHA512_Flatten(cx, cxbytes); + cx_cpy = SHA512_Resurrect(cxbytes, NULL); + if (!cx_cpy) { + PR_fprintf(PR_STDERR, "%s: SHA512_Resurrect failed!\n", progName); + rv = SECFailure; + goto finish; + } + rv = PORT_Memcmp(cx, cx_cpy, len); + if (rv) { + SHA512_DestroyContext(cx_cpy, PR_TRUE); + PR_fprintf(PR_STDERR, "%s: SHA512_restart failed!\n", progName); + goto finish; + } + SHA512_DestroyContext(cx_cpy, PR_TRUE); + PORT_Free(cxbytes); + src_length -= quarter; + } + SHA512_End(cx, dest, &len, MD5_LENGTH); +finish: + SHA512_DestroyContext(cx, PR_TRUE); + return rv; +} + +SECStatus +pubkeyInitKey(bltestCipherInfo *cipherInfo, PRFileDesc *file, + int keysize, int exponent, char *curveName) +{ + int i; + SECStatus rv = SECSuccess; + bltestAsymKeyParams *asymk = &cipherInfo->params.asymk; + bltestRSAParams *rsap; + RSAPrivateKey **rsaKey = NULL; + bltestDSAParams *dsap; + DSAPrivateKey **dsaKey = NULL; + SECItem *tmpECParamsDER; + ECParams *tmpECParams = NULL; + SECItem ecSerialize[3]; + ECPrivateKey **ecKey = NULL; + switch (cipherInfo->mode) { + case bltestRSA: + case bltestRSA_PSS: + case bltestRSA_OAEP: + rsap = &asymk->cipherParams.rsa; + rsaKey = (RSAPrivateKey **)&asymk->privKey; + if (keysize > 0) { + SECItem expitem = { 0, 0, 0 }; + SECITEM_AllocItem(cipherInfo->arena, &expitem, sizeof(int)); + for (i = 1; i <= sizeof(int); i++) + expitem.data[i - 1] = exponent >> (8 * (sizeof(int) - i)); + *rsaKey = RSA_NewKey(keysize * 8, &expitem); + serialize_key(&(*rsaKey)->version, 9, file); + rsap->keysizeInBits = keysize * 8; + } else { + setupIO(cipherInfo->arena, &asymk->key, file, NULL, 0); + *rsaKey = rsakey_from_filedata(cipherInfo->arena, &asymk->key.buf); + rsap->keysizeInBits = (*rsaKey)->modulus.len * 8; + } + break; + case bltestDSA: + dsap = &asymk->cipherParams.dsa; + dsaKey = (DSAPrivateKey **)&asymk->privKey; + if (keysize > 0) { + dsap->keysize = keysize * 8; + if (!dsap->pqg) + bltest_pqg_init(dsap); + rv = DSA_NewKey(dsap->pqg, dsaKey); + CHECKERROR(rv, __LINE__); + serialize_key(&(*dsaKey)->params.prime, 5, file); + } else { + setupIO(cipherInfo->arena, &asymk->key, file, NULL, 0); + *dsaKey = dsakey_from_filedata(cipherInfo->arena, &asymk->key.buf); + dsap->keysize = (*dsaKey)->params.prime.len * 8; + } + break; + case bltestECDSA: + ecKey = (ECPrivateKey **)&asymk->privKey; + if (curveName != NULL) { + tmpECParamsDER = getECParams(curveName); + rv = SECOID_Init(); + CHECKERROR(rv, __LINE__); + rv = EC_DecodeParams(tmpECParamsDER, &tmpECParams) == SECFailure; + CHECKERROR(rv, __LINE__); + rv = EC_NewKey(tmpECParams, ecKey); + CHECKERROR(rv, __LINE__); + ecSerialize[0].type = tmpECParamsDER->type; + ecSerialize[0].data = tmpECParamsDER->data; + ecSerialize[0].len = tmpECParamsDER->len; + ecSerialize[1].type = (*ecKey)->publicValue.type; + ecSerialize[1].data = (*ecKey)->publicValue.data; + ecSerialize[1].len = (*ecKey)->publicValue.len; + ecSerialize[2].type = (*ecKey)->privateValue.type; + ecSerialize[2].data = (*ecKey)->privateValue.data; + ecSerialize[2].len = (*ecKey)->privateValue.len; + serialize_key(&(ecSerialize[0]), 3, file); + SECITEM_FreeItem(tmpECParamsDER, PR_TRUE); + PORT_FreeArena(tmpECParams->arena, PR_TRUE); + rv = SECOID_Shutdown(); + CHECKERROR(rv, __LINE__); + } else { + setupIO(cipherInfo->arena, &asymk->key, file, NULL, 0); + *ecKey = eckey_from_filedata(cipherInfo->arena, &asymk->key.buf); + } + break; + default: + return SECFailure; + } + return SECSuccess; +} + +SECStatus +cipherInit(bltestCipherInfo *cipherInfo, PRBool encrypt) +{ + PRBool restart; + int outlen; + switch (cipherInfo->mode) { + case bltestDES_ECB: + case bltestDES_CBC: + case bltestDES_EDE_ECB: + case bltestDES_EDE_CBC: + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + cipherInfo->input.pBuf.len); + return bltest_des_init(cipherInfo, encrypt); + break; +#ifndef NSS_DISABLE_DEPRECATED_RC2 + case bltestRC2_ECB: + case bltestRC2_CBC: + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + cipherInfo->input.pBuf.len); + return bltest_rc2_init(cipherInfo, encrypt); + break; +#endif /* NSS_DISABLE_DEPRECATED_RC2 */ + case bltestRC4: + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + cipherInfo->input.pBuf.len); + return bltest_rc4_init(cipherInfo, encrypt); + break; +#ifdef NSS_SOFTOKEN_DOES_RC5 + case bltestRC5_ECB: + case bltestRC5_CBC: + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + cipherInfo->input.pBuf.len); + return bltest_rc5_init(cipherInfo, encrypt); + break; +#endif + case bltestAES_ECB: + case bltestAES_CBC: + case bltestAES_CTS: + case bltestAES_CTR: + case bltestAES_GCM: + outlen = cipherInfo->input.pBuf.len; + if (cipherInfo->mode == bltestAES_GCM && encrypt) { + outlen += 16; + } + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, outlen); + return bltest_aes_init(cipherInfo, encrypt); + break; + case bltestCAMELLIA_ECB: + case bltestCAMELLIA_CBC: + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + cipherInfo->input.pBuf.len); + return bltest_camellia_init(cipherInfo, encrypt); + break; +#ifndef NSS_DISABLE_DEPRECATED_SEED + case bltestSEED_ECB: + case bltestSEED_CBC: + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + cipherInfo->input.pBuf.len); + return bltest_seed_init(cipherInfo, encrypt); + break; +#endif /* NSS_DISABLE_DEPRECATED_SEED */ + case bltestCHACHA20_CTR: + outlen = cipherInfo->input.pBuf.len; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, outlen); + return bltest_chacha20_ctr_init(cipherInfo, encrypt); + break; + case bltestCHACHA20: + outlen = cipherInfo->input.pBuf.len + (encrypt ? 16 : 0); + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, outlen); + return bltest_chacha20_init(cipherInfo, encrypt); + break; + case bltestRSA: + case bltestRSA_OAEP: + case bltestRSA_PSS: + if (encrypt || cipherInfo->mode != bltestRSA_PSS) { + /* Don't allocate a buffer for PSS in verify mode, as no actual + * output is produced. */ + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + RSA_MAX_MODULUS_BITS / 8); + } + return bltest_rsa_init(cipherInfo, encrypt); + break; + case bltestDSA: + if (encrypt) { + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + DSA_MAX_SIGNATURE_LEN); + } + return bltest_dsa_init(cipherInfo, encrypt); + break; + case bltestECDSA: + if (encrypt) { + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + 2 * MAX_ECKEY_LEN); + } + return bltest_ecdsa_init(cipherInfo, encrypt); + break; + case bltestMD2: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + MD2_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? md2_restart : md2_HashBuf; + return SECSuccess; + break; + case bltestMD5: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + MD5_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? md5_restart : MD5_HashBuf; + return SECSuccess; + break; + case bltestSHA1: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + SHA1_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? sha1_restart : SHA1_HashBuf; + return SECSuccess; + break; + case bltestSHA224: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + SHA224_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? SHA224_restart + : SHA224_HashBuf; + return SECSuccess; + break; + case bltestSHA256: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + SHA256_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? SHA256_restart + : SHA256_HashBuf; + return SECSuccess; + break; + case bltestSHA384: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + SHA384_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? SHA384_restart + : SHA384_HashBuf; + return SECSuccess; + break; + case bltestSHA512: + restart = cipherInfo->params.hash.restart; + SECITEM_AllocItem(cipherInfo->arena, &cipherInfo->output.buf, + SHA512_LENGTH); + cipherInfo->cipher.hashCipher = (restart) ? SHA512_restart + : SHA512_HashBuf; + return SECSuccess; + break; + default: + return SECFailure; + } + return SECSuccess; +} + +SECStatus +cipherDoOp(bltestCipherInfo *cipherInfo) +{ + PRIntervalTime time1, time2; + SECStatus rv = SECSuccess; + int i; + unsigned int len; + unsigned int maxLen = cipherInfo->output.pBuf.len; + unsigned char *dummyOut; + dummyOut = PORT_Alloc(maxLen); + if (is_symmkeyCipher(cipherInfo->mode)) { + const unsigned char *input = cipherInfo->input.pBuf.data; + unsigned int inputLen = is_singleShotCipher(cipherInfo->mode) ? cipherInfo->input.pBuf.len + : PR_MIN(cipherInfo->input.pBuf.len, 16); + unsigned char *output = cipherInfo->output.pBuf.data; + unsigned int outputLen = maxLen; + unsigned int totalOutputLen = 0; + TIMESTART(); + rv = (*cipherInfo->cipher.symmkeyCipher)(cipherInfo->cx, + output, &len, outputLen, + input, inputLen); + CHECKERROR(rv, __LINE__); + totalOutputLen += len; + if (cipherInfo->input.pBuf.len > inputLen) { + input += inputLen; + inputLen = cipherInfo->input.pBuf.len - inputLen; + output += len; + outputLen -= len; + rv = (*cipherInfo->cipher.symmkeyCipher)(cipherInfo->cx, + output, &len, outputLen, + input, inputLen); + CHECKERROR(rv, __LINE__); + totalOutputLen += len; + } + cipherInfo->output.pBuf.len = totalOutputLen; + TIMEFINISH(cipherInfo->optime, 1.0); + cipherInfo->repetitions = 0; + if (cipherInfo->repetitionsToPerfom != 0) { + TIMESTART(); + for (i = 0; i < cipherInfo->repetitionsToPerfom; i++, + cipherInfo->repetitions++) { + (*cipherInfo->cipher.symmkeyCipher)(cipherInfo->cx, dummyOut, + &len, maxLen, + cipherInfo->input.pBuf.data, + cipherInfo->input.pBuf.len); + + CHECKERROR(rv, __LINE__); + } + } else { + int opsBetweenChecks = 0; + TIMEMARK(cipherInfo->seconds); + while (!(TIMETOFINISH())) { + int j = 0; + for (; j < opsBetweenChecks; j++) { + (*cipherInfo->cipher.symmkeyCipher)( + cipherInfo->cx, dummyOut, &len, maxLen, + cipherInfo->input.pBuf.data, + cipherInfo->input.pBuf.len); + } + cipherInfo->repetitions += j; + } + } + TIMEFINISH(cipherInfo->optime, 1.0); + } else if (is_aeadCipher(cipherInfo->mode)) { + const unsigned char *input = cipherInfo->input.pBuf.data; + unsigned int inputLen = cipherInfo->input.pBuf.len; + unsigned char *output = cipherInfo->output.pBuf.data; + unsigned int outputLen; + bltestSymmKeyParams *sk = &cipherInfo->params.sk; + bltestAuthSymmKeyParams *ask = &cipherInfo->params.ask; + + TIMESTART(); + rv = (*cipherInfo->cipher.aeadCipher)( + cipherInfo->cx, + output, &outputLen, maxLen, + input, inputLen, + sk->iv.buf.data, sk->iv.buf.len, + ask->aad.buf.data, ask->aad.buf.len); + CHECKERROR(rv, __LINE__); + cipherInfo->output.pBuf.len = outputLen; + TIMEFINISH(cipherInfo->optime, 1.0); + + cipherInfo->repetitions = 0; + if (cipherInfo->repetitionsToPerfom != 0) { + TIMESTART(); + for (i = 0; i < cipherInfo->repetitionsToPerfom; i++, + cipherInfo->repetitions++) { + rv = (*cipherInfo->cipher.aeadCipher)( + cipherInfo->cx, + output, &outputLen, maxLen, + input, inputLen, + sk->iv.buf.data, sk->iv.buf.len, + ask->aad.buf.data, ask->aad.buf.len); + CHECKERROR(rv, __LINE__); + } + } else { + int opsBetweenChecks = 0; + TIMEMARK(cipherInfo->seconds); + while (!(TIMETOFINISH())) { + int j = 0; + for (; j < opsBetweenChecks; j++) { + (*cipherInfo->cipher.aeadCipher)( + cipherInfo->cx, + output, &outputLen, maxLen, + input, inputLen, + sk->iv.buf.data, sk->iv.buf.len, + ask->aad.buf.data, ask->aad.buf.len); + } + cipherInfo->repetitions += j; + } + } + TIMEFINISH(cipherInfo->optime, 1.0); + } else if (is_pubkeyCipher(cipherInfo->mode)) { + TIMESTART(); + rv = (*cipherInfo->cipher.pubkeyCipher)(cipherInfo->cx, + &cipherInfo->output.pBuf, + &cipherInfo->input.pBuf); + TIMEFINISH(cipherInfo->optime, 1.0); + CHECKERROR(rv, __LINE__); + cipherInfo->repetitions = 0; + if (cipherInfo->repetitionsToPerfom != 0) { + TIMESTART(); + for (i = 0; i < cipherInfo->repetitionsToPerfom; + i++, cipherInfo->repetitions++) { + SECItem dummy; + dummy.data = dummyOut; + dummy.len = maxLen; + (*cipherInfo->cipher.pubkeyCipher)(cipherInfo->cx, &dummy, + &cipherInfo->input.pBuf); + CHECKERROR(rv, __LINE__); + } + } else { + int opsBetweenChecks = 0; + TIMEMARK(cipherInfo->seconds); + while (!(TIMETOFINISH())) { + int j = 0; + for (; j < opsBetweenChecks; j++) { + SECItem dummy; + dummy.data = dummyOut; + dummy.len = maxLen; + (*cipherInfo->cipher.pubkeyCipher)(cipherInfo->cx, &dummy, + &cipherInfo->input.pBuf); + CHECKERROR(rv, __LINE__); + } + cipherInfo->repetitions += j; + } + } + TIMEFINISH(cipherInfo->optime, 1.0); + } else if (is_hashCipher(cipherInfo->mode)) { + TIMESTART(); + rv = (*cipherInfo->cipher.hashCipher)(cipherInfo->output.pBuf.data, + cipherInfo->input.pBuf.data, + cipherInfo->input.pBuf.len); + TIMEFINISH(cipherInfo->optime, 1.0); + CHECKERROR(rv, __LINE__); + cipherInfo->repetitions = 0; + if (cipherInfo->repetitionsToPerfom != 0) { + TIMESTART(); + for (i = 0; i < cipherInfo->repetitionsToPerfom; + i++, cipherInfo->repetitions++) { + (*cipherInfo->cipher.hashCipher)(dummyOut, + cipherInfo->input.pBuf.data, + cipherInfo->input.pBuf.len); + CHECKERROR(rv, __LINE__); + } + } else { + int opsBetweenChecks = 0; + TIMEMARK(cipherInfo->seconds); + while (!(TIMETOFINISH())) { + int j = 0; + for (; j < opsBetweenChecks; j++) { + bltestIO *input = &cipherInfo->input; + (*cipherInfo->cipher.hashCipher)(dummyOut, + input->pBuf.data, + input->pBuf.len); + CHECKERROR(rv, __LINE__); + } + cipherInfo->repetitions += j; + } + } + TIMEFINISH(cipherInfo->optime, 1.0); + } + PORT_Free(dummyOut); + return rv; +} + +SECStatus +cipherFinish(bltestCipherInfo *cipherInfo) +{ + SECStatus rv = SECSuccess; + + switch (cipherInfo->mode) { + case bltestDES_ECB: + case bltestDES_CBC: + case bltestDES_EDE_ECB: + case bltestDES_EDE_CBC: + DES_DestroyContext((DESContext *)cipherInfo->cx, PR_TRUE); + break; + case bltestAES_GCM: + case bltestAES_ECB: + case bltestAES_CBC: + case bltestAES_CTS: + case bltestAES_CTR: + AES_DestroyContext((AESContext *)cipherInfo->cx, PR_TRUE); + break; + case bltestCAMELLIA_ECB: + case bltestCAMELLIA_CBC: + Camellia_DestroyContext((CamelliaContext *)cipherInfo->cx, PR_TRUE); + break; +#ifndef NSS_DISABLE_DEPRECATED_SEED + case bltestSEED_ECB: + case bltestSEED_CBC: + SEED_DestroyContext((SEEDContext *)cipherInfo->cx, PR_TRUE); + break; +#endif /* NSS_DISABLE_DEPRECATED_SEED */ + case bltestCHACHA20_CTR: + ChaCha20_DestroyContext((ChaCha20Context *)cipherInfo->cx, PR_TRUE); + break; + case bltestCHACHA20: + ChaCha20Poly1305_DestroyContext((ChaCha20Poly1305Context *) + cipherInfo->cx, + PR_TRUE); + break; +#ifndef NSS_DISABLE_DEPRECATED_RC2 + case bltestRC2_ECB: + case bltestRC2_CBC: + RC2_DestroyContext((RC2Context *)cipherInfo->cx, PR_TRUE); + break; +#endif /* NSS_DISABLE_DEPRECATED_RC2 */ + case bltestRC4: + RC4_DestroyContext((RC4Context *)cipherInfo->cx, PR_TRUE); + break; +#ifdef NSS_SOFTOKEN_DOES_RC5 + case bltestRC5_ECB: + case bltestRC5_CBC: + RC5_DestroyContext((RC5Context *)cipherInfo->cx, PR_TRUE); + break; +#endif + case bltestRSA: /* keys are alloc'ed within cipherInfo's arena, */ + case bltestRSA_PSS: /* will be freed with it. */ + case bltestRSA_OAEP: + case bltestDSA: + case bltestECDSA: + case bltestMD2: /* hash contexts are ephemeral */ + case bltestMD5: + case bltestSHA1: + case bltestSHA224: + case bltestSHA256: + case bltestSHA384: + case bltestSHA512: + return SECSuccess; + break; + default: + return SECFailure; + } + return rv; +} + +void +print_exponent(SECItem *exp) +{ + int i; + int e = 0; + if (exp->len <= 4) { + for (i = exp->len; i >= 0; --i) + e |= exp->data[exp->len - i] << 8 * (i - 1); + fprintf(stdout, "%12d", e); + } else { + e = 8 * exp->len; + fprintf(stdout, "~2**%-8d", e); + } +} + +static void +splitToReportUnit(PRInt64 res, int *resArr, int *del, int size) +{ + PRInt64 remaining = res, tmp = 0; + PRInt64 Ldel; + int i = -1; + + while (remaining > 0 && ++i < size) { + LL_I2L(Ldel, del[i]); + LL_MOD(tmp, remaining, Ldel); + LL_L2I(resArr[i], tmp); + LL_DIV(remaining, remaining, Ldel); + } +} + +static char * +getHighUnitBytes(PRInt64 res) +{ + int spl[] = { 0, 0, 0, 0 }; + int del[] = { 1024, 1024, 1024, 1024 }; + char *marks[] = { "b", "Kb", "Mb", "Gb" }; + int i = 3; + + splitToReportUnit(res, spl, del, 4); + + for (; i > 0; i--) { + if (spl[i] != 0) { + break; + } + } + + if (i == 0) + return PR_smprintf("%d%s", spl[i], marks[i]); + else + return PR_smprintf("%d%s %d%s", spl[i], marks[i], spl[i - 1], marks[i - 1]); +} + +static void +printPR_smpString(const char *sformat, char *reportStr, + const char *nformat, PRInt64 rNum) +{ + if (reportStr) { + fprintf(stdout, sformat, reportStr); + PR_smprintf_free(reportStr); + } else { + fprintf(stdout, nformat, rNum); + } +} + +static char * +getHighUnitOps(PRInt64 res) +{ + int spl[] = { 0, 0, 0, 0 }; + int del[] = { 1000, 1000, 1000, 1000 }; + char *marks[] = { "", "T", "M", "B" }; + int i = 3; + + splitToReportUnit(res, spl, del, 4); + + for (; i > 0; i--) { + if (spl[i] != 0) { + break; + } + } + + return PR_smprintf("%d%s", spl[i], marks[i]); +} + +void +dump_performance_info(bltestCipherInfo *infoList, double totalTimeInt, + PRBool encrypt, PRBool cxonly) +{ + bltestCipherInfo *info = infoList; + + PRInt64 totalIn = 0; + PRBool td = PR_TRUE; + + int repetitions = 0; + int cxreps = 0; + double cxtime = 0; + double optime = 0; + while (info != NULL) { + repetitions += info->repetitions; + cxreps += info->cxreps; + cxtime += info->cxtime; + optime += info->optime; + totalIn += (PRInt64)info->input.buf.len * (PRInt64)info->repetitions; + + info = info->next; + } + info = infoList; + + fprintf(stdout, "#%9s", "mode"); + fprintf(stdout, "%12s", "in"); +print_td: + switch (info->mode) { + case bltestDES_ECB: + case bltestDES_CBC: + case bltestDES_EDE_ECB: + case bltestDES_EDE_CBC: + case bltestAES_ECB: + case bltestAES_CBC: + case bltestAES_CTS: + case bltestAES_CTR: + case bltestAES_GCM: + case bltestCAMELLIA_ECB: + case bltestCAMELLIA_CBC: +#ifndef NSS_DISABLE_DEPRECATED_SEED + case bltestSEED_ECB: + case bltestSEED_CBC: +#endif +#ifndef NSS_DISABLE_DEPRECATED_RC2 + case bltestRC2_ECB: + case bltestRC2_CBC: +#endif + case bltestRC4: + if (td) + fprintf(stdout, "%8s", "symmkey"); + else + fprintf(stdout, "%8d", 8 * info->params.sk.key.buf.len); + break; +#ifdef NSS_SOFTOKEN_DOES_RC5 + case bltestRC5_ECB: + case bltestRC5_CBC: + if (info->params.sk.key.buf.len > 0) + printf("symmetric key(bytes)=%d,", info->params.sk.key.buf.len); + if (info->rounds > 0) + printf("rounds=%d,", info->params.rc5.rounds); + if (info->wordsize > 0) + printf("wordsize(bytes)=%d,", info->params.rc5.wordsize); + break; +#endif + case bltestRSA: + case bltestRSA_PSS: + case bltestRSA_OAEP: + if (td) { + fprintf(stdout, "%8s", "rsa_mod"); + fprintf(stdout, "%12s", "rsa_pe"); + } else { + bltestAsymKeyParams *asymk = &info->params.asymk; + fprintf(stdout, "%8d", asymk->cipherParams.rsa.keysizeInBits); + print_exponent( + &((RSAPrivateKey *)asymk->privKey)->publicExponent); + } + break; + case bltestDSA: + if (td) { + fprintf(stdout, "%8s", "pqg_mod"); + } else { + fprintf(stdout, "%8d", info->params.asymk.cipherParams.dsa.keysize); + } + break; + case bltestECDSA: + if (td) { + fprintf(stdout, "%12s", "ec_curve"); + } else { + ECPrivateKey *key = (ECPrivateKey *)info->params.asymk.privKey; + ECCurveName curveName = key->ecParams.name; + fprintf(stdout, "%12s", + ecCurve_map[curveName] ? ecCurve_map[curveName]->text : "Unsupported curve"); + } + break; + case bltestMD2: + case bltestMD5: + case bltestSHA1: + case bltestSHA256: + case bltestSHA384: + case bltestSHA512: + default: + break; + } + if (!td) { + PRInt64 totalThroughPut; + + printPR_smpString("%8s", getHighUnitOps(repetitions), + "%8d", repetitions); + + printPR_smpString("%8s", getHighUnitOps(cxreps), "%8d", cxreps); + + fprintf(stdout, "%12.3f", cxtime); + fprintf(stdout, "%12.3f", optime); + fprintf(stdout, "%12.03f", totalTimeInt / 1000); + + totalThroughPut = (PRInt64)(totalIn / totalTimeInt * 1000); + printPR_smpString("%12s", getHighUnitBytes(totalThroughPut), + "%12d", totalThroughPut); + + fprintf(stdout, "\n"); + return; + } + + fprintf(stdout, "%8s", "opreps"); + fprintf(stdout, "%8s", "cxreps"); + fprintf(stdout, "%12s", "context"); + fprintf(stdout, "%12s", "op"); + fprintf(stdout, "%12s", "time(sec)"); + fprintf(stdout, "%12s", "thrgput"); + fprintf(stdout, "\n"); + fprintf(stdout, "%8s", mode_strings[info->mode]); + fprintf(stdout, "_%c", (cxonly) ? 'c' : (encrypt) ? 'e' : 'd'); + printPR_smpString("%12s", getHighUnitBytes(totalIn), "%12d", totalIn); + + td = !td; + goto print_td; +} + +void +printmodes() +{ + bltestCipherMode mode; + int nummodes = sizeof(mode_strings) / sizeof(char *); + fprintf(stderr, "%s: Available modes (specify with -m):\n", progName); + for (mode = 0; mode < nummodes; mode++) + fprintf(stderr, "%s\n", mode_strings[mode]); +} + +bltestCipherMode +get_mode(const char *modestring) +{ + bltestCipherMode mode; + int nummodes = sizeof(mode_strings) / sizeof(char *); + for (mode = 0; mode < nummodes; mode++) + if (PL_strcmp(modestring, mode_strings[mode]) == 0) + return mode; + fprintf(stderr, "%s: invalid mode: %s\n", progName, modestring); + return bltestINVALID; +} + +void +load_file_data(PLArenaPool *arena, bltestIO *data, + char *fn, bltestIOMode ioMode) +{ + PRFileDesc *file; + data->mode = ioMode; + data->file = NULL; /* don't use -- not saving anything */ + data->pBuf.data = NULL; + data->pBuf.len = 0; + file = PR_Open(fn, PR_RDONLY, 00660); + if (file) { + setupIO(arena, data, file, NULL, 0); + PR_Close(file); + } +} + +HASH_HashType +mode_str_to_hash_alg(const SECItem *modeStr) +{ + bltestCipherMode mode; + char *tempModeStr = NULL; + if (!modeStr || modeStr->len == 0) + return HASH_AlgNULL; + tempModeStr = PORT_Alloc(modeStr->len + 1); + if (!tempModeStr) + return HASH_AlgNULL; + memcpy(tempModeStr, modeStr->data, modeStr->len); + tempModeStr[modeStr->len] = '\0'; + mode = get_mode(tempModeStr); + PORT_Free(tempModeStr); + switch (mode) { + case bltestMD2: + return HASH_AlgMD2; + case bltestMD5: + return HASH_AlgMD5; + case bltestSHA1: + return HASH_AlgSHA1; + case bltestSHA224: + return HASH_AlgSHA224; + case bltestSHA256: + return HASH_AlgSHA256; + case bltestSHA384: + return HASH_AlgSHA384; + case bltestSHA512: + return HASH_AlgSHA512; + default: + return HASH_AlgNULL; + } +} + +void +get_params(PLArenaPool *arena, bltestParams *params, + bltestCipherMode mode, int j) +{ + char filename[256]; + char *modestr = mode_strings[mode]; + bltestIO tempIO; + +#ifdef NSS_SOFTOKEN_DOES_RC5 + FILE *file; + char *mark, *param, *val; + int index = 0; +#endif + switch (mode) { + case bltestAES_GCM: + case bltestCHACHA20: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "aad", j); + load_file_data(arena, ¶ms->ask.aad, filename, bltestBinary); + case bltestDES_CBC: + case bltestDES_EDE_CBC: +#ifndef NSS_DISABLE_DEPRECATED_RC2 + case bltestRC2_CBC: +#endif + case bltestAES_CBC: + case bltestAES_CTS: + case bltestAES_CTR: + case bltestCAMELLIA_CBC: +#ifndef NSS_DISABLE_DEPRECATED_SEED + case bltestSEED_CBC: +#endif + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "iv", j); + load_file_data(arena, ¶ms->sk.iv, filename, bltestBinary); + case bltestDES_ECB: + case bltestDES_EDE_ECB: +#ifndef NSS_DISABLE_DEPRECATED_RC2 + case bltestRC2_ECB: +#endif + case bltestRC4: + case bltestAES_ECB: + case bltestCAMELLIA_ECB: +#ifndef NSS_DISABLE_DEPRECATED_SEED + case bltestSEED_ECB: +#endif + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "key", j); + load_file_data(arena, ¶ms->sk.key, filename, bltestBinary); + break; +#ifdef NSS_SOFTOKEN_DOES_RC5 + case bltestRC5_ECB: + case bltestRC5_CBC: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "iv", j); + load_file_data(arena, ¶ms->sk.iv, filename, bltestBinary); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "key", j); + load_file_data(arena, ¶ms->sk.key, filename, bltestBinary); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, + "params", j); + file = fopen(filename, "r"); + if (!file) + return; + param = malloc(100); + len = fread(param, 1, 100, file); + while (index < len) { + mark = PL_strchr(param, '='); + *mark = '\0'; + val = mark + 1; + mark = PL_strchr(val, '\n'); + *mark = '\0'; + if (PL_strcmp(param, "rounds") == 0) { + params->rc5.rounds = atoi(val); + } else if (PL_strcmp(param, "wordsize") == 0) { + params->rc5.wordsize = atoi(val); + } + index += PL_strlen(param) + PL_strlen(val) + 2; + param = mark + 1; + } + break; +#endif + case bltestRSA_PSS: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "ciphertext", j); + load_file_data(arena, ¶ms->asymk.sig, filename, bltestBase64Encoded); + /* fall through */ + case bltestRSA_OAEP: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "seed", j); + load_file_data(arena, ¶ms->asymk.cipherParams.rsa.seed, + filename, bltestBase64Encoded); + + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "hash", j); + load_file_data(arena, &tempIO, filename, bltestBinary); + params->asymk.cipherParams.rsa.hashAlg = + mode_str_to_hash_alg(&tempIO.buf); + + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "maskhash", j); + load_file_data(arena, &tempIO, filename, bltestBinary); + params->asymk.cipherParams.rsa.maskHashAlg = + mode_str_to_hash_alg(&tempIO.buf); + /* fall through */ + case bltestRSA: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "key", j); + load_file_data(arena, ¶ms->asymk.key, filename, + bltestBase64Encoded); + params->asymk.privKey = + (void *)rsakey_from_filedata(arena, ¶ms->asymk.key.buf); + break; + case bltestDSA: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "key", j); + load_file_data(arena, ¶ms->asymk.key, filename, bltestBase64Encoded); + params->asymk.privKey = + (void *)dsakey_from_filedata(arena, ¶ms->asymk.key.buf); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "pqg", j); + load_file_data(arena, ¶ms->asymk.cipherParams.dsa.pqgdata, filename, + bltestBase64Encoded); + params->asymk.cipherParams.dsa.pqg = + pqg_from_filedata(arena, ¶ms->asymk.cipherParams.dsa.pqgdata.buf); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "keyseed", j); + load_file_data(arena, ¶ms->asymk.cipherParams.dsa.keyseed, filename, + bltestBase64Encoded); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "sigseed", j); + load_file_data(arena, ¶ms->asymk.cipherParams.dsa.sigseed, filename, + bltestBase64Encoded); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "ciphertext", j); + load_file_data(arena, ¶ms->asymk.sig, filename, bltestBase64Encoded); + break; + case bltestECDSA: + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "key", j); + load_file_data(arena, ¶ms->asymk.key, filename, bltestBase64Encoded); + params->asymk.privKey = + (void *)eckey_from_filedata(arena, ¶ms->asymk.key.buf); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "sigseed", j); + load_file_data(arena, ¶ms->asymk.cipherParams.ecdsa.sigseed, + filename, bltestBase64Encoded); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, "ciphertext", j); + load_file_data(arena, ¶ms->asymk.sig, filename, bltestBase64Encoded); + break; + case bltestMD2: + case bltestMD5: + case bltestSHA1: + case bltestSHA224: + case bltestSHA256: + case bltestSHA384: + case bltestSHA512: + /*params->hash.restart = PR_TRUE;*/ + params->hash.restart = PR_FALSE; + break; + default: + break; + } +} + +SECStatus +verify_self_test(bltestIO *result, bltestIO *cmp, bltestCipherMode mode, + PRBool forward, SECStatus sigstatus) +{ + PRBool equal; + char *modestr = mode_strings[mode]; + equal = SECITEM_ItemsAreEqual(&result->pBuf, &cmp->buf); + if (is_sigCipher(mode)) { + if (forward) { + if (equal) { + printf("Signature self-test for %s passed.\n", modestr); + } else { + printf("Signature self-test for %s failed!\n", modestr); + } + return equal ? SECSuccess : SECFailure; + } else { + if (sigstatus == SECSuccess) { + printf("Verification self-test for %s passed.\n", modestr); + } else { + printf("Verification self-test for %s failed!\n", modestr); + } + return sigstatus; + } + } else if (is_hashCipher(mode)) { + if (equal) { + printf("Hash self-test for %s passed.\n", modestr); + } else { + printf("Hash self-test for %s failed!\n", modestr); + } + } else { + if (forward) { + if (equal) { + printf("Encryption self-test for %s passed.\n", modestr); + } else { + printf("Encryption self-test for %s failed!\n", modestr); + } + } else { + if (equal) { + printf("Decryption self-test for %s passed.\n", modestr); + } else { + printf("Decryption self-test for %s failed!\n", modestr); + } + } + } + return equal ? SECSuccess : SECFailure; +} + +static SECStatus +ReadFileToItem(PLArenaPool *arena, SECItem *dst, const char *filename) +{ + SECItem tmp = { siBuffer, NULL, 0 }; + PRFileDesc *file; + SECStatus rv; + + file = PR_Open(filename, PR_RDONLY, 00660); + if (!file) { + return SECFailure; + } + rv = SECU_FileToItem(&tmp, file); + rv |= SECITEM_CopyItem(arena, dst, &tmp); + SECITEM_FreeItem(&tmp, PR_FALSE); + PR_Close(file); + return rv; +} + +static SECStatus +blapi_selftest(bltestCipherMode *modes, int numModes, int inoff, int outoff, + PRBool encrypt, PRBool decrypt) +{ + bltestCipherInfo cipherInfo; + bltestIO pt, ct; + bltestCipherMode mode; + bltestParams *params; + unsigned int i, j, nummodes, numtests; + char *modestr; + char filename[256]; + PLArenaPool *arena; + SECItem item; + SECStatus rv = SECSuccess, srv; + + PORT_Memset(&cipherInfo, 0, sizeof(cipherInfo)); + arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); + cipherInfo.arena = arena; + + nummodes = (numModes == 0) ? NUMMODES : numModes; + for (i = 0; i < nummodes; i++) { + if (numModes > 0) + mode = modes[i]; + else + mode = i; + if (mode == bltestINVALID) { + fprintf(stderr, "%s: Skipping invalid mode.\n", progName); + continue; + } + modestr = mode_strings[mode]; + cipherInfo.mode = mode; + params = &cipherInfo.params; + /* get the number of tests in the directory */ + snprintf(filename, sizeof(filename), "%s/tests/%s/%s", testdir, modestr, "numtests"); + if (ReadFileToItem(arena, &item, filename) != SECSuccess) { + fprintf(stderr, "%s: Cannot read file %s.\n", progName, filename); + rv = SECFailure; + continue; + } + /* loop over the tests in the directory */ + numtests = 0; + for (j = 0; j < item.len; j++) { + if (!isdigit(item.data[j])) { + break; + } + numtests *= 10; + numtests += (int)(item.data[j] - '0'); + } + for (j = 0; j < numtests; j++) { + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, + "plaintext", j); + load_file_data(arena, &pt, filename, + is_sigCipher(mode) ? bltestBase64Encoded + : bltestBinary); + snprintf(filename, sizeof(filename), "%s/tests/%s/%s%d", testdir, modestr, + "ciphertext", j); + load_file_data(arena, &ct, filename, bltestBase64Encoded); + + get_params(arena, params, mode, j); + /* Forward Operation (Encrypt/Sign/Hash) + ** Align the input buffer (plaintext) according to request + ** then perform operation and compare to ciphertext + */ + if (encrypt) { + rv |= bltestCopyIO(arena, &cipherInfo.input, &pt); + misalignBuffer(arena, &cipherInfo.input, inoff); + memset(&cipherInfo.output.buf, 0, sizeof cipherInfo.output.buf); + rv |= cipherInit(&cipherInfo, PR_TRUE); + misalignBuffer(arena, &cipherInfo.output, outoff); + rv |= cipherDoOp(&cipherInfo); + rv |= cipherFinish(&cipherInfo); + rv |= verify_self_test(&cipherInfo.output, + &ct, mode, PR_TRUE, SECSuccess); + /* If testing hash, only one op to test */ + if (is_hashCipher(mode)) + continue; + if (is_sigCipher(mode)) { + /* Verify operations support detached signature files. For + ** consistency between tests that run Sign/Verify back to + ** back (eg: self-tests) and tests that are only running + ** verify operations, copy the output into the sig buf, + ** and then copy the sig buf back out when verifying. For + ** self-tests, this is unnecessary copying, but for + ** verify-only operations, this ensures that the output + ** buffer is properly configured + */ + rv |= bltestCopyIO(arena, ¶ms->asymk.sig, &cipherInfo.output); + } + } + if (!decrypt) + continue; + /* Reverse Operation (Decrypt/Verify) + ** Align the input buffer (ciphertext) according to request + ** then perform operation and compare to plaintext + */ + if (is_sigCipher(mode)) { + rv |= bltestCopyIO(arena, &cipherInfo.input, &pt); + rv |= bltestCopyIO(arena, &cipherInfo.output, ¶ms->asymk.sig); + } else { + rv |= bltestCopyIO(arena, &cipherInfo.input, &ct); + memset(&cipherInfo.output.buf, 0, sizeof cipherInfo.output.buf); + } + misalignBuffer(arena, &cipherInfo.input, inoff); + rv |= cipherInit(&cipherInfo, PR_FALSE); + misalignBuffer(arena, &cipherInfo.output, outoff); + srv = SECSuccess; + srv |= cipherDoOp(&cipherInfo); + rv |= cipherFinish(&cipherInfo); + rv |= verify_self_test(&cipherInfo.output, + &pt, mode, PR_FALSE, srv); + } + } + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +SECStatus +dump_file(bltestCipherMode mode, char *filename) +{ + bltestIO keydata; + PLArenaPool *arena = NULL; + arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); + if (!arena) { + return SECFailure; + } + if (mode == bltestRSA || mode == bltestRSA_PSS || mode == bltestRSA_OAEP) { + RSAPrivateKey *key; + load_file_data(arena, &keydata, filename, bltestBase64Encoded); + key = rsakey_from_filedata(arena, &keydata.buf); + dump_rsakey(key); + } else if (mode == bltestDSA) { +#if 0 + PQGParams *pqg; + get_file_data(filename, &item, PR_TRUE); + pqg = pqg_from_filedata(&item); + dump_pqg(pqg); +#endif + DSAPrivateKey *key; + load_file_data(arena, &keydata, filename, bltestBase64Encoded); + key = dsakey_from_filedata(arena, &keydata.buf); + dump_dsakey(key); + } else if (mode == bltestECDSA) { + ECPrivateKey *key; + load_file_data(arena, &keydata, filename, bltestBase64Encoded); + key = eckey_from_filedata(arena, &keydata.buf); + dump_eckey(key); + } + PORT_FreeArena(arena, PR_FALSE); + return SECFailure; +} + +void +ThreadExecTest(void *data) +{ + bltestCipherInfo *cipherInfo = (bltestCipherInfo *)data; + + if (cipherInfo->mCarlo == PR_TRUE) { + int mciter; + for (mciter = 0; mciter < 10000; mciter++) { + cipherDoOp(cipherInfo); + memcpy(cipherInfo->input.buf.data, + cipherInfo->output.buf.data, + cipherInfo->input.buf.len); + } + } else { + cipherDoOp(cipherInfo); + } + cipherFinish(cipherInfo); +} + +static void +rsaPrivKeyReset(RSAPrivateKey *tstKey) +{ + PLArenaPool *arena; + + tstKey->version.data = NULL; + tstKey->version.len = 0; + tstKey->modulus.data = NULL; + tstKey->modulus.len = 0; + tstKey->publicExponent.data = NULL; + tstKey->publicExponent.len = 0; + tstKey->privateExponent.data = NULL; + tstKey->privateExponent.len = 0; + tstKey->prime1.data = NULL; + tstKey->prime1.len = 0; + tstKey->prime2.data = NULL; + tstKey->prime2.len = 0; + tstKey->exponent1.data = NULL; + tstKey->exponent1.len = 0; + tstKey->exponent2.data = NULL; + tstKey->exponent2.len = 0; + tstKey->coefficient.data = NULL; + tstKey->coefficient.len = 0; + + arena = tstKey->arena; + tstKey->arena = NULL; + if (arena) { + PORT_FreeArena(arena, PR_TRUE); + } +} + +#define RSA_TEST_EQUAL(comp) \ + if (!SECITEM_ItemsAreEqual(&(src->comp), &(dest->comp))) { \ + fprintf(stderr, "key->" #comp " not equal"); \ + if (src->comp.len != dest->comp.len) { \ + fprintf(stderr, "src_len = %d, dest_len = %d", \ + src->comp.len, dest->comp.len); \ + } \ + fprintf(stderr, "\n"); \ + areEqual = PR_FALSE; \ + } + +static PRBool +rsaPrivKeysAreEqual(RSAPrivateKey *src, RSAPrivateKey *dest) +{ + PRBool areEqual = PR_TRUE; + RSA_TEST_EQUAL(modulus) + RSA_TEST_EQUAL(publicExponent) + RSA_TEST_EQUAL(privateExponent) + RSA_TEST_EQUAL(prime1) + RSA_TEST_EQUAL(prime2) + RSA_TEST_EQUAL(exponent1) + RSA_TEST_EQUAL(exponent2) + RSA_TEST_EQUAL(coefficient) + if (!areEqual) { + fprintf(stderr, "original key:\n"); + dump_rsakey(src); + fprintf(stderr, "recreated key:\n"); + dump_rsakey(dest); + } + return areEqual; +} + +static int +doRSAPopulateTestKV() +{ + RSAPrivateKey tstKey = { 0 }; + SECStatus rv; + int failed = 0; + int i; + + tstKey.arena = NULL; + + /* Test public exponent, private exponent, modulus cases from + * pkcs1v15sign-vectors.txt. Some are valid PKCS#1 keys but not valid RSA + * ones (de = 1 mod lcm(p − 1, q − 1)) + */ + for (i = 0; i < PR_ARRAY_SIZE(PKCS1_VECTORS); ++i) { + struct pkcs1_test_vector *v = &PKCS1_VECTORS[i]; + + rsaPrivKeyReset(&tstKey); + tstKey.privateExponent.data = v->d; + tstKey.privateExponent.len = v->d_len; + tstKey.publicExponent.data = v->e; + tstKey.publicExponent.len = v->e_len; + tstKey.modulus.data = v->n; + tstKey.modulus.len = v->n_len; + + rv = RSA_PopulatePrivateKey(&tstKey); + if (rv != SECSuccess) { + fprintf(stderr, "RSA Populate failed: pkcs1v15sign-vector %d\n", i); + failed = 1; + } else if (memcmp(v->q, tstKey.prime1.data, v->q_len) || + tstKey.prime1.len != v->q_len) { + fprintf(stderr, "RSA Populate key mismatch: pkcs1v15sign-vector %d q\n", i); + failed = 1; + } else if (memcmp(v->p, tstKey.prime2.data, v->p_len) || + tstKey.prime1.len != v->p_len) { + fprintf(stderr, "RSA Populate key mismatch: pkcs1v15sign-vector %d p\n", i); + failed = 1; + } else { + fprintf(stderr, "RSA Populate success: pkcs1v15sign-vector %d p\n", i); + } + } + + PORT_FreeArena(tstKey.arena, PR_TRUE); + return failed; +} + +/* + * Test the RSA populate command to see that it can really build + * keys from its components. + */ +static int +doRSAPopulateTest(unsigned int keySize, unsigned long exponent) +{ + RSAPrivateKey *srcKey; + RSAPrivateKey tstKey = { 0 }; + SECItem expitem = { 0, 0, 0 }; + SECStatus rv; + unsigned char pubExp[32]; + int expLen = 0; + int failed = 0; + int i; + + for (i = 0; i < sizeof(unsigned long); i++) { + int shift = (sizeof(unsigned long) - i - 1) * 8; + if (expLen || (exponent && ((unsigned long)0xffL << shift))) { + pubExp[expLen] = (unsigned char)((exponent >> shift) & 0xff); + expLen++; + } + } + + expitem.data = pubExp; + expitem.len = expLen; + + srcKey = RSA_NewKey(keySize, &expitem); + if (srcKey == NULL) { + fprintf(stderr, "RSA Key Gen failed"); + return -1; + } + + /* test the basic case - most common, public exponent, modulus, prime */ + tstKey.arena = NULL; + rsaPrivKeyReset(&tstKey); + + tstKey.publicExponent = srcKey->publicExponent; + tstKey.modulus = srcKey->modulus; + tstKey.prime1 = srcKey->prime1; + + rv = RSA_PopulatePrivateKey(&tstKey); + if (rv != SECSuccess) { + fprintf(stderr, "RSA Populate failed: pubExp mod p\n"); + failed = 1; + } else if (!rsaPrivKeysAreEqual(&tstKey, srcKey)) { + fprintf(stderr, "RSA Populate key mismatch: pubExp mod p\n"); + failed = 1; + } + + /* test the basic2 case, public exponent, modulus, prime2 */ + rsaPrivKeyReset(&tstKey); + + tstKey.publicExponent = srcKey->publicExponent; + tstKey.modulus = srcKey->modulus; + tstKey.prime1 = srcKey->prime2; /* test with q in the prime1 position */ + + rv = RSA_PopulatePrivateKey(&tstKey); + if (rv != SECSuccess) { + fprintf(stderr, "RSA Populate failed: pubExp mod q\n"); + failed = 1; + } else if (!rsaPrivKeysAreEqual(&tstKey, srcKey)) { + fprintf(stderr, "RSA Populate key mismatch: pubExp mod q\n"); + failed = 1; + } + + /* test the medium case, private exponent, prime1, prime2 */ + rsaPrivKeyReset(&tstKey); + + tstKey.privateExponent = srcKey->privateExponent; + tstKey.prime1 = srcKey->prime2; /* purposefully swap them to make */ + tstKey.prime2 = srcKey->prime1; /* sure populated swaps them back */ + + rv = RSA_PopulatePrivateKey(&tstKey); + if (rv != SECSuccess) { + fprintf(stderr, "RSA Populate failed: privExp p q\n"); + failed = 1; + } else if (!rsaPrivKeysAreEqual(&tstKey, srcKey)) { + fprintf(stderr, "RSA Populate key mismatch: privExp p q\n"); + failed = 1; + } + + /* test the advanced case, public exponent, private exponent, prime2 */ + rsaPrivKeyReset(&tstKey); + + tstKey.privateExponent = srcKey->privateExponent; + tstKey.publicExponent = srcKey->publicExponent; + tstKey.prime2 = srcKey->prime2; /* use q in the prime2 position */ + + rv = RSA_PopulatePrivateKey(&tstKey); + if (rv != SECSuccess) { + fprintf(stderr, "RSA Populate failed: pubExp privExp q\n"); + fprintf(stderr, " - not fatal\n"); + /* it's possible that we can't uniquely determine the original key + * from just the exponents and prime. Populate returns an error rather + * than return the wrong key. */ + } else if (!rsaPrivKeysAreEqual(&tstKey, srcKey)) { + /* if we returned a key, it *must* be correct */ + fprintf(stderr, "RSA Populate key mismatch: pubExp privExp q\n"); + rv = RSA_PrivateKeyCheck(&tstKey); + failed = 1; + } + + /* test the advanced case2, public exponent, private exponent, modulus */ + rsaPrivKeyReset(&tstKey); + + tstKey.privateExponent = srcKey->privateExponent; + tstKey.publicExponent = srcKey->publicExponent; + tstKey.modulus = srcKey->modulus; + + rv = RSA_PopulatePrivateKey(&tstKey); + if (rv != SECSuccess) { + fprintf(stderr, "RSA Populate failed: pubExp privExp mod\n"); + failed = 1; + } else if (!rsaPrivKeysAreEqual(&tstKey, srcKey)) { + fprintf(stderr, "RSA Populate key mismatch: pubExp privExp mod\n"); + failed = 1; + } + + PORT_FreeArena(srcKey->arena, PR_TRUE); + return failed ? -1 : 0; +} + +/* bltest commands */ +enum { + cmd_Decrypt = 0, + cmd_Encrypt, + cmd_FIPS, + cmd_Hash, + cmd_Nonce, + cmd_Dump, + cmd_RSAPopulate, + cmd_RSAPopulateKV, + cmd_Sign, + cmd_SelfTest, + cmd_Verify +}; + +/* bltest options */ +enum { + opt_B64 = 0, + opt_BufSize, + opt_Restart, + opt_SelfTestDir, + opt_Exponent, + opt_SigFile, + opt_KeySize, + opt_Hex, + opt_Input, + opt_PQGFile, + opt_Key, + opt_HexWSpc, + opt_Mode, + opt_CurveName, + opt_Output, + opt_Repetitions, + opt_ZeroBuf, + opt_Rounds, + opt_Seed, + opt_SigSeedFile, + opt_CXReps, + opt_IV, + opt_WordSize, + opt_UseSeed, + opt_UseSigSeed, + opt_SeedFile, + opt_AAD, + opt_InputOffset, + opt_OutputOffset, + opt_MonteCarlo, + opt_ThreadNum, + opt_SecondsToRun, + 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 } +}; + +int +main(int argc, char **argv) +{ + SECStatus rv = SECFailure; + + double totalTime = 0.0; + PRIntervalTime time1, time2; + PRFileDesc *outfile = NULL; + bltestCipherInfo *cipherInfoListHead, *cipherInfo = NULL; + bltestIOMode ioMode; + int bufsize, exponent, curThrdNum; + char *curveName = NULL; + int i, commandsEntered; + int inoff, outoff; + int threads = 1; + + secuCommand bltest; + bltest.numCommands = sizeof(bltest_commands) / sizeof(secuCommandFlag); + bltest.numOptions = sizeof(bltest_options) / sizeof(secuCommandFlag); + bltest.commands = bltest_commands; + bltest.options = bltest_options; + + progName = strrchr(argv[0], '/'); + if (!progName) + progName = strrchr(argv[0], '\\'); + progName = progName ? progName + 1 : argv[0]; + + rv = NSS_InitializePRErrorTable(); + if (rv != SECSuccess) { + SECU_PrintPRandOSError(progName); + return -1; + } + rv = RNG_RNGInit(); + if (rv != SECSuccess) { + SECU_PrintPRandOSError(progName); + return -1; + } + rv = BL_Init(); + if (rv != SECSuccess) { + SECU_PrintPRandOSError(progName); + return -1; + } + RNG_SystemInfoForRNG(); + + rv = SECU_ParseCommandLine(argc, argv, progName, &bltest); + if (rv == SECFailure) { + fprintf(stderr, "%s: command line parsing error!\n", progName); + goto print_usage; + } + rv = SECFailure; + + cipherInfo = PORT_ZNew(bltestCipherInfo); + cipherInfoListHead = cipherInfo; + + /* Check the number of commands entered on the command line. */ + commandsEntered = 0; + for (i = 0; i < bltest.numCommands; i++) + if (bltest.commands[i].activated) + commandsEntered++; + + if (commandsEntered > 1 && + !(commandsEntered == 2 && bltest.commands[cmd_SelfTest].activated)) { + fprintf(stderr, "%s: one command at a time!\n", progName); + goto print_usage; + } + + if (commandsEntered == 0) { + fprintf(stderr, "%s: you must enter a command!\n", progName); + goto print_usage; + } + + if (bltest.commands[cmd_Sign].activated) + bltest.commands[cmd_Encrypt].activated = PR_TRUE; + if (bltest.commands[cmd_Verify].activated) + bltest.commands[cmd_Decrypt].activated = PR_TRUE; + if (bltest.commands[cmd_Hash].activated) + bltest.commands[cmd_Encrypt].activated = PR_TRUE; + + inoff = outoff = 0; + if (bltest.options[opt_InputOffset].activated) + inoff = PORT_Atoi(bltest.options[opt_InputOffset].arg); + if (bltest.options[opt_OutputOffset].activated) + outoff = PORT_Atoi(bltest.options[opt_OutputOffset].arg); + + testdir = (bltest.options[opt_SelfTestDir].activated) ? strdup(bltest.options[opt_SelfTestDir].arg) + : "."; + + /* + * Handle three simple cases first + */ + + /* test the RSA_PopulatePrivateKey function with known vectors */ + if (bltest.commands[cmd_RSAPopulateKV].activated) { + PORT_Free(cipherInfo); + return doRSAPopulateTestKV(); + } + + /* test the RSA_PopulatePrivateKey function */ + if (bltest.commands[cmd_RSAPopulate].activated) { + unsigned int keySize = 1024; + unsigned long keyExponent = 65537; + int rounds = 1; + int ret = -1; + + if (bltest.options[opt_KeySize].activated) { + keySize = PORT_Atoi(bltest.options[opt_KeySize].arg); + } + if (bltest.options[opt_Rounds].activated) { + rounds = PORT_Atoi(bltest.options[opt_Rounds].arg); + } + if (bltest.options[opt_Exponent].activated) { + keyExponent = PORT_Atoi(bltest.options[opt_Exponent].arg); + } + + for (i = 0; i < rounds; i++) { + printf("Running RSA Populate test round %d\n", i); + ret = doRSAPopulateTest(keySize, keyExponent); + if (ret != 0) { + break; + } + } + if (ret != 0) { + fprintf(stderr, "RSA Populate test round %d: FAILED\n", i); + } + PORT_Free(cipherInfo); + return ret; + } + + /* Do BLAPI self-test */ + if (bltest.commands[cmd_SelfTest].activated) { + PRBool encrypt = PR_TRUE, decrypt = PR_TRUE; + /* user may specified a set of ciphers to test. parse them. */ + bltestCipherMode modesToTest[NUMMODES]; + int numModesToTest = 0; + char *tok, *str; + str = bltest.options[opt_Mode].arg; + while (str) { + tok = strchr(str, ','); + if (tok) + *tok = '\0'; + modesToTest[numModesToTest++] = get_mode(str); + if (tok) { + *tok = ','; + str = tok + 1; + } else { + break; + } + } + if (bltest.commands[cmd_Decrypt].activated && + !bltest.commands[cmd_Encrypt].activated) + encrypt = PR_FALSE; + if (bltest.commands[cmd_Encrypt].activated && + !bltest.commands[cmd_Decrypt].activated) + decrypt = PR_FALSE; + rv = blapi_selftest(modesToTest, numModesToTest, inoff, outoff, + encrypt, decrypt); + PORT_Free(cipherInfo); + return rv == SECSuccess ? 0 : 1; + } + + /* Do FIPS self-test */ + if (bltest.commands[cmd_FIPS].activated) { + PORT_Free(cipherInfo); +#ifdef NSS_FIPS_DISABLED + fprintf(stdout, "FIPS self-test failed with: NSS_FIPS_DISABLED\n"); + return SECFailure; +#else + CK_RV ckrv = sftk_FIPSEntryOK(PR_FALSE); + if (ckrv == CKR_OK) { + fprintf(stdout, "FIPS self-test was successful.\n"); + return SECSuccess; + } + fprintf(stdout, "FIPS self-test failed with the CK_RV: %ld.\n", ckrv); + return SECFailure; +#endif + } + + /* + * Check command line arguments for Encrypt/Decrypt/Hash/Sign/Verify + */ + + if ((bltest.commands[cmd_Decrypt].activated || + bltest.commands[cmd_Verify].activated) && + bltest.options[opt_BufSize].activated) { + fprintf(stderr, "%s: Cannot use a nonce as input to decrypt/verify.\n", + progName); + goto print_usage; + } + + if (bltest.options[opt_Mode].activated) { + cipherInfo->mode = get_mode(bltest.options[opt_Mode].arg); + if (cipherInfo->mode == bltestINVALID) { + goto print_usage; + } + } else { + fprintf(stderr, "%s: You must specify a cipher mode with -m.\n", + progName); + goto print_usage; + } + + if (bltest.options[opt_Repetitions].activated && + bltest.options[opt_SecondsToRun].activated) { + fprintf(stderr, "%s: Operation time should be defined in either " + "repetitions(-p) or seconds(-5) not both", + progName); + goto print_usage; + } + + if (bltest.options[opt_Repetitions].activated) { + cipherInfo->repetitionsToPerfom = + PORT_Atoi(bltest.options[opt_Repetitions].arg); + } else { + cipherInfo->repetitionsToPerfom = 0; + } + + if (bltest.options[opt_SecondsToRun].activated) { + cipherInfo->seconds = PORT_Atoi(bltest.options[opt_SecondsToRun].arg); + } else { + cipherInfo->seconds = 0; + } + + if (bltest.options[opt_CXReps].activated) { + cipherInfo->cxreps = PORT_Atoi(bltest.options[opt_CXReps].arg); + } else { + cipherInfo->cxreps = 0; + } + + if (bltest.options[opt_ThreadNum].activated) { + threads = PORT_Atoi(bltest.options[opt_ThreadNum].arg); + if (threads <= 0) { + threads = 1; + } + } + + /* Dump a file (rsakey, dsakey, etc.) */ + if (bltest.commands[cmd_Dump].activated) { + rv = dump_file(cipherInfo->mode, bltest.options[opt_Input].arg); + PORT_Free(cipherInfo); + return rv; + } + + /* default input mode is binary */ + ioMode = (bltest.options[opt_B64].activated) + ? bltestBase64Encoded + : (bltest.options[opt_Hex].activated) + ? bltestHexStream + : (bltest.options[opt_HexWSpc].activated) ? bltestHexSpaceDelim + : bltestBinary; + + if (bltest.options[opt_Exponent].activated) + exponent = PORT_Atoi(bltest.options[opt_Exponent].arg); + else + exponent = 65537; + + if (bltest.options[opt_CurveName].activated) + curveName = PORT_Strdup(bltest.options[opt_CurveName].arg); + else + curveName = NULL; + + if (bltest.commands[cmd_Verify].activated && + !bltest.options[opt_SigFile].activated) { + fprintf(stderr, "%s: You must specify a signature file with -f.\n", + progName); + + print_usage: + if (cipherInfo) { + PORT_Free(cipherInfo); + } + Usage(); + } + + if (bltest.options[opt_MonteCarlo].activated) { + cipherInfo->mCarlo = PR_TRUE; + } else { + cipherInfo->mCarlo = PR_FALSE; + } + + for (curThrdNum = 0; curThrdNum < threads; curThrdNum++) { + int keysize = 0; + PRFileDesc *file = NULL, *infile; + bltestParams *params; + char *instr = NULL; + PLArenaPool *arena; + + if (curThrdNum > 0) { + bltestCipherInfo *newCInfo = PORT_ZNew(bltestCipherInfo); + if (!newCInfo) { + fprintf(stderr, "%s: Can not allocate memory.\n", progName); + goto exit_point; + } + newCInfo->mode = cipherInfo->mode; + newCInfo->mCarlo = cipherInfo->mCarlo; + newCInfo->repetitionsToPerfom = + cipherInfo->repetitionsToPerfom; + newCInfo->seconds = cipherInfo->seconds; + newCInfo->cxreps = cipherInfo->cxreps; + cipherInfo->next = newCInfo; + cipherInfo = newCInfo; + } + arena = PORT_NewArena(BLTEST_DEFAULT_CHUNKSIZE); + if (!arena) { + fprintf(stderr, "%s: Can not allocate memory.\n", progName); + goto exit_point; + } + cipherInfo->arena = arena; + params = &cipherInfo->params; + + /* Set up an encryption key. */ + keysize = 0; + file = NULL; + if (is_symmkeyCipher(cipherInfo->mode) || + is_aeadCipher(cipherInfo->mode)) { + char *keystr = NULL; /* if key is on command line */ + if (bltest.options[opt_Key].activated) { + if (bltest.options[opt_CmdLine].activated) { + keystr = bltest.options[opt_Key].arg; + } else { + file = PR_Open(bltest.options[opt_Key].arg, + PR_RDONLY, 00660); + } + } else { + if (bltest.options[opt_KeySize].activated) + keysize = PORT_Atoi(bltest.options[opt_KeySize].arg); + else + keysize = 8; /* use 64-bit default (DES) */ + /* save the random key for reference */ + file = PR_Open("tmp.key", PR_WRONLY | PR_CREATE_FILE, 00660); + } + params->key.mode = ioMode; + setupIO(cipherInfo->arena, ¶ms->key, file, keystr, keysize); + if (file) + PR_Close(file); + } else if (is_pubkeyCipher(cipherInfo->mode)) { + if (bltest.options[opt_Key].activated) { + file = PR_Open(bltest.options[opt_Key].arg, PR_RDONLY, 00660); + } else { + if (bltest.options[opt_KeySize].activated) + keysize = PORT_Atoi(bltest.options[opt_KeySize].arg); + else + keysize = 64; /* use 512-bit default */ + file = PR_Open("tmp.key", PR_WRONLY | PR_CREATE_FILE, 00660); + } + params->key.mode = bltestBase64Encoded; + pubkeyInitKey(cipherInfo, file, keysize, exponent, curveName); + PR_Close(file); + } + + /* set up an initialization vector. */ + if (cipher_requires_IV(cipherInfo->mode)) { + char *ivstr = NULL; + bltestSymmKeyParams *skp; + file = NULL; +#ifdef NSS_SOFTOKEN_DOES_RC5 + if (cipherInfo->mode == bltestRC5_CBC) + skp = (bltestSymmKeyParams *)¶ms->rc5; + else +#endif + skp = ¶ms->sk; + if (bltest.options[opt_IV].activated) { + if (bltest.options[opt_CmdLine].activated) { + ivstr = bltest.options[opt_IV].arg; + } else { + file = PR_Open(bltest.options[opt_IV].arg, + PR_RDONLY, 00660); + } + } else { + /* save the random iv for reference */ + file = PR_Open("tmp.iv", PR_WRONLY | PR_CREATE_FILE, 00660); + } + memset(&skp->iv, 0, sizeof skp->iv); + skp->iv.mode = ioMode; + setupIO(cipherInfo->arena, &skp->iv, file, ivstr, keysize); + if (file) { + PR_Close(file); + } + } + + /* set up an initialization vector. */ + if (is_authCipher(cipherInfo->mode)) { + char *aadstr = NULL; + bltestAuthSymmKeyParams *askp; + file = NULL; + askp = ¶ms->ask; + if (bltest.options[opt_AAD].activated) { + if (bltest.options[opt_CmdLine].activated) { + aadstr = bltest.options[opt_AAD].arg; + } else { + file = PR_Open(bltest.options[opt_AAD].arg, + PR_RDONLY, 00660); + } + } else { + file = NULL; + } + memset(&askp->aad, 0, sizeof askp->aad); + askp->aad.mode = ioMode; + setupIO(cipherInfo->arena, &askp->aad, file, aadstr, 0); + if (file) { + PR_Close(file); + } + } + + if (bltest.commands[cmd_Verify].activated) { + file = PR_Open(bltest.options[opt_SigFile].arg, PR_RDONLY, 00660); + if (is_sigCipher(cipherInfo->mode)) { + memset(¶ms->asymk.sig, 0, sizeof(bltestIO)); + params->asymk.sig.mode = ioMode; + setupIO(cipherInfo->arena, ¶ms->asymk.sig, file, NULL, 0); + } + if (file) { + PR_Close(file); + } + } + + if (bltest.options[opt_PQGFile].activated) { + file = PR_Open(bltest.options[opt_PQGFile].arg, PR_RDONLY, 00660); + params->asymk.cipherParams.dsa.pqgdata.mode = bltestBase64Encoded; + setupIO(cipherInfo->arena, ¶ms->asymk.cipherParams.dsa.pqgdata, + file, NULL, 0); + if (file) { + PR_Close(file); + } + } + + /* Set up the input buffer */ + if (bltest.options[opt_Input].activated) { + if (bltest.options[opt_CmdLine].activated) { + instr = bltest.options[opt_Input].arg; + infile = NULL; + } else { + /* form file name from testdir and input arg. */ + char *filename = bltest.options[opt_Input].arg; + if (bltest.options[opt_SelfTestDir].activated && + testdir && filename && filename[0] != '/') { + filename = PR_smprintf("%s/tests/%s/%s", testdir, + mode_strings[cipherInfo->mode], + filename); + if (!filename) { + fprintf(stderr, "%s: Can not allocate memory.\n", + progName); + goto exit_point; + } + infile = PR_Open(filename, PR_RDONLY, 00660); + PR_smprintf_free(filename); + } else { + infile = PR_Open(filename, PR_RDONLY, 00660); + } + } + } else if (bltest.options[opt_BufSize].activated) { + /* save the random plaintext for reference */ + char *tmpFName = PR_smprintf("tmp.in.%d", curThrdNum); + if (!tmpFName) { + fprintf(stderr, "%s: Can not allocate memory.\n", progName); + goto exit_point; + } + infile = PR_Open(tmpFName, PR_WRONLY | PR_CREATE_FILE, 00660); + PR_smprintf_free(tmpFName); + } else { + infile = PR_STDIN; + } + if (!infile) { + fprintf(stderr, "%s: Failed to open input file.\n", progName); + goto exit_point; + } + cipherInfo->input.mode = ioMode; + + /* Set up the output stream */ + if (bltest.options[opt_Output].activated) { + /* form file name from testdir and input arg. */ + char *filename = bltest.options[opt_Output].arg; + if (bltest.options[opt_SelfTestDir].activated && + testdir && filename && filename[0] != '/') { + filename = PR_smprintf("%s/tests/%s/%s", testdir, + mode_strings[cipherInfo->mode], + filename); + if (!filename) { + fprintf(stderr, "%s: Can not allocate memory.\n", progName); + goto exit_point; + } + outfile = PR_Open(filename, PR_WRONLY | PR_CREATE_FILE, 00660); + PR_smprintf_free(filename); + } else { + outfile = PR_Open(filename, PR_WRONLY | PR_CREATE_FILE, 00660); + } + } else { + outfile = PR_STDOUT; + } + if (!outfile) { + fprintf(stderr, "%s: Failed to open output file.\n", progName); + rv = SECFailure; + goto exit_point; + } + cipherInfo->output.mode = ioMode; + if (bltest.options[opt_SelfTestDir].activated && ioMode == bltestBinary) + cipherInfo->output.mode = bltestBase64Encoded; + + if (is_hashCipher(cipherInfo->mode)) + cipherInfo->params.hash.restart = + bltest.options[opt_Restart].activated; + + bufsize = 0; + if (bltest.options[opt_BufSize].activated) + bufsize = PORT_Atoi(bltest.options[opt_BufSize].arg); + + /*infile = NULL;*/ + setupIO(cipherInfo->arena, &cipherInfo->input, infile, instr, bufsize); + if (infile && infile != PR_STDIN) + PR_Close(infile); + misalignBuffer(cipherInfo->arena, &cipherInfo->input, inoff); + + cipherInit(cipherInfo, bltest.commands[cmd_Encrypt].activated); + misalignBuffer(cipherInfo->arena, &cipherInfo->output, outoff); + } + + if (!bltest.commands[cmd_Nonce].activated) { + TIMESTART(); + cipherInfo = cipherInfoListHead; + while (cipherInfo != NULL) { + cipherInfo->cipherThread = + PR_CreateThread(PR_USER_THREAD, + ThreadExecTest, + cipherInfo, + PR_PRIORITY_NORMAL, + PR_GLOBAL_THREAD, + PR_JOINABLE_THREAD, + 0); + cipherInfo = cipherInfo->next; + } + + cipherInfo = cipherInfoListHead; + while (cipherInfo != NULL) { + PR_JoinThread(cipherInfo->cipherThread); + finishIO(&cipherInfo->output, outfile); + cipherInfo = cipherInfo->next; + } + TIMEFINISH(totalTime, 1); + } + + cipherInfo = cipherInfoListHead; + if (cipherInfo->repetitions > 0 || cipherInfo->cxreps > 0 || + threads > 1) + dump_performance_info(cipherInfoListHead, totalTime, + bltest.commands[cmd_Encrypt].activated, + (cipherInfo->repetitions == 0)); + + rv = SECSuccess; + +exit_point: + if (outfile && outfile != PR_STDOUT) + PR_Close(outfile); + cipherInfo = cipherInfoListHead; + while (cipherInfo != NULL) { + bltestCipherInfo *tmpInfo = cipherInfo; + + if (cipherInfo->arena) + PORT_FreeArena(cipherInfo->arena, PR_TRUE); + cipherInfo = cipherInfo->next; + PORT_Free(tmpInfo); + } + + /*NSS_Shutdown();*/ + + return SECSuccess; +} diff --git a/security/nss/cmd/bltest/bltest.gyp b/security/nss/cmd/bltest/bltest.gyp new file mode 100644 index 0000000000..7139c3181d --- /dev/null +++ b/security/nss/cmd/bltest/bltest.gyp @@ -0,0 +1,35 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +{ + 'includes': [ + '../../coreconf/config.gypi', + '../../cmd/platlibs.gypi' + ], + 'targets': [ + { + 'target_name': 'bltest', + 'type': 'executable', + 'sources': [ + 'blapitest.c' + ], + 'dependencies': [ + '<(DEPTH)/exports.gyp:dbm_exports', + '<(DEPTH)/exports.gyp:nss_exports', + '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3' + ] + } + ], + 'target_defaults': { + 'include_dirs': [ + '../../nss/lib/softoken' + ], + 'defines': [ + 'NSS_USE_STATIC_LIBS' + ] + }, + 'variables': { + 'module': 'nss', + 'use_static_libs': 1 + } +} \ No newline at end of file diff --git a/security/nss/cmd/bltest/manifest.mn b/security/nss/cmd/bltest/manifest.mn new file mode 100644 index 0000000000..8b05116e5c --- /dev/null +++ b/security/nss/cmd/bltest/manifest.mn @@ -0,0 +1,20 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +CORE_DEPTH = ../.. + +MODULE = nss + +REQUIRES = seccmd dbm softoken + +INCLUDES += -I$(CORE_DEPTH)/nss/lib/softoken + +PROGRAM = bltest + +USE_STATIC_LIBS = 1 + +CSRCS = \ + blapitest.c \ + $(NULL) + diff --git a/security/nss/cmd/bltest/pkcs1_vectors.h b/security/nss/cmd/bltest/pkcs1_vectors.h new file mode 100644 index 0000000000..15812bee0b --- /dev/null +++ b/security/nss/cmd/bltest/pkcs1_vectors.h @@ -0,0 +1,804 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* Vectors from pkcs1v15sign-vectors.txt */ + +struct pkcs1_test_vector { + unsigned char *n; + unsigned long n_len; + unsigned char *e; + unsigned long e_len; + unsigned char *d; + unsigned long d_len; + unsigned char *p; + unsigned long p_len; + unsigned char *q; + unsigned long q_len; +}; + +struct pkcs1_test_vector PKCS1_VECTORS[15] = { + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, + 0x5f, 0x2a, 0x4b, 0xbe, 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, + + 0x3c, 0x56, 0x8c, 0x8f, 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, + + 0x66, 0xc8, 0xc6, 0xa3, 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, + 0x12, 0x31, 0x88, 0x44, 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, + 0xee, 0x89, 0x6a, 0x10, 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, + 0x34, 0xe4, 0x47, 0x27, 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, + 0x26, 0x83, 0x10, 0x9c, 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, + 0x31, 0xb4, 0xbd, 0x2f, 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, + 0xce, 0xe3, 0x4f, 0x9e, 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, + 0xad, 0x79, 0xc6, 0xdc, 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, + 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + }, + { + (unsigned char[]){ + 0xa5, 0x6e, 0x4a, 0x0e, 0x70, 0x10, 0x17, 0x58, 0x9a, 0x51, + 0x87, 0xdc, 0x7e, 0xa8, 0x41, 0xd1, 0x56, 0xf2, 0xec, 0x0e, + 0x36, 0xad, 0x52, 0xa4, 0x4d, 0xfe, 0xb1, 0xe6, 0x1f, 0x7a, + 0xd9, 0x91, 0xd8, 0xc5, 0x10, 0x56, 0xff, 0xed, 0xb1, 0x62, + 0xb4, 0xc0, 0xf2, 0x83, 0xa1, 0x2a, 0x88, 0xa3, 0x94, 0xdf, + 0xf5, 0x26, 0xab, 0x72, 0x91, 0xcb, 0xb3, 0x07, 0xce, 0xab, + 0xfc, 0xe0, 0xb1, 0xdf, 0xd5, 0xcd, 0x95, 0x08, 0x09, 0x6d, + 0x5b, 0x2b, 0x8b, 0x6d, 0xf5, 0xd6, 0x71, 0xef, 0x63, 0x77, + 0xc0, 0x92, 0x1c, 0xb2, 0x3c, 0x27, 0x0a, 0x70, 0xe2, 0x59, + 0x8e, 0x6f, 0xf8, 0x9d, 0x19, 0xf1, 0x05, 0xac, 0xc2, 0xd3, + 0xf0, 0xcb, 0x35, 0xf2, 0x92, 0x80, 0xe1, 0x38, 0x6b, 0x6f, + 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[]){ + 0x33, 0xa5, 0x04, 0x2a, 0x90, 0xb2, 0x7d, 0x4f, 0x54, 0x51, + 0xca, 0x9b, 0xbb, 0xd0, 0xb4, 0x47, 0x71, 0xa1, 0x01, 0xaf, + 0x88, 0x43, 0x40, 0xae, 0xf9, 0x88, 0x5f, 0x2a, 0x4b, 0xbe, + 0x92, 0xe8, 0x94, 0xa7, 0x24, 0xac, 0x3c, 0x56, 0x8c, 0x8f, + 0x97, 0x85, 0x3a, 0xd0, 0x7c, 0x02, 0x66, 0xc8, 0xc6, 0xa3, + 0xca, 0x09, 0x29, 0xf1, 0xe8, 0xf1, 0x12, 0x31, 0x88, 0x44, + 0x29, 0xfc, 0x4d, 0x9a, 0xe5, 0x5f, 0xee, 0x89, 0x6a, 0x10, + 0xce, 0x70, 0x7c, 0x3e, 0xd7, 0xe7, 0x34, 0xe4, 0x47, 0x27, + 0xa3, 0x95, 0x74, 0x50, 0x1a, 0x53, 0x26, 0x83, 0x10, 0x9c, + 0x2a, 0xba, 0xca, 0xba, 0x28, 0x3c, 0x31, 0xb4, 0xbd, 0x2f, + 0x53, 0xc3, 0xee, 0x37, 0xe3, 0x52, 0xce, 0xe3, 0x4f, 0x9e, + 0x50, 0x3b, 0xd8, 0x0c, 0x06, 0x22, 0xad, 0x79, 0xc6, 0xdc, + 0xee, 0x88, 0x35, 0x47, 0xc6, 0xa3, 0xb3, 0x25 }, + 128, + (unsigned char[]){ + 0xb6, 0x9d, 0xca, 0x1c, 0xf7, 0xd4, 0xd7, 0xec, 0x81, 0xe7, + 0x5b, 0x90, 0xfc, 0xca, 0x87, 0x4a, 0xbc, 0xde, 0x12, 0x3f, + 0xd2, 0x70, 0x01, 0x80, 0xaa, 0x90, 0x47, 0x9b, 0x6e, 0x48, + 0xde, 0x8d, 0x67, 0xed, 0x24, 0xf9, 0xf1, 0x9d, 0x85, 0xba, + 0x27, 0x58, 0x74, 0xf5, 0x42, 0xcd, 0x20, 0xdc, 0x72, 0x3e, + 0x69, 0x63, 0x36, 0x4a, 0x1f, 0x94, 0x25, 0x45, 0x2b, 0x26, + 0x9a, 0x67, 0x99, 0xfd }, + 64, + (unsigned char[]){ + 0xe7, 0xe8, 0x94, 0x27, 0x20, 0xa8, 0x77, 0x51, 0x72, 0x73, + 0xa3, 0x56, 0x05, 0x3e, 0xa2, 0xa1, 0xbc, 0x0c, 0x94, 0xaa, + 0x72, 0xd5, 0x5c, 0x6e, 0x86, 0x29, 0x6b, 0x2d, 0xfc, 0x96, + 0x79, 0x48, 0xc0, 0xa7, 0x2c, 0xbc, 0xcc, 0xa7, 0xea, 0xcb, + 0x35, 0x70, 0x6e, 0x09, 0xa1, 0xdf, 0x55, 0xa1, 0x53, 0x5b, + 0xd9, 0xb3, 0xcc, 0x34, 0x16, 0x0b, 0x3b, 0x6d, 0xcd, 0x3e, + 0xda, 0x8e, 0x64, 0x43 }, + 64, + } +}; diff --git a/security/nss/cmd/bltest/tests/README b/security/nss/cmd/bltest/tests/README new file mode 100644 index 0000000000..6d1302b468 --- /dev/null +++ b/security/nss/cmd/bltest/tests/README @@ -0,0 +1,56 @@ +This directory contains a set of tests for each cipher supported by +BLAPI. Each subdirectory contains known plaintext and ciphertext pairs +(and keys and/or iv's if needed). The tests can be run as a full set +with: + bltest -T +or as subsets, for example: + bltest -T -m des_ecb,md2,rsa + +In each subdirectory, the plaintext, key, and iv are ascii, and treated +as such. The ciphertext is base64-encoded to avoid the hassle of binary +files. + +To add a test, incremement the value in the numtests file. Create a +plaintext, key, and iv file, such that the name of the file is +incrememted one from the last set of tests. For example, if you are +adding the second test, put your data in files named plaintext1, key1, +and iv1 (ignoring key and iv if they are not needed, of course). Make +sure your key and iv are the correct number of bytes for your cipher (a +trailing \n is okay, but any other trailing bytes will be used!). Once +you have your input data, create output data by running bltest on a +trusted implementation. For example, for a new DES ECB test, run + bltest -E -m des_ecb -i plaintext1 -k key1 -o ciphertext1 -a in the +tests/des_ecb directory. Then run + bltest -T des_ecb from the cmd/bltest directory in the tree of the +implementation you want to test. + +Note that the -a option above is important, it tells bltest to expect +the input to be straight ASCII, and not base64 encoded binary! + +Special cases: + +RC5: +RC5 can take additional parameters, the number of rounds to perform and +the wordsize to use. The number of rounds is between is between 0 and +255, and the wordsize is either is either 16, 32, or 64 bits (at this +time only 32-bit is supported). These parameters are specified in a +paramsN file, where N is an index as above. The format of the file is +"rounds=R\nwordsize=W\n". + +public key modes (RSA and DSA): +Asymmetric key ciphers use keys with special properties, so creating a +key file with "Mozilla!" in it will not get you very far! To create a +public key, run bltest with the plaintext you want to encrypt, using a +trusted implementation. bltest will generate a key and store it in +"tmp.key", rename that file to keyN. For example: + bltest -E -m rsa -i plaintext0 -o ciphertext0 -e 65537 -g 32 -a + mv tmp.key key0 + +RSA-OAEP/RSA-PSS: +RSA-OAEP and RSA-PSS have a number of additional parameters to feed in. +- "seedN": The seed or salt to use when encrypting/signing +- "hashN" / "maskhashN" - The base digest algorithm and the digest algorithm + to use with MGF1, respectively. This should be an ASCII string specifying + one of the hash algorithms recognized by bltest (eg: "sha1", "sha256") + +[note: specifying a keysize (-g) when using RSA is important!] diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext0 new file mode 100644 index 0000000000..4da9e529b7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext0 @@ -0,0 +1 @@ +oJLgOzZ1GiWt3DGo2sPKaOnyGuRz5sZwmDyn4dvAqd8= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext1 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext1 new file mode 100644 index 0000000000..1126bbf384 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext1 @@ -0,0 +1 @@ +AzZ2PpZtkllaVnzJzlN/Xg== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext10 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext10 new file mode 100644 index 0000000000..c3d443ffef --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext10 @@ -0,0 +1,3 @@ +eykx9YVfcXFF4A8VKp9HlDWbH/yz5V9ZTjMJi1HCOmx0oGwdlP3tf9KuQsfbesrv +WETLM67dxoUlhe0AIKZpnSy1OAnO/RaRSM5CKSr6sGNEOXgwbFgsGLnODaPQhM5N +PEgs/Y/PGoUITon7iLQKCE1elyRm0HZmEm+3YfhAePI= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext11 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext11 new file mode 100644 index 0000000000..ae00d8b01b --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext11 @@ -0,0 +1,3 @@ +sJUS8+/57Q2FiQmDpz2tu3w2eNUlgb5kqKj8WG9JDyUhKXpHigWYBA69D1UJ+vsJ +afnZ5gDq7zOxuT7tmWh7Fn+JpQZarEOc5G87jSLTCGXmTkXvjNMLaYQ1OoRKEcjN +YNug6IZrPuMNJLP6imQ7MoNT4GAQ+oJzyP1U7woraTDlUgquXNWQL5uGozWSykNl diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext12 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext12 new file mode 100644 index 0000000000..605a1bab01 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext12 @@ -0,0 +1,4 @@ +a+ihKABFWjIFOIU+DLoxvS2A6gyFFkpMXCYa5IVBfZPv/i68DQoLUdbqGGM9IQz2 +PAxN28J2B/LoHtkRMZHvhtVvO5m+bEFaQVApn7hGznFgtAtjuvEXnRknWi6DaYN2 +0ouSVIxo4G5tmU4sFQHtKXAU5wLN7+4vZWRHcGAJYU2AHeHKr3P4t/pWzxupS2MZ +M7vld2JDgIUPEXQ1oDVbKw== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext13 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext13 new file mode 100644 index 0000000000..2abf3695cb --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext13 @@ -0,0 +1 @@ +UdRHefkNQKgASCdsA1y0nKKke8ubnPcnC5FEeTeH1T8= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext14 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext14 new file mode 100644 index 0000000000..f16428a985 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext14 @@ -0,0 +1,2 @@ +1fVYl2C/nHYiKP3iNt4fot0trUSNs/qb4MQZbv1Go1yE3RrHfZ21jJWRjLMXpkMK +CNL7ao6LDxybcsejRNw0nw== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext15 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext15 new file mode 100644 index 0000000000..ed1cecd99f --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext15 @@ -0,0 +1,2 @@ +dTlZdL0ys2ZWVKbI45a4iuNLEjV1hyp6tofY52tG35EailkM0B0vXDML46Zibp3T +ql4Q7RTo/4KYEbb+1Q8/UzykOFocvKePXEdE5Q8vg1kWXCSF0TJOdsPq52oMysYp diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext16 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext16 new file mode 100644 index 0000000000..8fa895224d --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext16 @@ -0,0 +1,3 @@ +gVjiFCDyW1nWrpQ/ocvyHwLpefQZ2rASanIbfu9Vvumtl/XM/30jkFe7wZqMN4FC +92cvHV5+F9e+vLAHDoNVys5mYBcaU7YYFq6CSm72nORwtv/TtbtLQ4h02R0nhU07 +byWGDTholY3jMH1isTOb3duKMYwM4PM8F8rw6fYECCA= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext17 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext17 new file mode 100644 index 0000000000..8ca864c9e6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext17 @@ -0,0 +1,3 @@ +km2ySMwbog8MV2MafIrvCU95GTe5BZSeNGAkDov6b6SDEVobMQtuQ2nK68UmKIg3 +ex3apYAOpJaivf8PmhAx5xKcmiDjViHn8Li6yg2HAw8q58qFk8hZlnegb9SyYAnq +0I/srCTKqc8srTtHDIInQVp7Hg8uqz+tltcKIJyLsmxidnfiUxuUNcpuPERNGVtf diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext18 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext18 new file mode 100644 index 0000000000..9b42740914 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext18 @@ -0,0 +1,4 @@ +yCzyxHbeqMtqbmB6QNLwORvoLqnshKU3poIPmvuZe3Y5fQBUJPqmp03E6MeqSokA +aQ+JS20dyoBnU5PSJDrax2LxWTAeNX6YtyR2IxDNWnuv4cKgMNukb9k6n9uJzBMs +qcF9xyAx7Ggi7lqdmdvKZseEwBsIhcu2LinZeAGSfsQVpdIVFY0yX57miUN60bdo +StM8DZJzlFGsh/Of+MMbhA== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext19 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext19 new file mode 100644 index 0000000000..39bf9377ec --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext19 @@ -0,0 +1 @@ +L6Dfciqf07ZMsY+ys9tV/yJnQidXKJQT+PZXUHQSpkw= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext2 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext2 new file mode 100644 index 0000000000..ec069abd47 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext2 @@ -0,0 +1 @@ +qaFjG/SZaVTrwJOVeyNFiQ== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext20 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext20 new file mode 100644 index 0000000000..d74f0e041c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext20 @@ -0,0 +1,2 @@ +BdXHdylCGwi3N+QRGfpEONH1cMx3Kk1sPff/7aA4TvhCiM43/ExMfRElpJmwUTZM +OJ/WOb3aZH2qO9rasutVlA== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext21 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext21 new file mode 100644 index 0000000000..9f3b9ead75 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext21 @@ -0,0 +1,2 @@ +rD1tuv4uD3QGMv2eggv2BEzVsVUcu5zAPAslw5zLfzO4Oqz8pAoyZfK7/4eRU0SK +ysuI/Ps7t7EP5GOmjAEJ8Cg4Lj5VexrfAu1kira7iV3wIF0m67+ppf2M69jkvuPc diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext22 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext22 new file mode 100644 index 0000000000..b9b5b5ce3c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext22 @@ -0,0 +1,3 @@ +kLe5YwojePU/UBq3vv8DkVUAgHG8hDjniZMs/T6xKZGVRl5mM4SUY/20Q3Unji/b +ExCCHmSSz4D/Fct3JQn7Qm867uJ71JOIgv0q5rW9nZH6SkOxe7Q5675ZwEIxAWOo +Kl/lOIeW7uNaGBoScfAL4puFLY+nWbrQH/RnjwEFlM0= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext23 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext23 new file mode 100644 index 0000000000..e7710c1f0f --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext23 @@ -0,0 +1,3 @@ +AlSyNGO8q+xaOV63TI+w6xN6B7xvXp9h7AsFfeMFcU+PopQiHJGhWcMVk5uB4wDu +kCGS7F8VJUQo2HcveTJOxDKYyiHACzcCc+5eXtkOQ++h4FpdFxIJ/jT58pI326Km +cmZQ/TsTIXR9EgiGPGw8az4th5q18leC8Iuo8qu+Y+C+20oifoGvs2u2ZFUINW00 diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext24 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext24 new file mode 100644 index 0000000000..d5234aa646 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext24 @@ -0,0 +1,4 @@ +/Fhz5Q3o+vTGuEunB7CFTp25qy6ffXB/u6M4xoQ6GPxvrOuvZj0mKW+zKbTSbxhJ +THngnneWR/m6+odIljDXn0MBYQwjAMGdvzFIt8rIxPSUQQJ1TzMukrb3xedbxhee +uHegeNRxkAkCF0TBTxP9KlWiucRNGAAGhahFpPYyx8VqdzBu+maiTQXQiNzXwT/i +T8RHJ1ll255NN/vJMERIzQ== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext3 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext3 new file mode 100644 index 0000000000..82c4cd2028 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext3 @@ -0,0 +1 @@ +J1z8BBPYzLcFE8OFmx0Pcg== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext4 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext4 new file mode 100644 index 0000000000..81714bd4dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext4 @@ -0,0 +1 @@ +ybgTX/G1rcQT39BTshvZbQ== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext5 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext5 new file mode 100644 index 0000000000..ce9672a51a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext5 @@ -0,0 +1 @@ +XJ2ETtRvmIUIXl1qT5TH1w== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext6 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext6 new file mode 100644 index 0000000000..fc53a4f55c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext6 @@ -0,0 +1 @@ +qf91vXz2YT03Mcd8O20MBA== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext7 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext7 new file mode 100644 index 0000000000..1d6d84bb0b --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext7 @@ -0,0 +1 @@ +xNxh2XJZZ6MCAQSpc48jhoUnzoOaqxdS/YvblagsTQA= diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext8 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext8 new file mode 100644 index 0000000000..7191a647aa --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext8 @@ -0,0 +1,2 @@ +Gblgl3LGPzOGCL9utSyhC+ZQl/icHgkFxCQB/Ud5GuLFRAstRzEWyni9n/L7YBXP +0xZSTq59y5Wuc46+roSkZw== diff --git a/security/nss/cmd/bltest/tests/aes_cbc/ciphertext9 b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext9 new file mode 100644 index 0000000000..232a691140 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/ciphertext9 @@ -0,0 +1,2 @@ +O4YRv8SXPFzY6YKwc7MxhM0mEQFZFy5EmI61/1ZhoeFvrWclj8v+5VRpJnoS3DdI +k7TjUz029WNMMJVYNZbxNaqM0RONyJi8VlHuNakuv4mrautTZmU7xgpw4AdPwR7+ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv0 b/security/nss/cmd/bltest/tests/aes_cbc/iv0 new file mode 100644 index 0000000000..4e65bc0347 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv0 @@ -0,0 +1 @@ +qwertyuiopasdfgh diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv1 b/security/nss/cmd/bltest/tests/aes_cbc/iv1 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv1 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv10 b/security/nss/cmd/bltest/tests/aes_cbc/iv10 new file mode 100644 index 0000000000..58d7a2da90 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv10 @@ -0,0 +1 @@ +žù4”n\Ю—½XS,´“ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv11 b/security/nss/cmd/bltest/tests/aes_cbc/iv11 new file mode 100644 index 0000000000..6847886b91 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv11 @@ -0,0 +1 @@ +$_&[vëëÂíÊÄ¢ø \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv12 b/security/nss/cmd/bltest/tests/aes_cbc/iv12 new file mode 100644 index 0000000000..15040cd21c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv12 @@ -0,0 +1 @@ +»ë/«´H¯„—–$J× \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv13 b/security/nss/cmd/bltest/tests/aes_cbc/iv13 new file mode 100644 index 0000000000..1bef08adf9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv13 @@ -0,0 +1 @@ +óÖf~My`÷P[£ƒë \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv14 b/security/nss/cmd/bltest/tests/aes_cbc/iv14 new file mode 100644 index 0000000000..099828fdf5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv14 @@ -0,0 +1 @@ +‹YÉ œRœ¨9ŸÀÎ<8 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv15 b/security/nss/cmd/bltest/tests/aes_cbc/iv15 new file mode 100644 index 0000000000..d7a44d9d6f --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv15 @@ -0,0 +1 @@ +6긃¯ï“lÃc(FÍ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv16 b/security/nss/cmd/bltest/tests/aes_cbc/iv16 new file mode 100644 index 0000000000..678bb8d679 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv16 @@ -0,0 +1 @@ +ãțЗëÝöOHÛm¿â \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv17 b/security/nss/cmd/bltest/tests/aes_cbc/iv17 new file mode 100644 index 0000000000..7ff21ab69d --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv17 @@ -0,0 +1 @@ +’¤(3ñE ¤½Æè< \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv18 b/security/nss/cmd/bltest/tests/aes_cbc/iv18 new file mode 100644 index 0000000000..244b5022eb --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv18 @@ -0,0 +1 @@ +$@€8,Êà{›¶cUÁ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv19 b/security/nss/cmd/bltest/tests/aes_cbc/iv19 new file mode 100644 index 0000000000..919e165742 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv19 @@ -0,0 +1 @@ +ýê¡4È×7EquýWÓü \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv2 b/security/nss/cmd/bltest/tests/aes_cbc/iv2 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv2 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv20 b/security/nss/cmd/bltest/tests/aes_cbc/iv20 new file mode 100644 index 0000000000..c49bf8f700 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv20 @@ -0,0 +1 @@ +ÀÍ+ëÌ»lI’ ÕH*ÇVè \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv21 b/security/nss/cmd/bltest/tests/aes_cbc/iv21 new file mode 100644 index 0000000000..6452e3d63a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv21 @@ -0,0 +1,2 @@ +³Ë—¨ +S™¸ÂE ;“• \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv22 b/security/nss/cmd/bltest/tests/aes_cbc/iv22 new file mode 100644 index 0000000000..42b7bd3afc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv22 @@ -0,0 +1 @@ +LïüYcÔY`&u>–I \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv23 b/security/nss/cmd/bltest/tests/aes_cbc/iv23 new file mode 100644 index 0000000000..99b22495cc Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv23 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv24 b/security/nss/cmd/bltest/tests/aes_cbc/iv24 new file mode 100644 index 0000000000..0104daff21 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv24 @@ -0,0 +1 @@ +ÖÕ¸ÏëӶ꡵?~á \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv3 b/security/nss/cmd/bltest/tests/aes_cbc/iv3 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv3 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv4 b/security/nss/cmd/bltest/tests/aes_cbc/iv4 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv4 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv5 b/security/nss/cmd/bltest/tests/aes_cbc/iv5 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv5 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv6 b/security/nss/cmd/bltest/tests/aes_cbc/iv6 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/iv6 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv7 b/security/nss/cmd/bltest/tests/aes_cbc/iv7 new file mode 100644 index 0000000000..524d1b984a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv7 @@ -0,0 +1 @@ +ªÑX<Ùeã»/ 40Ðe» \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv8 b/security/nss/cmd/bltest/tests/aes_cbc/iv8 new file mode 100644 index 0000000000..f58e954f93 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv8 @@ -0,0 +1 @@ +È ]‹± `iŸ|—J  \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/iv9 b/security/nss/cmd/bltest/tests/aes_cbc/iv9 new file mode 100644 index 0000000000..d6c4782673 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/iv9 @@ -0,0 +1 @@ +eµî60¾Ö¸BÙ¹z \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key0 b/security/nss/cmd/bltest/tests/aes_cbc/key0 new file mode 100644 index 0000000000..13911cc29a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key0 @@ -0,0 +1 @@ +fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key1 b/security/nss/cmd/bltest/tests/aes_cbc/key1 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/key1 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key10 b/security/nss/cmd/bltest/tests/aes_cbc/key10 new file mode 100644 index 0000000000..3cdff7a852 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key10 @@ -0,0 +1 @@ +Ä‘Ê1ùEŽ)©%ìUx \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key11 b/security/nss/cmd/bltest/tests/aes_cbc/key11 new file mode 100644 index 0000000000..4a1304010a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key11 @@ -0,0 +1 @@ +öè}q°Mn°jhÜjqô˜ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key12 b/security/nss/cmd/bltest/tests/aes_cbc/key12 new file mode 100644 index 0000000000..0a0103deb5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key12 @@ -0,0 +1 @@ +,A7QÃ'0W £6xk \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key13 b/security/nss/cmd/bltest/tests/aes_cbc/key13 new file mode 100644 index 0000000000..87ae208d68 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key13 @@ -0,0 +1 @@ +ê³±œX¨sᘃ«ƒ»øQû.k! \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key14 b/security/nss/cmd/bltest/tests/aes_cbc/key14 new file mode 100644 index 0000000000..de4da4d4e0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key14 @@ -0,0 +1 @@ +{±{M÷…i~¬Ï–˜âËuæy|é5Ë \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key15 b/security/nss/cmd/bltest/tests/aes_cbc/key15 new file mode 100644 index 0000000000..b13351f01a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key15 @@ -0,0 +1 @@ +ãþÌuðZ ³ƒßÓ‰£Ó<ɸT³²TÀô \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key16 b/security/nss/cmd/bltest/tests/aes_cbc/key16 new file mode 100644 index 0000000000..71afcb384f Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cbc/key16 differ diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key17 b/security/nss/cmd/bltest/tests/aes_cbc/key17 new file mode 100644 index 0000000000..291b89b1b2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key17 @@ -0,0 +1 @@ +¼¦ú¬+š9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/key9 b/security/nss/cmd/bltest/tests/aes_cbc/key9 new file mode 100644 index 0000000000..193a2a14d4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/key9 @@ -0,0 +1 @@ +»ç·ºOñ®|4þ‹F^ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/mktst.sh b/security/nss/cmd/bltest/tests/aes_cbc/mktst.sh new file mode 100644 index 0000000000..443167efb7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/mktst.sh @@ -0,0 +1,11 @@ +#!/bin/sh +for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 +do + file="test$i.txt" + grep "KEY = " $file | sed -e 's;KEY = ;;' | hex > key$i + grep "IV = " $file | sed -e 's;IV = ;;' | hex > iv$i + grep "PLAINTEXT = " $file | sed -e 's;PLAINTEXT = ;;' | hex > plaintext$i + grep "CIPHERTEXT = " $file | sed -e 's;CIPHERTEXT = ;;' | hex > ciphertext$i.bin + btoa < ciphertext$i.bin > ciphertext$i + rm ciphertext$i.bin +done diff --git a/security/nss/cmd/bltest/tests/aes_cbc/numtests b/security/nss/cmd/bltest/tests/aes_cbc/numtests new file mode 100644 index 0000000000..7273c0fa8c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/numtests @@ -0,0 +1 @@ +25 diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext0 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext0 new file mode 100644 index 0000000000..cc67189450 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext0 @@ -0,0 +1 @@ +0123456789abcdef0123456789abcdef diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext1 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext1 new file mode 100644 index 0000000000..8bac1b7568 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext1 @@ -0,0 +1 @@ +óDì<Æ'ºÍ]Ãûòsæ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext10 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext10 new file mode 100644 index 0000000000..779400be5e --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext10 @@ -0,0 +1,2 @@ +Ëjx~ ìVù¡e•¯3l¦´…Ùé@“ÆQRdŸˆ.‡My¬^{Ò§Lå®.èTöSž +”ykÔÉüÛÇšËïMvÑŠ÷â¤üGÝfßlM¾PäfTšG¶6¼Ç³¦$•µk¶{mE_ëÙ¿ï켦Çó5ÏΛEË \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext11 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext11 new file mode 100644 index 0000000000..c226c29df2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext11 @@ -0,0 +1 @@ +ø+ïÅÌͼìLå`ÏÒ"W 2mM甎TÖÐ×þ×Rû#ñªD”û°0éÞÔç~7Ày-‚€@Ã%±¥ïÑ_ÈBä@ÊCt¿8óÃü>ã's; Šî¼ÐUw/Ü`?{,¦Ÿöb6+à¡q»Üê]? \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext13 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext13 new file mode 100644 index 0000000000..88c5250f63 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext13 @@ -0,0 +1 @@ +NLÌÑh#!…mðiãñÆú9:Ÿ°-YÛtÁ@³¬Ä \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext14 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext14 new file mode 100644 index 0000000000..c42aec2ae4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext14 @@ -0,0 +1 @@ +Û7…¨‰´½8wTÚ"/L-+þ yà[Éû©A¾ê0ñ#ž¬ðFìÃhé†ü¦·ÅŽIyÒ–½y†ïõO \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cbc/plaintext15 b/security/nss/cmd/bltest/tests/aes_cbc/plaintext15 new file mode 100644 index 0000000000..12662556e7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cbc/plaintext15 @@ -0,0 +1 @@ +“/_:X Õ:kêªd1:4ˆôë°õµ~ø8áW–#;Öæ€wS‹.Qïp key$i + grep "Init. Counter" $file | sed -e 's;Init. Counter=;;' | hex > iv$i + grep "Ciphertext" $file | sed -e 's;Ciphertext=;;' | hex | btoa > ciphertext$i + grep "Plaintext" $file | sed -e 's;Plaintext=;;' | hex > plaintext$i +done diff --git a/security/nss/cmd/bltest/tests/aes_ctr/numtests b/security/nss/cmd/bltest/tests/aes_ctr/numtests new file mode 100644 index 0000000000..00750edc07 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ctr/numtests @@ -0,0 +1 @@ +3 diff --git a/security/nss/cmd/bltest/tests/aes_ctr/plaintext0 b/security/nss/cmd/bltest/tests/aes_ctr/plaintext0 new file mode 100644 index 0000000000..8ad770497e --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ctr/plaintext0 @@ -0,0 +1,2 @@ +kÁ¾â.@Ÿ–é=~s“*®-ŠW¬œž·o¬E¯ŽQ0ÈF£\äåûÁ +RïöŸ$EßO›­+A{æl7 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ctr/plaintext1 b/security/nss/cmd/bltest/tests/aes_ctr/plaintext1 new file mode 100644 index 0000000000..8ad770497e --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ctr/plaintext1 @@ -0,0 +1,2 @@ +kÁ¾â.@Ÿ–é=~s“*®-ŠW¬œž·o¬E¯ŽQ0ÈF£\äåûÁ +RïöŸ$EßO›­+A{æl7 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ctr/plaintext2 b/security/nss/cmd/bltest/tests/aes_ctr/plaintext2 new file mode 100644 index 0000000000..8ad770497e --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ctr/plaintext2 @@ -0,0 +1,2 @@ +kÁ¾â.@Ÿ–é=~s“*®-ŠW¬œž·o¬E¯ŽQ0ÈF£\äåûÁ +RïöŸ$EßO›­+A{æl7 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes-cts-type-1-vectors.txt b/security/nss/cmd/bltest/tests/aes_cts/aes-cts-type-1-vectors.txt new file mode 100644 index 0000000000..b107586769 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes-cts-type-1-vectors.txt @@ -0,0 +1,47 @@ +# Raeburn Standards Track [Page 12] +# +# RFC 3962 AES Encryption for Kerberos 5 February 2005 +# +# Some test vectors for CBC with ciphertext stealing, using an initial +# vector of all-zero. +# +# Original Test vectors were for AES CTS-3 (Kerberos). These test vectors have been modified for AES CTS-1 (NIST) +# + +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 +Output: 97 c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7f +Next IV: c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7f + +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 22 +Next IV: fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 22 + +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 +Next IV: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 + +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9e +Next IV: b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9e + +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20 +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8 +Next IV: 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8 + +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20 61 6e 64 20 77 6f 6e 74 6f 6e 20 73 6f 75 70 2e +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8 48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 40 +Next IV: 48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 40 + + diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes_cts_0.txt b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_0.txt new file mode 100644 index 0000000000..fa28439b31 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_0.txt @@ -0,0 +1,6 @@ +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 +Output: 97 c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7f +Next IV: c6 35 35 68 f2 bf 8c b4 d8 a5 80 36 2d a7 ff 7f + diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes_cts_1.txt b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_1.txt new file mode 100644 index 0000000000..dae97358a7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_1.txt @@ -0,0 +1,6 @@ +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 22 +Next IV: fc 00 78 3e 0e fd b2 c1 d4 45 d4 c8 ef f7 ed 22 + diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes_cts_2.txt b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_2.txt new file mode 100644 index 0000000000..df892892e2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_2.txt @@ -0,0 +1,6 @@ +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 +Next IV: 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 + diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes_cts_3.txt b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_3.txt new file mode 100644 index 0000000000..11e68e0c88 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_3.txt @@ -0,0 +1,6 @@ +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9e +Next IV: b3 ff fd 94 0c 16 a1 8c 1b 55 49 d2 f8 38 02 9e + diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes_cts_4.txt b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_4.txt new file mode 100644 index 0000000000..b5dc5ae3fd --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_4.txt @@ -0,0 +1,6 @@ +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20 +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8 +Next IV: 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8 + diff --git a/security/nss/cmd/bltest/tests/aes_cts/aes_cts_5.txt b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_5.txt new file mode 100644 index 0000000000..db837f9272 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/aes_cts_5.txt @@ -0,0 +1,6 @@ +Key: 63 68 69 63 6b 65 6e 20 74 65 72 69 79 61 6b 69 +IV: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 +Input: 49 20 77 6f 75 6c 64 20 6c 69 6b 65 20 74 68 65 20 47 65 6e 65 72 61 6c 20 47 61 75 27 73 20 43 68 69 63 6b 65 6e 2c 20 70 6c 65 61 73 65 2c 20 61 6e 64 20 77 6f 6e 74 6f 6e 20 73 6f 75 70 2e +Output: 97 68 72 68 d6 ec cc c0 c0 7b 25 e2 5e cf e5 84 39 31 25 23 a7 86 62 d5 be 7f cb cc 98 eb f5 a8 9d ad 8b bb 96 c4 cd c0 3b c1 03 e1 a1 94 bb d8 48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 40 +Next IV: 48 07 ef e8 36 ee 89 a5 26 73 0d bc 2f 7b c8 40 + diff --git a/security/nss/cmd/bltest/tests/aes_cts/ciphertext0 b/security/nss/cmd/bltest/tests/aes_cts/ciphertext0 new file mode 100644 index 0000000000..bcfdc10da6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/ciphertext0 @@ -0,0 +1 @@ +l8Y1NWjyv4y02KWANi2n/38= diff --git a/security/nss/cmd/bltest/tests/aes_cts/ciphertext1 b/security/nss/cmd/bltest/tests/aes_cts/ciphertext1 new file mode 100644 index 0000000000..66560807c9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/ciphertext1 @@ -0,0 +1 @@ +l2hyaNbszMDAeyXiXs/l/AB4Pg79ssHURdTI7/ftIg== diff --git a/security/nss/cmd/bltest/tests/aes_cts/ciphertext2 b/security/nss/cmd/bltest/tests/aes_cts/ciphertext2 new file mode 100644 index 0000000000..336d705c97 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/ciphertext2 @@ -0,0 +1 @@ +l2hyaNbszMDAeyXiXs/lhDkxJSOnhmLVvn/LzJjr9ag= diff --git a/security/nss/cmd/bltest/tests/aes_cts/ciphertext3 b/security/nss/cmd/bltest/tests/aes_cts/ciphertext3 new file mode 100644 index 0000000000..7c53d4002a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/ciphertext3 @@ -0,0 +1 @@ +l2hyaNbszMDAeyXiXs/lhDkxJSOnhmLVvn/LzJjr9bP//ZQMFqGMG1VJ0vg4Ap4= diff --git a/security/nss/cmd/bltest/tests/aes_cts/ciphertext4 b/security/nss/cmd/bltest/tests/aes_cts/ciphertext4 new file mode 100644 index 0000000000..ef31331c85 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/ciphertext4 @@ -0,0 +1 @@ +l2hyaNbszMDAeyXiXs/lhDkxJSOnhmLVvn/LzJjr9aidrYu7lsTNwDvBA+GhlLvY diff --git a/security/nss/cmd/bltest/tests/aes_cts/ciphertext5 b/security/nss/cmd/bltest/tests/aes_cts/ciphertext5 new file mode 100644 index 0000000000..0ead143371 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/ciphertext5 @@ -0,0 +1,2 @@ +l2hyaNbszMDAeyXiXs/lhDkxJSOnhmLVvn/LzJjr9aidrYu7lsTNwDvBA+GhlLvY +SAfv6DbuiaUmcw28L3vIQA== diff --git a/security/nss/cmd/bltest/tests/aes_cts/iv0 b/security/nss/cmd/bltest/tests/aes_cts/iv0 new file mode 100644 index 0000000000..4bdfab8333 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cts/iv0 differ diff --git a/security/nss/cmd/bltest/tests/aes_cts/iv1 b/security/nss/cmd/bltest/tests/aes_cts/iv1 new file mode 100644 index 0000000000..3e8c8e9e6b Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cts/iv1 differ diff --git a/security/nss/cmd/bltest/tests/aes_cts/iv2 b/security/nss/cmd/bltest/tests/aes_cts/iv2 new file mode 100644 index 0000000000..b4bbc2e76f Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cts/iv2 differ diff --git a/security/nss/cmd/bltest/tests/aes_cts/iv3 b/security/nss/cmd/bltest/tests/aes_cts/iv3 new file mode 100644 index 0000000000..c065e8362d Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cts/iv3 differ diff --git a/security/nss/cmd/bltest/tests/aes_cts/iv4 b/security/nss/cmd/bltest/tests/aes_cts/iv4 new file mode 100644 index 0000000000..ba11a0ec02 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cts/iv4 differ diff --git a/security/nss/cmd/bltest/tests/aes_cts/iv5 b/security/nss/cmd/bltest/tests/aes_cts/iv5 new file mode 100644 index 0000000000..213a4bd3c7 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_cts/iv5 differ diff --git a/security/nss/cmd/bltest/tests/aes_cts/key0 b/security/nss/cmd/bltest/tests/aes_cts/key0 new file mode 100644 index 0000000000..8ec57e84c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/key0 @@ -0,0 +1 @@ +chicken teriyaki \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/key1 b/security/nss/cmd/bltest/tests/aes_cts/key1 new file mode 100644 index 0000000000..8ec57e84c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/key1 @@ -0,0 +1 @@ +chicken teriyaki \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/key2 b/security/nss/cmd/bltest/tests/aes_cts/key2 new file mode 100644 index 0000000000..8ec57e84c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/key2 @@ -0,0 +1 @@ +chicken teriyaki \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/key3 b/security/nss/cmd/bltest/tests/aes_cts/key3 new file mode 100644 index 0000000000..8ec57e84c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/key3 @@ -0,0 +1 @@ +chicken teriyaki \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/key4 b/security/nss/cmd/bltest/tests/aes_cts/key4 new file mode 100644 index 0000000000..8ec57e84c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/key4 @@ -0,0 +1 @@ +chicken teriyaki \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/key5 b/security/nss/cmd/bltest/tests/aes_cts/key5 new file mode 100644 index 0000000000..8ec57e84c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/key5 @@ -0,0 +1 @@ +chicken teriyaki \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/mktst.sh b/security/nss/cmd/bltest/tests/aes_cts/mktst.sh new file mode 100644 index 0000000000..58b628d8dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/mktst.sh @@ -0,0 +1,9 @@ +#!/bin/sh +for i in 0 1 2 3 4 5 +do + file="aes_cts_$i.txt" + grep "Key" $file | sed -e 's;Key:;;' | hex > key$i + grep "IV" $file | sed -e 's;IV:;;' | hex > iv$i + grep "Input" $file | sed -e 's;Input:;;' | hex > plaintext$i + grep "Output" $file | sed -e 's;Output:;;' | hex | btoa > ciphertext$i +done diff --git a/security/nss/cmd/bltest/tests/aes_cts/numtests b/security/nss/cmd/bltest/tests/aes_cts/numtests new file mode 100644 index 0000000000..1e8b314962 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/numtests @@ -0,0 +1 @@ +6 diff --git a/security/nss/cmd/bltest/tests/aes_cts/plaintext0 b/security/nss/cmd/bltest/tests/aes_cts/plaintext0 new file mode 100644 index 0000000000..3f35c974a1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/plaintext0 @@ -0,0 +1 @@ +I would like the \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/plaintext1 b/security/nss/cmd/bltest/tests/aes_cts/plaintext1 new file mode 100644 index 0000000000..3975448711 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/plaintext1 @@ -0,0 +1 @@ +I would like the General Gau's \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/plaintext2 b/security/nss/cmd/bltest/tests/aes_cts/plaintext2 new file mode 100644 index 0000000000..d0664ea0db --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/plaintext2 @@ -0,0 +1 @@ +I would like the General Gau's C \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/plaintext3 b/security/nss/cmd/bltest/tests/aes_cts/plaintext3 new file mode 100644 index 0000000000..563970bfa5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/plaintext3 @@ -0,0 +1 @@ +I would like the General Gau's Chicken, please, \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/plaintext4 b/security/nss/cmd/bltest/tests/aes_cts/plaintext4 new file mode 100644 index 0000000000..b908471e32 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/plaintext4 @@ -0,0 +1 @@ +I would like the General Gau's Chicken, please, \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_cts/plaintext5 b/security/nss/cmd/bltest/tests/aes_cts/plaintext5 new file mode 100644 index 0000000000..5e4c069476 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_cts/plaintext5 @@ -0,0 +1 @@ +I would like the General Gau's Chicken, please, and wonton soup. \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext0 new file mode 100644 index 0000000000..d6818c1d0b --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext0 @@ -0,0 +1 @@ +PVuaCIiaKQhblgFCbVMTTg== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext1 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext1 new file mode 100644 index 0000000000..1126bbf384 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext1 @@ -0,0 +1 @@ +AzZ2PpZtkllaVnzJzlN/Xg== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext2 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext2 new file mode 100644 index 0000000000..ec069abd47 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext2 @@ -0,0 +1 @@ +qaFjG/SZaVTrwJOVeyNFiQ== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext3 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext3 new file mode 100644 index 0000000000..82c4cd2028 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext3 @@ -0,0 +1 @@ +J1z8BBPYzLcFE8OFmx0Pcg== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext4 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext4 new file mode 100644 index 0000000000..81714bd4dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext4 @@ -0,0 +1 @@ +ybgTX/G1rcQT39BTshvZbQ== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext5 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext5 new file mode 100644 index 0000000000..ce9672a51a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext5 @@ -0,0 +1 @@ +XJ2ETtRvmIUIXl1qT5TH1w== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/ciphertext6 b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext6 new file mode 100644 index 0000000000..fc53a4f55c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/ciphertext6 @@ -0,0 +1 @@ +qf91vXz2YT03Mcd8O20MBA== diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key0 b/security/nss/cmd/bltest/tests/aes_ecb/key0 new file mode 100644 index 0000000000..13911cc29a --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/key0 @@ -0,0 +1 @@ +fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key1 b/security/nss/cmd/bltest/tests/aes_ecb/key1 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_ecb/key1 differ diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key2 b/security/nss/cmd/bltest/tests/aes_ecb/key2 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_ecb/key2 differ diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key3 b/security/nss/cmd/bltest/tests/aes_ecb/key3 new file mode 100644 index 0000000000..4ac5fc6cf8 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_ecb/key3 differ diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key4 b/security/nss/cmd/bltest/tests/aes_ecb/key4 new file mode 100644 index 0000000000..4ac5fc6cf8 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_ecb/key4 differ diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key5 b/security/nss/cmd/bltest/tests/aes_ecb/key5 new file mode 100644 index 0000000000..4e4e493570 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_ecb/key5 differ diff --git a/security/nss/cmd/bltest/tests/aes_ecb/key6 b/security/nss/cmd/bltest/tests/aes_ecb/key6 new file mode 100644 index 0000000000..4e4e493570 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_ecb/key6 differ diff --git a/security/nss/cmd/bltest/tests/aes_ecb/mktst.sh b/security/nss/cmd/bltest/tests/aes_ecb/mktst.sh new file mode 100644 index 0000000000..6d46509f0b --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/mktst.sh @@ -0,0 +1,10 @@ +#!/bin/sh +for i in 1 2 3 4 5 6 +do + file="test$i.txt" + grep "KEY = " $file | sed -e 's;KEY = ;;' | hex > key$i + grep "PLAINTEXT = " $file | sed -e 's;PLAINTEXT = ;;' | hex > plaintext$i + grep "CIPHERTEXT = " $file | sed -e 's;CIPHERTEXT = ;;' | hex > ciphertext$i.bin + btoa < ciphertext$i.bin > ciphertext$i + rm ciphertext$i.bin +done diff --git a/security/nss/cmd/bltest/tests/aes_ecb/numtests b/security/nss/cmd/bltest/tests/aes_ecb/numtests new file mode 100644 index 0000000000..7f8f011eb7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/numtests @@ -0,0 +1 @@ +7 diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext0 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext0 new file mode 100644 index 0000000000..8d6a8d555b --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext0 @@ -0,0 +1 @@ +0123456789abcdef diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext1 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext1 new file mode 100644 index 0000000000..8bac1b7568 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext1 @@ -0,0 +1 @@ +óDì<Æ'ºÍ]Ãûòsæ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext2 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext2 new file mode 100644 index 0000000000..b2153e2ad1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext2 @@ -0,0 +1 @@ +—˜Äd ­uÇÃ"}¹Nr \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext3 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext3 new file mode 100644 index 0000000000..b565f3abc5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext3 @@ -0,0 +1 @@ +zjô·ù‚)Þxmu¶9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext4 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext4 new file mode 100644 index 0000000000..9ef1cbb5fc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext4 @@ -0,0 +1 @@ +œ-ˆBåôWd‚Óš#šñ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext5 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext5 new file mode 100644 index 0000000000..767e9f4302 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext5 @@ -0,0 +1,2 @@ +G0ø +Æ%þ„ð&Æ ýT} \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/plaintext6 b/security/nss/cmd/bltest/tests/aes_ecb/plaintext6 new file mode 100644 index 0000000000..e8537b6e68 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/plaintext6 @@ -0,0 +1 @@ + $¯6<äf_(%×´tœ˜ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_ecb/test1.txt b/security/nss/cmd/bltest/tests/aes_ecb/test1.txt new file mode 100644 index 0000000000..96a2adb9ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/test1.txt @@ -0,0 +1,4 @@ +COUNT = 0 +KEY = 00000000000000000000000000000000 +PLAINTEXT = f34481ec3cc627bacd5dc3fb08f273e6 +CIPHERTEXT = 0336763e966d92595a567cc9ce537f5e diff --git a/security/nss/cmd/bltest/tests/aes_ecb/test2.txt b/security/nss/cmd/bltest/tests/aes_ecb/test2.txt new file mode 100644 index 0000000000..a01daaef3c --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/test2.txt @@ -0,0 +1,4 @@ +COUNT = 1 +KEY = 00000000000000000000000000000000 +PLAINTEXT = 9798c4640bad75c7c3227db910174e72 +CIPHERTEXT = a9a1631bf4996954ebc093957b234589 diff --git a/security/nss/cmd/bltest/tests/aes_ecb/test3.txt b/security/nss/cmd/bltest/tests/aes_ecb/test3.txt new file mode 100644 index 0000000000..803c23c814 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/test3.txt @@ -0,0 +1,4 @@ +COUNT = 0 +KEY = 000000000000000000000000000000000000000000000000 +PLAINTEXT = 1b077a6af4b7f98229de786d7516b639 +CIPHERTEXT = 275cfc0413d8ccb70513c3859b1d0f72 diff --git a/security/nss/cmd/bltest/tests/aes_ecb/test4.txt b/security/nss/cmd/bltest/tests/aes_ecb/test4.txt new file mode 100644 index 0000000000..e567fab647 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/test4.txt @@ -0,0 +1,4 @@ +COUNT = 1 +KEY = 000000000000000000000000000000000000000000000000 +PLAINTEXT = 9c2d8842e5f48f57648205d39a239af1 +CIPHERTEXT = c9b8135ff1b5adc413dfd053b21bd96d diff --git a/security/nss/cmd/bltest/tests/aes_ecb/test5.txt b/security/nss/cmd/bltest/tests/aes_ecb/test5.txt new file mode 100644 index 0000000000..c96940e2c2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/test5.txt @@ -0,0 +1,4 @@ +COUNT = 0 +KEY = 0000000000000000000000000000000000000000000000000000000000000000 +PLAINTEXT = 014730f80ac625fe84f026c60bfd547d +CIPHERTEXT = 5c9d844ed46f9885085e5d6a4f94c7d7 diff --git a/security/nss/cmd/bltest/tests/aes_ecb/test6.txt b/security/nss/cmd/bltest/tests/aes_ecb/test6.txt new file mode 100644 index 0000000000..d8d00582a9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_ecb/test6.txt @@ -0,0 +1,4 @@ +COUNT = 1 +KEY = 0000000000000000000000000000000000000000000000000000000000000000 +PLAINTEXT = 0b24af36193ce4665f2825d7b4749c98 +CIPHERTEXT = a9ff75bd7cf6613d3731c77c3b6d0c04 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad0 b/security/nss/cmd/bltest/tests/aes_gcm/aad0 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad1 b/security/nss/cmd/bltest/tests/aes_gcm/aad1 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad10 b/security/nss/cmd/bltest/tests/aes_gcm/aad10 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad10 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad11 b/security/nss/cmd/bltest/tests/aes_gcm/aad11 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad11 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad12 b/security/nss/cmd/bltest/tests/aes_gcm/aad12 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad13 b/security/nss/cmd/bltest/tests/aes_gcm/aad13 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad14 b/security/nss/cmd/bltest/tests/aes_gcm/aad14 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad15 b/security/nss/cmd/bltest/tests/aes_gcm/aad15 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad15 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad16 b/security/nss/cmd/bltest/tests/aes_gcm/aad16 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad16 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad17 b/security/nss/cmd/bltest/tests/aes_gcm/aad17 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad17 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad2 b/security/nss/cmd/bltest/tests/aes_gcm/aad2 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad3 b/security/nss/cmd/bltest/tests/aes_gcm/aad3 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad3 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad4 b/security/nss/cmd/bltest/tests/aes_gcm/aad4 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad4 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad5 b/security/nss/cmd/bltest/tests/aes_gcm/aad5 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad5 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad6 b/security/nss/cmd/bltest/tests/aes_gcm/aad6 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad7 b/security/nss/cmd/bltest/tests/aes_gcm/aad7 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad8 b/security/nss/cmd/bltest/tests/aes_gcm/aad8 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/aad9 b/security/nss/cmd/bltest/tests/aes_gcm/aad9 new file mode 100644 index 0000000000..87b29d32cc --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/aad9 @@ -0,0 +1 @@ +þíúÎÞ­¾ïþíúÎÞ­¾ï«­ÚÒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext0 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext0 new file mode 100644 index 0000000000..3b352147b4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext0 @@ -0,0 +1 @@ +WOL8zvp+MGE2fx1XpOdFWg== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext1 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext1 new file mode 100644 index 0000000000..9913ff1fa8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext1 @@ -0,0 +1 @@ +A4jazmC2o5LzKMK5cbL+eKtuR9Qs7BO99TpnshJXvd8= diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext10 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext10 new file mode 100644 index 0000000000..70cb471007 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext10 @@ -0,0 +1,2 @@ +DxD1ma4UoVTtJLNuJTJNuMVmYy7yu7NPg0coD8RQcFf93CnfmkcfdcZlQdTU2tHJ +6ToZpY6LRz+g8GL3ZdzFf89iOiQJT8ykDTUz+A== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext11 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext11 new file mode 100644 index 0000000000..b9c42364ea --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext11 @@ -0,0 +1,2 @@ +0n6IaBzjJDxIMBZaj9z5/x3podjmtEfvbve3mChmbkWB55ASrzTd2eLwN1ibKS2z +5nwDZ0X6Iufptzc73PVm/ykcJbu4Vo/D03am2Q== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext12 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext12 new file mode 100644 index 0000000000..b756f5c56b --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext12 @@ -0,0 +1 @@ +Uw+K+8dFNrmpY7TxxMtziw== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext13 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext13 new file mode 100644 index 0000000000..15bc5e17f6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext13 @@ -0,0 +1 @@ +zqdAPU1ga24HTsXTuvOdGNDRyKeZmWvwJluYtdSKuRk= diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext14 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext14 new file mode 100644 index 0000000000..a982ef2fe0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext14 @@ -0,0 +1,2 @@ +Ui3B8JlWfQf0fzejKoRCfWQ6jNy/5cDJdZiivSVV0aqMsI5IWQ27PaewixBWgog4 +xfYeY5O6egq8yfZiiYAVrbCU2sXZNHG97BpQInDjzGw= diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext15 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext15 new file mode 100644 index 0000000000..5f5b95261e --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext15 @@ -0,0 +1,2 @@ +Ui3B8JlWfQf0fzejKoRCfWQ6jNy/5cDJdZiivSVV0aqMsI5IWQ27PaewixBWgog4 +xfYeY5O6egq8yfZidvxuzg9OF2jN34hTuy1VGw== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext16 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext16 new file mode 100644 index 0000000000..86d9096bdb --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext16 @@ -0,0 +1,2 @@ +w3Yt8cp4fTKuR8E78ZhEy68a4U0Ll2r6xS/315u6neD+tYLTOTSk8JVMwjY7xz94 +YqxDDmSr5Jn0fJsfOjN9v0anksReRUkT/i6o8g== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext17 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext17 new file mode 100644 index 0000000000..6be2346bff --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext17 @@ -0,0 +1,2 @@ +Wo3vLwyeU/H3XXhTZZ4qIO6ysiqv3mQZoFirT290a/QPwMO3gPJERS2j6/HF2Cze +okGJlyAO+C5Ern4/pEqCZu4cjrDItdTPWunxmg== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext2 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext2 new file mode 100644 index 0000000000..f5efb3d522 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext2 @@ -0,0 +1,2 @@ +QoMewiF3dCRLciG3hNDUnOOqIS8sAqTgNcF+IymsoS4h1RSyVGaTHH2PalqshKoF +G6MLOWoKrJc9WOCRRz9ZhU1cKvMnzWSmLPNavSum+rQ= diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext3 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext3 new file mode 100644 index 0000000000..80fe95e851 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext3 @@ -0,0 +1,2 @@ +QoMewiF3dCRLciG3hNDUnOOqIS8sAqTgNcF+IymsoS4h1RSyVGaTHH2PalqshKoF +G6MLOWoKrJc9WOCRW8lPvDIhpduU+ula5xIaRw== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext4 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext4 new file mode 100644 index 0000000000..cbc0194aad --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext4 @@ -0,0 +1,2 @@ +YTU7TCgGk0p3f/UfoipHVWmbKnFPzcb4N2bl+XtsdCNzgGkA5J8ksisJdUTUiWtC +SYm14eusDwfCP0WYNhLS5547B4VWG+FKrKL8yw== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext5 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext5 new file mode 100644 index 0000000000..77127ff0e3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext5 @@ -0,0 +1,2 @@ +jOJJmGJWFbYDoDOsoT+4lL6REqXDohGouiYqPMp+LKcB5Kmk+6Q8kMzcsoHUjHxv +1ih10qykFwNMNK7lYZzFrv/+C/pGKvQ8FpnQUA== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext6 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext6 new file mode 100644 index 0000000000..dc07bfd3f5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext6 @@ -0,0 +1 @@ +zTOyisdz90ugDtHzElckNQ== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext7 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext7 new file mode 100644 index 0000000000..d405c82fe8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext7 @@ -0,0 +1 @@ +mOckfAfw/kEcJn5DhLD2AC/1jYADOSerjvTUWHUU8Ps= diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext8 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext8 new file mode 100644 index 0000000000..53738bbef2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext8 @@ -0,0 +1,2 @@ +OYDKCzwA6EHrBvrEhyonV4WeHOqm79mEYoWTtAyh4Zx9dz0AwUTFJaxhnRjISj9H +GOJEiy/jJNnM2icQrK3iVpkkp8hYcza/sRgCTbhnShQ= diff --git a/security/nss/cmd/bltest/tests/aes_gcm/ciphertext9 b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext9 new file mode 100644 index 0000000000..bde2785bc1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/ciphertext9 @@ -0,0 +1,2 @@ +OYDKCzwA6EHrBvrEhyonV4WeHOqm79mEYoWTtAyh4Zx9dz0AwUTFJaxhnRjISj9H +GOJEiy/jJNnM2icQJRlJjoDxR483ulW9bSdhjA== diff --git a/security/nss/cmd/bltest/tests/aes_gcm/hex.c b/security/nss/cmd/bltest/tests/aes_gcm/hex.c new file mode 100644 index 0000000000..cdf583da2f --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/hex.c @@ -0,0 +1,78 @@ +#include +#include +#include + +int +tohex(int c) +{ + if ((c >= '0') && (c <= '9')) { + return c - '0'; + } + if ((c >= 'a') && (c <= 'f')) { + return c - 'a' + 10; + } + if ((c >= 'A') && (c <= 'F')) { + return c - 'A' + 10; + } + return 0; +} + +int +isspace(int c) +{ + if (c <= ' ') + return 1; + if (c == '\n') + return 1; + if (c == '\t') + return 1; + if (c == ':') + return 1; + if (c == ';') + return 1; + if (c == ',') + return 1; + return 0; +} + +void +verify_nibble(int nibble, int current) +{ + if (nibble != 0) { + fprintf(stderr, "count mismatch %d (nibbles=0x%x)\n", nibble, current); + fflush(stderr); + } +} + +int +main(int argc, char **argv) +{ + int c; + int current = 0; + int nibble = 0; + int skip = 0; + + if (argv[1]) { + skip = atoi(argv[1]); + } + +#define NIBBLE_COUNT 2 + while ((c = getchar()) != EOF) { + if (isspace(c)) { + verify_nibble(nibble, current); + continue; + } + if (skip) { + skip--; + continue; + } + current = current << 4 | tohex(c); + nibble++; + if (nibble == NIBBLE_COUNT) { + putchar(current); + nibble = 0; + current = 0; + } + } + return 0; +} diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv0 b/security/nss/cmd/bltest/tests/aes_gcm/iv0 new file mode 100644 index 0000000000..ce58bc9f84 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/iv0 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv1 b/security/nss/cmd/bltest/tests/aes_gcm/iv1 new file mode 100644 index 0000000000..ce58bc9f84 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/iv1 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv10 b/security/nss/cmd/bltest/tests/aes_gcm/iv10 new file mode 100644 index 0000000000..bad60b08b7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv10 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv11 b/security/nss/cmd/bltest/tests/aes_gcm/iv11 new file mode 100644 index 0000000000..f446641db1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv11 @@ -0,0 +1 @@ +“"]ø„åUœZÿRiªjz•8SO}¡äÃÒ£§(ÃÀÉQV€•9üðâBškRT®Ûõ ÞjW¦7³› \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv12 b/security/nss/cmd/bltest/tests/aes_gcm/iv12 new file mode 100644 index 0000000000..ce58bc9f84 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/iv12 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv13 b/security/nss/cmd/bltest/tests/aes_gcm/iv13 new file mode 100644 index 0000000000..ce58bc9f84 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/iv13 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv14 b/security/nss/cmd/bltest/tests/aes_gcm/iv14 new file mode 100644 index 0000000000..e3728f7261 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv14 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv15 b/security/nss/cmd/bltest/tests/aes_gcm/iv15 new file mode 100644 index 0000000000..e3728f7261 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv15 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv16 b/security/nss/cmd/bltest/tests/aes_gcm/iv16 new file mode 100644 index 0000000000..bad60b08b7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv16 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv17 b/security/nss/cmd/bltest/tests/aes_gcm/iv17 new file mode 100644 index 0000000000..f446641db1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv17 @@ -0,0 +1 @@ +“"]ø„åUœZÿRiªjz•8SO}¡äÃÒ£§(ÃÀÉQV€•9üðâBškRT®Ûõ ÞjW¦7³› \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv2 b/security/nss/cmd/bltest/tests/aes_gcm/iv2 new file mode 100644 index 0000000000..e3728f7261 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv2 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv3 b/security/nss/cmd/bltest/tests/aes_gcm/iv3 new file mode 100644 index 0000000000..e3728f7261 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv3 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv4 b/security/nss/cmd/bltest/tests/aes_gcm/iv4 new file mode 100644 index 0000000000..bad60b08b7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv4 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv5 b/security/nss/cmd/bltest/tests/aes_gcm/iv5 new file mode 100644 index 0000000000..f446641db1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv5 @@ -0,0 +1 @@ +“"]ø„åUœZÿRiªjz•8SO}¡äÃÒ£§(ÃÀÉQV€•9üðâBškRT®Ûõ ÞjW¦7³› \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv6 b/security/nss/cmd/bltest/tests/aes_gcm/iv6 new file mode 100644 index 0000000000..ce58bc9f84 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/iv6 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv7 b/security/nss/cmd/bltest/tests/aes_gcm/iv7 new file mode 100644 index 0000000000..ce58bc9f84 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/iv7 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv8 b/security/nss/cmd/bltest/tests/aes_gcm/iv8 new file mode 100644 index 0000000000..e3728f7261 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv8 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/iv9 b/security/nss/cmd/bltest/tests/aes_gcm/iv9 new file mode 100644 index 0000000000..e3728f7261 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/iv9 @@ -0,0 +1 @@ +Êþº¾úÎÛ­ÞÊøˆ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key0 b/security/nss/cmd/bltest/tests/aes_gcm/key0 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/key0 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key1 b/security/nss/cmd/bltest/tests/aes_gcm/key1 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/key1 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key10 b/security/nss/cmd/bltest/tests/aes_gcm/key10 new file mode 100644 index 0000000000..222b4b5a24 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key10 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key11 b/security/nss/cmd/bltest/tests/aes_gcm/key11 new file mode 100644 index 0000000000..222b4b5a24 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key11 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key12 b/security/nss/cmd/bltest/tests/aes_gcm/key12 new file mode 100644 index 0000000000..4e4e493570 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/key12 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key13 b/security/nss/cmd/bltest/tests/aes_gcm/key13 new file mode 100644 index 0000000000..4e4e493570 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/key13 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key14 b/security/nss/cmd/bltest/tests/aes_gcm/key14 new file mode 100644 index 0000000000..2163baf5a3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key14 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key15 b/security/nss/cmd/bltest/tests/aes_gcm/key15 new file mode 100644 index 0000000000..2163baf5a3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key15 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key16 b/security/nss/cmd/bltest/tests/aes_gcm/key16 new file mode 100644 index 0000000000..2163baf5a3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key16 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key17 b/security/nss/cmd/bltest/tests/aes_gcm/key17 new file mode 100644 index 0000000000..2163baf5a3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key17 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key2 b/security/nss/cmd/bltest/tests/aes_gcm/key2 new file mode 100644 index 0000000000..767ebdace0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key2 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key3 b/security/nss/cmd/bltest/tests/aes_gcm/key3 new file mode 100644 index 0000000000..767ebdace0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key3 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key4 b/security/nss/cmd/bltest/tests/aes_gcm/key4 new file mode 100644 index 0000000000..767ebdace0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key4 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key5 b/security/nss/cmd/bltest/tests/aes_gcm/key5 new file mode 100644 index 0000000000..767ebdace0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key5 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key6 b/security/nss/cmd/bltest/tests/aes_gcm/key6 new file mode 100644 index 0000000000..4ac5fc6cf8 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/key6 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key7 b/security/nss/cmd/bltest/tests/aes_gcm/key7 new file mode 100644 index 0000000000..4ac5fc6cf8 Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/key7 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key8 b/security/nss/cmd/bltest/tests/aes_gcm/key8 new file mode 100644 index 0000000000..222b4b5a24 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key8 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/key9 b/security/nss/cmd/bltest/tests/aes_gcm/key9 new file mode 100644 index 0000000000..222b4b5a24 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/key9 @@ -0,0 +1 @@ +þÿé’†esmj”g0ƒþÿé’†es \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/mktst.sh b/security/nss/cmd/bltest/tests/aes_gcm/mktst.sh new file mode 100644 index 0000000000..a990f519c6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/mktst.sh @@ -0,0 +1,13 @@ +#!/bin/sh +for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 +do + file="test$i.txt" + grep K= $file | sed -e 's;K=;;' | hex > key$i + grep IV= $file | sed -e 's;IV=;;' | hex > iv$i + grep "C=" $file | sed -e 's;C=;;' | hex > ciphertext$i.bin + grep "P=" $file | sed -e 's;P=;;' | hex > plaintext$i + grep "A=" $file | sed -e 's;A=;;' | hex > aad$i + grep "T=" $file | sed -e 's;T=;;' | hex >> ciphertext$i.bin + btoa < ciphertext$i.bin > ciphertext$i + rm ciphertext$i.bin +done diff --git a/security/nss/cmd/bltest/tests/aes_gcm/numtests b/security/nss/cmd/bltest/tests/aes_gcm/numtests new file mode 100644 index 0000000000..3c032078a4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/numtests @@ -0,0 +1 @@ +18 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext0 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext0 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext1 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext1 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/plaintext1 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext10 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext10 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext10 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext11 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext11 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext11 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext12 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext12 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext13 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext13 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/plaintext13 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext14 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext14 new file mode 100644 index 0000000000..664f6c9de7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext14 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9¯ÒU \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext15 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext15 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext15 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext16 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext16 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext16 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext17 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext17 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext17 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext2 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext2 new file mode 100644 index 0000000000..664f6c9de7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext2 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9¯ÒU \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext3 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext3 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext3 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext4 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext4 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext4 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext5 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext5 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext5 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext6 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext6 new file mode 100644 index 0000000000..e69de29bb2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext7 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext7 new file mode 100644 index 0000000000..01d633b27e Binary files /dev/null and b/security/nss/cmd/bltest/tests/aes_gcm/plaintext7 differ diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext8 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext8 new file mode 100644 index 0000000000..664f6c9de7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext8 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9¯ÒU \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/plaintext9 b/security/nss/cmd/bltest/tests/aes_gcm/plaintext9 new file mode 100644 index 0000000000..00505877ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/plaintext9 @@ -0,0 +1 @@ +Ù12%ø„å¥Y ůõ&š†§©S4÷Ú.L0=Š1Šr< ••h S/Ï$I¦µ%±jíõª æWºc{9 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test0.txt b/security/nss/cmd/bltest/tests/aes_gcm/test0.txt new file mode 100644 index 0000000000..a8bd4e15fa --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test0.txt @@ -0,0 +1,11 @@ +test="Test Case 1" +K=00000000000000000000000000000000 +P= +IV=000000000000000000000000 +H=66e94bd4ef8a2c3b884cfa59ca342b2e +Y0=00000000000000000000000000000001 +E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a +len(A)||len(C)=00000000000000000000000000000000 +GHASH(H,A,C)=00000000000000000000000000000000 +C= +T=58e2fccefa7e3061367f1d57a4e7455a diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test1.txt b/security/nss/cmd/bltest/tests/aes_gcm/test1.txt new file mode 100644 index 0000000000..7bb83ce8be --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test1.txt @@ -0,0 +1,14 @@ +test="Test Case 2" +K=00000000000000000000000000000000 +P=00000000000000000000000000000000 +IV=000000000000000000000000 +H=66e94bd4ef8a2c3b884cfa59ca342b2e +Y0=00000000000000000000000000000001 +E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a +Y1=00000000000000000000000000000002 +E(K,Y1)=0388dace60b6a392f328c2b971b2fe78 +X1 5e2ec746917062882c85b0685353deb7 +len(A)||len(C)=00000000000000000000000000000080 +GHASH(H,A,C)=f38cbb1ad69223dcc3457ae5b6b0f885 +C=0388dace60b6a392f328c2b971b2fe78 +T=ab6e47d42cec13bdf53a67b21257bddf diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test10.txt b/security/nss/cmd/bltest/tests/aes_gcm/test10.txt new file mode 100644 index 0000000000..2a4a5a99ed --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test10.txt @@ -0,0 +1,28 @@ +test="Test Case 11" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbad +H=466923ec9ae682214f2c082badb39249 +N1=9473c07b02544299cf007c42c5778218 +len({})||len(IV)=00000000000000000000000000000040 +Y0=a14378078d27258a6292737e1802ada5 +E(K,Y0)=7bb6d647c902427ce7cf26563a337371 +X1=f3bf7ba3e305aeb05ed0d2e4fe076666 +X2=20a51fa2302e9c01b87c48f2c3d91a56 +Y1=a14378078d27258a6292737e1802ada6 +E(K,Y1)=d621c7bc5690a7b1487dbaab8ac76b22 +Y2=a14378078d27258a6292737e1802ada7 +E(K,Y2)=43c1ca7de78f4495ad0b18324e61fa25 +Y3=a14378078d27258a6292737e1802ada8 +E(K,Y3)=e1e0254a0f2f1626e9aa4ff09d7c64ec +Y4=a14378078d27258a6292737e1802ada9 +E(K,Y4)=5850f4502486a1681a9319ce7d0afa59 +X3=8bdedafd6ee8e529689de3a269b8240d +X4=6607feb377b49c9ecdbc696344fe22d8 +X5=8a19570a06500ba9405fcece4a73fb48 +X6=8532826e63ce4a5b89b70fa28f8070fe +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=1e6a133806607858ee80eaf237064089 +C=0f10f599ae14a154ed24b36e25324db8c566632ef2bbb34f8347280fc4507057fddc29df9a471f75c66541d4d4dad1c9e93a19a58e8b473fa0f062f7 +T=65dcc57fcf623a24094fcca40d3533f8 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test11.txt b/security/nss/cmd/bltest/tests/aes_gcm/test11.txt new file mode 100644 index 0000000000..d46e6f91f8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test11.txt @@ -0,0 +1,31 @@ +test="Test Case 12" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b +H=466923ec9ae682214f2c082badb39249 +N1=19aef0f04763b0c87903c5a217d5314f +N2=62120253f79efc978625d1feb03b5b5b +N3=b6ce2a84e366de900fa78a1653df77fb +N4=374ecad90487f0bb261ba817447e022c +len({})||len(IV)=000000000000000000000000000001e0 +Y0=4505cdc367a054c5002820e96aebef27 +E(K,Y0)=5ea3194f9dd012a3b9bc5103d6e0284d +X1=f3bf7ba3e305aeb05ed0d2e4fe076666 +X2=20a51fa2302e9c01b87c48f2c3d91a56 +Y1=4505cdc367a054c5002820e96aebef28 +E(K,Y1)=0b4fba4de46722d9ed691f9f2029df65 +Y2=4505cdc367a054c5002820e96aebef29 +E(K,Y2)=9b4e088bf380b03540bb87a5a257e437 +Y3=4505cdc367a054c5002820e96aebef2a +E(K,Y3)=9ddb9c873a5cd48acd3f397cd28f9896 +Y4=4505cdc367a054c5002820e96aebef2b +E(K,Y4)=5716ee92eff7c4b053d44c0294ea88cd +X3=f70d61693ea7f53f08c866d6eedb1e4b +X4=dc40bc9a181b35aed66488071ef282ae +X5=85ffa424b87b35cac7be9c450f0d7aee +X6=65233cbe5251f7d246bfc967a8678647 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=82567fb0b4cc371801eadec005968e94 +C=d27e88681ce3243c4830165a8fdcf9ff1de9a1d8e6b447ef6ef7b79828666e4581e79012af34ddd9e2f037589b292db3e67c036745fa22e7e9b7373b +T=dcf566ff291c25bbb8568fc3d376a6d9 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test12.txt b/security/nss/cmd/bltest/tests/aes_gcm/test12.txt new file mode 100644 index 0000000000..b9ccfa86ad --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test12.txt @@ -0,0 +1,11 @@ +test="Test Case 13" +K=0000000000000000000000000000000000000000000000000000000000000000 +P= +IV=000000000000000000000000 +H=dc95c078a2408989ad48a21492842087 +Y0=00000000000000000000000000000001 +E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b +len(A)||len(C)=00000000000000000000000000000000 +GHASH(H,A,C)=00000000000000000000000000000000 +C= +T=530f8afbc74536b9a963b4f1c4cb738b diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test13.txt b/security/nss/cmd/bltest/tests/aes_gcm/test13.txt new file mode 100644 index 0000000000..b589ba4138 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test13.txt @@ -0,0 +1,14 @@ +test="Test Case 14" +K=0000000000000000000000000000000000000000000000000000000000000000 +P=00000000000000000000000000000000 +IV=000000000000000000000000 +H=dc95c078a2408989ad48a21492842087 +Y0=00000000000000000000000000000001 +E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b +Y1=00000000000000000000000000000002 +E(K,Y1)=cea7403d4d606b6e074ec5d3baf39d18 +X1=fd6ab7586e556dba06d69cfe6223b262 +len(A)||len(C)=00000000000000000000000000000080 +GHASH(H,A,C)=83de425c5edc5d498f382c441041ca92 +C=cea7403d4d606b6e074ec5d3baf39d18 +T=d0d1c8a799996bf0265b98b5d48ab919 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test14.txt b/security/nss/cmd/bltest/tests/aes_gcm/test14.txt new file mode 100644 index 0000000000..f650ea7c64 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test14.txt @@ -0,0 +1,23 @@ +test="Test Case 15" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255 +IV=cafebabefacedbaddecaf888 +H=acbef20579b4b8ebce889bac8732dad7 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=8b1cf3d561d27be251263e66857164e7 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=e29d258faad137135bd49280af645bd8 +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=908c82ddcc65b26e887f85341f243d1d +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8 +X1=fcbefb78635d598eddaf982310670f35 +X2=29de812309d3116a6eff7ec844484f3e +X3=45fad9deeda9ea561b8f199c3613845b +X4=ed95f8e164bf3213febc740f0bd9c6af +len(A)||len(C)=00000000000000000000000000000200 +GHASH(H,A,C)=4db870d37cb75fcb46097c36230d1612 +C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662898015ad +T=b094dac5d93471bdec1a502270e3cc6c diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test15.txt b/security/nss/cmd/bltest/tests/aes_gcm/test15.txt new file mode 100644 index 0000000000..f1a49e3fe2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test15.txt @@ -0,0 +1,26 @@ +test="Test Case 16" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbaddecaf888 +H=acbef20579b4b8ebce889bac8732dad7 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e +X1=5165d242c2592c0a6375e2622cf925d2 +X2=8efa30ce83298b85fe71abefc0cdd01d +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=8b1cf3d561d27be251263e66857164e7 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=e29d258faad137135bd49280af645bd8 +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=908c82ddcc65b26e887f85341f243d1d +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8 +X3=abe07e0bb62354177480b550f9f6cdcc +X4=3978e4f141b95f3b4699756b1c3c2082 +X5=8abf3c48901debe76837d8a05c7d6e87 +X6=9249beaf520c48b912fa120bbf391dc8 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=8bd0c4d8aacd391e67cca447e8c38f65 +C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662 +T=76fc6ece0f4e1768cddf8853bb2d551b diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test16.txt b/security/nss/cmd/bltest/tests/aes_gcm/test16.txt new file mode 100644 index 0000000000..6918aca776 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test16.txt @@ -0,0 +1,28 @@ +test="Test Case 17" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbad +H=acbef20579b4b8ebce889bac8732dad7 +N1=90c22e3d2aca34b971e8bd09708fae5c +len({})||len(IV)=00000000000000000000000000000040 +Y0=0095df49dd90abe3e4d252475748f5d4 +E(K,Y0)=4f903f37fe611d454217fbfa5cd7d791 +X1=5165d242c2592c0a6375e2622cf925d2 +X2=8efa30ce83298b85fe71abefc0cdd01d +Y1=0095df49dd90abe3e4d252475748f5d5 +E(K,Y1)=1a471fd432fc7bd70b1ec8fe5e6d6251 +Y2=0095df49dd90abe3e4d252475748f5d6 +E(K,Y2)=29bd481e1ea39d20eb63c7ea118b1792 +Y3=0095df49dd90abe3e4d252475748f5d7 +E(K,Y3)=e2898e46ac5cada3ba83cc1272618a5d +Y4=0095df49dd90abe3e4d252475748f5d8 +E(K,Y4)=d3c6aefbcea602ce4e1fe026065447bf +X3=55e1ff68f9249e64b95223858e5cb936 +X4=cef1c034383dc96f733aaa4c99bd3e61 +X5=68588d004fd468f5854515039b08165d +X6=2378943c034697f72a80fce5059bf3f3 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=75a34288b8c68f811c52b2e9a2f97f63 +C=c3762df1ca787d32ae47c13bf19844cbaf1ae14d0b976afac52ff7d79bba9de0feb582d33934a4f0954cc2363bc73f7862ac430e64abe499f47c9b1f +T=3a337dbf46a792c45e454913fe2ea8f2 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test17.txt b/security/nss/cmd/bltest/tests/aes_gcm/test17.txt new file mode 100644 index 0000000000..a5c538ea66 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test17.txt @@ -0,0 +1,31 @@ +test="Test Case 18" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b +H=acbef20579b4b8ebce889bac8732dad7 +N1=0bfe66e2032f195516379f5fb710f987 +N2=f0631554d11409915feec8f9f5102aba +N3=749b90dda19a1557fd9e9fd31fed1d14 +N4=7a6a833f260d848793b327cb07d1b190 +len({})||len(IV)=000000000000000000000000000001e0 +Y0=0cd953e2140a5976079f8e2406bc8eb4 +E(K,Y0)=71b54d092bb0c3d9ba94538d4096e691 +X1=5165d242c2592c0a6375e2622cf925d2 +X2=8efa30ce83298b85fe71abefc0cdd01d +Y1=0cd953e2140a5976079f8e2406bc8eb5 +E(K,Y1)=83bcdd0af41a551452047196ca6b0cba +Y2=0cd953e2140a5976079f8e2406bc8eb6 +E(K,Y2)=68151b79baea93c38e149b72e545e186 +Y3=0cd953e2140a5976079f8e2406bc8eb7 +E(K,Y3)=13fccf22159a4d16026ce5d58c7e99fb +Y4=0cd953e2140a5976079f8e2406bc8eb8 +E(K,Y4)=132b64628a031e79fecd050675a64f07 +X3=e963941cfa8c417bdaa3b3d94ab4e905 +X4=2178d7f836e5fa105ce0fdf0fc8f0654 +X5=bac14eeba3216f966b3e7e011475b832 +X6=cc9ae9175729a649936e890bd971a8bf +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=d5ffcf6fc5ac4d69722187421a7f170b +C=5a8def2f0c9e53f1f75d7853659e2a20eeb2b22aafde6419a058ab4f6f746bf40fc0c3b780f244452da3ebf1c5d82cdea2418997200ef82e44ae7e3f +T=a44a8266ee1c8eb0c8b5d4cf5ae9f19a diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test2.txt b/security/nss/cmd/bltest/tests/aes_gcm/test2.txt new file mode 100644 index 0000000000..8e69bf6784 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test2.txt @@ -0,0 +1,23 @@ +test="Test Case 3" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255 +IV=cafebabefacedbaddecaf888 +H=b83b533708bf535d0aa6e52980d53b78 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=3de91827c10e9a4f5240647ee5221f20 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0 +X1=59ed3f2bb1a0aaa07c9f56c6a504647b +X2=b714c9048389afd9f9bc5c1d4378e052 +X3=47400c6577b1ee8d8f40b2721e86ff10 +X4=4796cf49464704b5dd91f159bb1b7f95 +len(A)||len(C)=00000000000000000000000000000200 +GHASH(H,A,C)=7f1b32b81b820d02614f8895ac1d4eac +C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f5985 +T=4d5c2af327cd64a62cf35abd2ba6fab4 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test3.txt b/security/nss/cmd/bltest/tests/aes_gcm/test3.txt new file mode 100644 index 0000000000..4083eac7a7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test3.txt @@ -0,0 +1,26 @@ +test="Test Case 4" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbaddecaf888 +H=b83b533708bf535d0aa6e52980d53b78 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418 +X1=ed56aaf8a72d67049fdb9228edba1322 +X2=cd47221ccef0554ee4bb044c88150352 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=3de91827c10e9a4f5240647ee5221f20 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0 +X3=54f5e1b2b5a8f9525c23924751a3ca51 +X4=324f585c6ffc1359ab371565d6c45f93 +X5=ca7dd446af4aa70cc3c0cd5abba6aa1c +X6=1590df9b2eb6768289e57d56274c8570 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=698e57f70e6ecc7fd9463b7260a9ae5f +C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091 +T=5bc94fbc3221a5db94fae95ae7121a47 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test4.txt b/security/nss/cmd/bltest/tests/aes_gcm/test4.txt new file mode 100644 index 0000000000..ec62258d03 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test4.txt @@ -0,0 +1,28 @@ +test="Test Case 5" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbad +H=b83b533708bf535d0aa6e52980d53b78 +N1=6f288b846e5fed9a18376829c86a6a16 +len({})||len(C)=00000000000000000000000000000040 +Y0=c43a83c4c4badec4354ca984db252f7d +E(K,Y0)=e94ab9535c72bea9e089c93d48e62fb0 +X1=ed56aaf8a72d67049fdb9228edba1322 +X2=cd47221ccef0554ee4bb044c88150352 +Y1=c43a83c4c4badec4354ca984db252f7e +E(K,Y1)=b8040969d08295afd226fcda0ddf61cf +Y2=c43a83c4c4badec4354ca984db252f7f +E(K,Y2)=ef3c83225af93122192ad5c4f15dfe51 +Y3=c43a83c4c4badec4354ca984db252f80 +E(K,Y3)=6fbc659571f72de104c67b609d2fde67 +Y4=c43a83c4c4badec4354ca984db252f81 +E(K,Y4)=f8e3581441a1e950785c3ea1430c6fa6 +X3=9379e2feae14649c86cf2250e3a81916 +X4=65dde904c92a6b3db877c4817b50a5f4 +X5=48c53cf863b49a1b0bbfc48c3baaa89d +X6=08c873f1c8cec3effc209a07468caab1 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=df586bb4c249b92cb6922877e444d37b +C=61353b4c2806934a777ff51fa22a4755699b2a714fcdc6f83766e5f97b6c742373806900e49f24b22b097544d4896b424989b5e1ebac0f07c23f4598 +T=3612d2e79e3b0785561be14aaca2fccb diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test5.txt b/security/nss/cmd/bltest/tests/aes_gcm/test5.txt new file mode 100644 index 0000000000..709251b456 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test5.txt @@ -0,0 +1,31 @@ +test="Test Case 6" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b +H=b83b533708bf535d0aa6e52980d53b78 +N1=004d6599d7fb1634756e1e299d81630f +N2=88ffe8a3c8033df4b54d732f7f88408e +N3=24e694cfab657beabba8055aad495e23 +N4=d8349a5eda24943c8fbb2ef5168b20cb +len({})||len(IV)=000000000000000000000000000001e0 +Y0=3bab75780a31c059f83d2a44752f9864 +7dc63b399f2d98d57ab073b6baa4138e +X1=ed56aaf8a72d67049fdb9228edba1322 +X2=cd47221ccef0554ee4bb044c88150352 +Y1=3bab75780a31c059f83d2a44752f9865 +E(K,Y1)=55d37bbd9ad21353a6f93a690eca9e0e +Y2=3bab75780a31c059f83d2a44752f9866 +E(K,Y2)=3836bbf6d696e672946a1a01404fa6d5 +Y3=3bab75780a31c059f83d2a44752f9867 +E(K,Y3)=1dd8a5316ecc35c3e313bca59d2ac94a +Y4=3bab75780a31c059f83d2a44752f9868 +E(K,Y4)=6742982706a9f154f657d5dc94b746db +X3=31727669c63c6f078b5d22adbbbca384 +X4=480c00db2679065a7ed2f771a53acacd +X5=1c1ae3c355e2214466a9923d2ba6ab35 +X6=0694c6f16bb0275a48891d06590344b0 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=1c5afe9760d3932f3c9a878aac3dc3de +C=8ce24998625615b603a033aca13fb894be9112a5c3a211a8ba262a3cca7e2ca701e4a9a4fba43c90ccdcb281d48c7c6fd62875d2aca417034c34aee5 +T=619cc5aefffe0bfa462af43c1699d050 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test6.txt b/security/nss/cmd/bltest/tests/aes_gcm/test6.txt new file mode 100644 index 0000000000..b738e1f054 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test6.txt @@ -0,0 +1,11 @@ +test="Test Case 7" +K=000000000000000000000000000000000000000000000000 +P= +IV=000000000000000000000000 +H=aae06992acbf52a3e8f4a96ec9300bd7 +Y0=00000000000000000000000000000001 +E(K,Y0)=cd33b28ac773f74ba00ed1f312572435 +len(A)||len(C)=00000000000000000000000000000000 +GHASH(H,A,C)=00000000000000000000000000000000 +C= +T=cd33b28ac773f74ba00ed1f312572435 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test7.txt b/security/nss/cmd/bltest/tests/aes_gcm/test7.txt new file mode 100644 index 0000000000..68bc521389 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test7.txt @@ -0,0 +1,14 @@ +test="Test Case 8" +K=000000000000000000000000000000000000000000000000 +P=00000000000000000000000000000000 +IV=000000000000000000000000 +H=aae06992acbf52a3e8f4a96ec9300bd7 +Y0=00000000000000000000000000000001 +E(K,Y0)=cd33b28ac773f74ba00ed1f312572435 +Y1=00000000000000000000000000000002 +E(K,Y1)=98e7247c07f0fe411c267e4384b0f600 +X1=90e87315fb7d4e1b4092ec0cbfda5d7d +len(A)||len(C)=00000000000000000000000000000080 +GHASH(H,A,C)=e2c63f0ac44ad0e02efa05ab6743d4ce +C=98e7247c07f0fe411c267e4384b0f600 +T=2ff58d80033927ab8ef4d4587514f0fb diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test8.txt b/security/nss/cmd/bltest/tests/aes_gcm/test8.txt new file mode 100644 index 0000000000..544324035f --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test8.txt @@ -0,0 +1,23 @@ +test="Test Case 9" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255 +IV=cafebabefacedbaddecaf888 +H=466923ec9ae682214f2c082badb39249 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=614b3195542ccc7683ae933c81ec8a62 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=a988a97e85eec28e76b95c29b6023003 +X1=dddca3f91c17821ffac4a6d0fed176f7 +X2=a4e84ac60e2730f4a7e0e1eef708b198 +X3=e67592048dd7153973a0dbbb8804bee2 +X4=503e86628536625fb746ce3cecea433f +len(A)||len(C)=00000000000000000000000000000200 +GHASH(H,A,C)=51110d40f6c8fff0eb1ae33445a889f0 +C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710acade256 +T=9924a7c8587336bfb118024db8674a14 diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test9.txt b/security/nss/cmd/bltest/tests/aes_gcm/test9.txt new file mode 100644 index 0000000000..bcd5939291 --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test9.txt @@ -0,0 +1,26 @@ +test="Test Case 10" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbaddecaf888 +H=466923ec9ae682214f2c082badb39249 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4 +X1=f3bf7ba3e305aeb05ed0d2e4fe076666 +X2=20a51fa2302e9c01b87c48f2c3d91a56 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=614b3195542ccc7683ae933c81ec8a62 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=a988a97e85eec28e76b95c29b6023003 +X3=714f9700ddf520f20695f6180c6e669d +X4=e858680b7b240d2ecf7e06bbad4524e2 +X5=3f4865abd6bb3fb9f5c4a816f0a9b778 +X6=4256f67fe87b4f49422ba11af857c973 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=ed2ce3062e4a8ec06db8b4c490e8a268 +C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710 +T=2519498e80f1478f37ba55bd6d27618c diff --git a/security/nss/cmd/bltest/tests/aes_gcm/test_source.txt b/security/nss/cmd/bltest/tests/aes_gcm/test_source.txt new file mode 100644 index 0000000000..61c78fcc5f --- /dev/null +++ b/security/nss/cmd/bltest/tests/aes_gcm/test_source.txt @@ -0,0 +1,439 @@ +# AppendixB AES Test Vectors +# From "The Galois/Counter Mode of Operation (GCM)", David A McGree & John Viega, +# http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/gcm/gcm-spec.pdf +# +# This appendix contains test cases for AES GCM, with AES key sizes of 128, 192, and 256 bits. These +# cases use the same notation as in Equations 1 and 2, with the exception that Ni is used in place of +# Xi when GHASH is used to compute Y0 , in order to distinguish that case from the later invocation +# of GHASH. All values are in hexadecimal, and a zero-length variable is indicated by the absence +# of any hex digits. Each line consists of 128 bits of data, and variables whose lengths exceed that +# value are continued on successive lines. The leftmost hex digit corresponds to the leftmost four +# bits of the variable. For example, the lowest 128 bits of the field polynomial are represented as +# e100000000000000000000000000000000. +# + +test="Test Case 1" +K=00000000000000000000000000000000 +P= +IV=000000000000000000000000 +H=66e94bd4ef8a2c3b884cfa59ca342b2e +Y0=00000000000000000000000000000001 +E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a +len(A)||len(C)=00000000000000000000000000000000 +GHASH(H,A,C)=00000000000000000000000000000000 +C= +T=58e2fccefa7e3061367f1d57a4e7455a + + +test="Test Case 2" +K=00000000000000000000000000000000 +P=00000000000000000000000000000000 +IV=000000000000000000000000 +H=66e94bd4ef8a2c3b884cfa59ca342b2e +Y0=00000000000000000000000000000001 +E(K,Y0)=58e2fccefa7e3061367f1d57a4e7455a +Y1=00000000000000000000000000000002 +E(K,Y1)=0388dace60b6a392f328c2b971b2fe78 +X1 5e2ec746917062882c85b0685353deb7 +len(A)||len(C)=00000000000000000000000000000080 +GHASH(H,A,C)=f38cbb1ad69223dcc3457ae5b6b0f885 +C=0388dace60b6a392f328c2b971b2fe78 +T=ab6e47d42cec13bdf53a67b21257bddf + +test="Test Case 3" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255 +IV=cafebabefacedbaddecaf888 +H=b83b533708bf535d0aa6e52980d53b78 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=3de91827c10e9a4f5240647ee5221f20 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0 +X1=59ed3f2bb1a0aaa07c9f56c6a504647b +X2=b714c9048389afd9f9bc5c1d4378e052 +X3=47400c6577b1ee8d8f40b2721e86ff10 +X4=4796cf49464704b5dd91f159bb1b7f95 +len(A)||len(C)=00000000000000000000000000000200 +GHASH(H,A,C)=7f1b32b81b820d02614f8895ac1d4eac +C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091473f5985 +T=4d5c2af327cd64a62cf35abd2ba6fab4 + +test="Test Case 4" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbaddecaf888 +H=b83b533708bf535d0aa6e52980d53b78 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=3247184b3c4f69a44dbcd22887bbb418 +X1=ed56aaf8a72d67049fdb9228edba1322 +X2=cd47221ccef0554ee4bb044c88150352 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=9bb22ce7d9f372c1ee2b28722b25f206 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=650d887c3936533a1b8d4e1ea39d2b5c +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=3de91827c10e9a4f5240647ee5221f20 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=aac9e6ccc0074ac0873b9ba85d908bd0 +X3=54f5e1b2b5a8f9525c23924751a3ca51 +X4=324f585c6ffc1359ab371565d6c45f93 +X5=ca7dd446af4aa70cc3c0cd5abba6aa1c +X6=1590df9b2eb6768289e57d56274c8570 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=698e57f70e6ecc7fd9463b7260a9ae5f +C=42831ec2217774244b7221b784d0d49ce3aa212f2c02a4e035c17e2329aca12e21d514b25466931c7d8f6a5aac84aa051ba30b396a0aac973d58e091 +T=5bc94fbc3221a5db94fae95ae7121a47 + +test="Test Case 5" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbad +H=b83b533708bf535d0aa6e52980d53b78 +N1=6f288b846e5fed9a18376829c86a6a16 +len({})||len(C)=00000000000000000000000000000040 +Y0=c43a83c4c4badec4354ca984db252f7d +E(K,Y0)=e94ab9535c72bea9e089c93d48e62fb0 +X1=ed56aaf8a72d67049fdb9228edba1322 +X2=cd47221ccef0554ee4bb044c88150352 +Y1=c43a83c4c4badec4354ca984db252f7e +E(K,Y1)=b8040969d08295afd226fcda0ddf61cf +Y2=c43a83c4c4badec4354ca984db252f7f +E(K,Y2)=ef3c83225af93122192ad5c4f15dfe51 +Y3=c43a83c4c4badec4354ca984db252f80 +E(K,Y3)=6fbc659571f72de104c67b609d2fde67 +Y4=c43a83c4c4badec4354ca984db252f81 +E(K,Y4)=f8e3581441a1e950785c3ea1430c6fa6 +X3=9379e2feae14649c86cf2250e3a81916 +X4=65dde904c92a6b3db877c4817b50a5f4 +X5=48c53cf863b49a1b0bbfc48c3baaa89d +X6=08c873f1c8cec3effc209a07468caab1 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=df586bb4c249b92cb6922877e444d37b +C=61353b4c2806934a777ff51fa22a4755699b2a714fcdc6f83766e5f97b6c742373806900e49f24b22b097544d4896b424989b5e1ebac0f07c23f4598 +T=3612d2e79e3b0785561be14aaca2fccb + +test="Test Case 6" +K=feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b +H=b83b533708bf535d0aa6e52980d53b78 +N1=004d6599d7fb1634756e1e299d81630f +N2=88ffe8a3c8033df4b54d732f7f88408e +N3=24e694cfab657beabba8055aad495e23 +N4=d8349a5eda24943c8fbb2ef5168b20cb +len({})||len(IV)=000000000000000000000000000001e0 +Y0=3bab75780a31c059f83d2a44752f9864 +7dc63b399f2d98d57ab073b6baa4138e +X1=ed56aaf8a72d67049fdb9228edba1322 +X2=cd47221ccef0554ee4bb044c88150352 +Y1=3bab75780a31c059f83d2a44752f9865 +E(K,Y1)=55d37bbd9ad21353a6f93a690eca9e0e +Y2=3bab75780a31c059f83d2a44752f9866 +E(K,Y2)=3836bbf6d696e672946a1a01404fa6d5 +Y3=3bab75780a31c059f83d2a44752f9867 +E(K,Y3)=1dd8a5316ecc35c3e313bca59d2ac94a +Y4=3bab75780a31c059f83d2a44752f9868 +E(K,Y4)=6742982706a9f154f657d5dc94b746db +X3=31727669c63c6f078b5d22adbbbca384 +X4=480c00db2679065a7ed2f771a53acacd +X5=1c1ae3c355e2214466a9923d2ba6ab35 +X6=0694c6f16bb0275a48891d06590344b0 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=1c5afe9760d3932f3c9a878aac3dc3de +C=8ce24998625615b603a033aca13fb894be9112a5c3a211a8ba262a3cca7e2ca701e4a9a4fba43c90ccdcb281d48c7c6fd62875d2aca417034c34aee5 +T=619cc5aefffe0bfa462af43c1699d050 + +test="Test Case 7" +K=000000000000000000000000000000000000000000000000 +P= +IV=000000000000000000000000 +H=aae06992acbf52a3e8f4a96ec9300bd7 +Y0=00000000000000000000000000000001 +E(K,Y0)=cd33b28ac773f74ba00ed1f312572435 +len(A)||len(C)=00000000000000000000000000000000 +GHASH(H,A,C)=00000000000000000000000000000000 +C= +T=cd33b28ac773f74ba00ed1f312572435 + +test="Test Case 8" +K=000000000000000000000000000000000000000000000000 +P=00000000000000000000000000000000 +IV=000000000000000000000000 +H=aae06992acbf52a3e8f4a96ec9300bd7 +Y0=00000000000000000000000000000001 +E(K,Y0)=cd33b28ac773f74ba00ed1f312572435 +Y1=00000000000000000000000000000002 +E(K,Y1)=98e7247c07f0fe411c267e4384b0f600 +X1=90e87315fb7d4e1b4092ec0cbfda5d7d +len(A)||len(C)=00000000000000000000000000000080 +GHASH(H,A,C)=e2c63f0ac44ad0e02efa05ab6743d4ce +C=98e7247c07f0fe411c267e4384b0f600 +T=2ff58d80033927ab8ef4d4587514f0fb + + +test="Test Case 9" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255 +IV=cafebabefacedbaddecaf888 +H=466923ec9ae682214f2c082badb39249 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=614b3195542ccc7683ae933c81ec8a62 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=a988a97e85eec28e76b95c29b6023003 +X1=dddca3f91c17821ffac4a6d0fed176f7 +X2=a4e84ac60e2730f4a7e0e1eef708b198 +X3=e67592048dd7153973a0dbbb8804bee2 +X4=503e86628536625fb746ce3cecea433f +len(A)||len(C)=00000000000000000000000000000200 +GHASH(H,A,C)=51110d40f6c8fff0eb1ae33445a889f0 +C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710acade256 +T=9924a7c8587336bfb118024db8674a14 + +test="Test Case 10" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbaddecaf888 +H=466923ec9ae682214f2c082badb39249 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=c835aa88aebbc94f5a02e179fdcfc3e4 +X1=f3bf7ba3e305aeb05ed0d2e4fe076666 +X2=20a51fa2302e9c01b87c48f2c3d91a56 +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=e0b1f82ec484eea44e5ff30128df01cd +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=0339b5b9b3db2e5e4cc9a38986906bee +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=614b3195542ccc7683ae933c81ec8a62 +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=a988a97e85eec28e76b95c29b6023003 +X3=714f9700ddf520f20695f6180c6e669d +X4=e858680b7b240d2ecf7e06bbad4524e2 +X5=3f4865abd6bb3fb9f5c4a816f0a9b778 +X6=4256f67fe87b4f49422ba11af857c973 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=ed2ce3062e4a8ec06db8b4c490e8a268 +C=3980ca0b3c00e841eb06fac4872a2757859e1ceaa6efd984628593b40ca1e19c7d773d00c144c525ac619d18c84a3f4718e2448b2fe324d9ccda2710 +T=2519498e80f1478f37ba55bd6d27618c + +test="Test Case 11" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbad +H=466923ec9ae682214f2c082badb39249 +N1=9473c07b02544299cf007c42c5778218 +len({})||len(IV)=00000000000000000000000000000040 +Y0=a14378078d27258a6292737e1802ada5 +E(K,Y0)=7bb6d647c902427ce7cf26563a337371 +X1=f3bf7ba3e305aeb05ed0d2e4fe076666 +X2=20a51fa2302e9c01b87c48f2c3d91a56 +Y1=a14378078d27258a6292737e1802ada6 +E(K,Y1)=d621c7bc5690a7b1487dbaab8ac76b22 +Y2=a14378078d27258a6292737e1802ada7 +E(K,Y2)=43c1ca7de78f4495ad0b18324e61fa25 +Y3=a14378078d27258a6292737e1802ada8 +E(K,Y3)=e1e0254a0f2f1626e9aa4ff09d7c64ec +Y4=a14378078d27258a6292737e1802ada9 +E(K,Y4)=5850f4502486a1681a9319ce7d0afa59 +X3=8bdedafd6ee8e529689de3a269b8240d +X4=6607feb377b49c9ecdbc696344fe22d8 +X5=8a19570a06500ba9405fcece4a73fb48 +X6=8532826e63ce4a5b89b70fa28f8070fe +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=1e6a133806607858ee80eaf237064089 +C=0f10f599ae14a154ed24b36e25324db8c566632ef2bbb34f8347280fc4507057fddc29df9a471f75c66541d4d4dad1c9e93a19a58e8b473fa0f062f7 +T=65dcc57fcf623a24094fcca40d3533f8 + +test="Test Case 12" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b +H=466923ec9ae682214f2c082badb39249 +N1=19aef0f04763b0c87903c5a217d5314f +N2=62120253f79efc978625d1feb03b5b5b +N3=b6ce2a84e366de900fa78a1653df77fb +N4=374ecad90487f0bb261ba817447e022c +len({})||len(IV)=000000000000000000000000000001e0 +Y0=4505cdc367a054c5002820e96aebef27 +E(K,Y0)=5ea3194f9dd012a3b9bc5103d6e0284d +X1=f3bf7ba3e305aeb05ed0d2e4fe076666 +X2=20a51fa2302e9c01b87c48f2c3d91a56 +Y1=4505cdc367a054c5002820e96aebef28 +E(K,Y1)=0b4fba4de46722d9ed691f9f2029df65 +Y2=4505cdc367a054c5002820e96aebef29 +E(K,Y2)=9b4e088bf380b03540bb87a5a257e437 +Y3=4505cdc367a054c5002820e96aebef2a +E(K,Y3)=9ddb9c873a5cd48acd3f397cd28f9896 +Y4=4505cdc367a054c5002820e96aebef2b +E(K,Y4)=5716ee92eff7c4b053d44c0294ea88cd +X3=f70d61693ea7f53f08c866d6eedb1e4b +X4=dc40bc9a181b35aed66488071ef282ae +X5=85ffa424b87b35cac7be9c450f0d7aee +X6=65233cbe5251f7d246bfc967a8678647 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=82567fb0b4cc371801eadec005968e94 +C=d27e88681ce3243c4830165a8fdcf9ff1de9a1d8e6b447ef6ef7b79828666e4581e79012af34ddd9e2f037589b292db3e67c036745fa22e7e9b7373b +T=dcf566ff291c25bbb8568fc3d376a6d9 + +test="Test Case 13" +K=0000000000000000000000000000000000000000000000000000000000000000 +P= +IV=000000000000000000000000 +H=dc95c078a2408989ad48a21492842087 +Y0=00000000000000000000000000000001 +E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b +len(A)||len(C)=00000000000000000000000000000000 +GHASH(H,A,C)=00000000000000000000000000000000 +C= +T=530f8afbc74536b9a963b4f1c4cb738b + + +test="Test Case 14" +K=0000000000000000000000000000000000000000000000000000000000000000 +P=00000000000000000000000000000000 +IV=000000000000000000000000 +H=dc95c078a2408989ad48a21492842087 +Y0=00000000000000000000000000000001 +E(K,Y0)=530f8afbc74536b9a963b4f1c4cb738b +Y1=00000000000000000000000000000002 +E(K,Y1)=cea7403d4d606b6e074ec5d3baf39d18 +X1=fd6ab7586e556dba06d69cfe6223b262 +len(A)||len(C)=00000000000000000000000000000080 +GHASH(H,A,C)=83de425c5edc5d498f382c441041ca92 +C=cea7403d4d606b6e074ec5d3baf39d18 +T=d0d1c8a799996bf0265b98b5d48ab919 + +test="Test Case 15" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b391aafd255 +IV=cafebabefacedbaddecaf888 +H=acbef20579b4b8ebce889bac8732dad7 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=8b1cf3d561d27be251263e66857164e7 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=e29d258faad137135bd49280af645bd8 +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=908c82ddcc65b26e887f85341f243d1d +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8 +X1=fcbefb78635d598eddaf982310670f35 +X2=29de812309d3116a6eff7ec844484f3e +X3=45fad9deeda9ea561b8f199c3613845b +X4=ed95f8e164bf3213febc740f0bd9c6af +len(A)||len(C)=00000000000000000000000000000200 +GHASH(H,A,C)=4db870d37cb75fcb46097c36230d1612 +C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662898015ad +T=b094dac5d93471bdec1a502270e3cc6c + +test="Test Case 16" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbaddecaf888 +H=acbef20579b4b8ebce889bac8732dad7 +Y0=cafebabefacedbaddecaf88800000001 +E(K,Y0)=fd2caa16a5832e76aa132c1453eeda7e +X1=5165d242c2592c0a6375e2622cf925d2 +X2=8efa30ce83298b85fe71abefc0cdd01d +Y1=cafebabefacedbaddecaf88800000002 +E(K,Y1)=8b1cf3d561d27be251263e66857164e7 +Y2=cafebabefacedbaddecaf88800000003 +E(K,Y2)=e29d258faad137135bd49280af645bd8 +Y3=cafebabefacedbaddecaf88800000004 +E(K,Y3)=908c82ddcc65b26e887f85341f243d1d +Y4=cafebabefacedbaddecaf88800000005 +E(K,Y4)=749cf39639b79c5d06aa8d5b932fc7f8 +X3=abe07e0bb62354177480b550f9f6cdcc +X4=3978e4f141b95f3b4699756b1c3c2082 +X5=8abf3c48901debe76837d8a05c7d6e87 +X6=9249beaf520c48b912fa120bbf391dc8 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=8bd0c4d8aacd391e67cca447e8c38f65 +C=522dc1f099567d07f47f37a32a84427d643a8cdcbfe5c0c97598a2bd2555d1aa8cb08e48590dbb3da7b08b1056828838c5f61e6393ba7a0abcc9f662 +T=76fc6ece0f4e1768cddf8853bb2d551b + + +test="Test Case 17" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=cafebabefacedbad +H=acbef20579b4b8ebce889bac8732dad7 +N1=90c22e3d2aca34b971e8bd09708fae5c +len({})||len(IV)=00000000000000000000000000000040 +Y0=0095df49dd90abe3e4d252475748f5d4 +E(K,Y0)=4f903f37fe611d454217fbfa5cd7d791 +X1=5165d242c2592c0a6375e2622cf925d2 +X2=8efa30ce83298b85fe71abefc0cdd01d +Y1=0095df49dd90abe3e4d252475748f5d5 +E(K,Y1)=1a471fd432fc7bd70b1ec8fe5e6d6251 +Y2=0095df49dd90abe3e4d252475748f5d6 +E(K,Y2)=29bd481e1ea39d20eb63c7ea118b1792 +Y3=0095df49dd90abe3e4d252475748f5d7 +E(K,Y3)=e2898e46ac5cada3ba83cc1272618a5d +Y4=0095df49dd90abe3e4d252475748f5d8 +E(K,Y4)=d3c6aefbcea602ce4e1fe026065447bf +X3=55e1ff68f9249e64b95223858e5cb936 +X4=cef1c034383dc96f733aaa4c99bd3e61 +X5=68588d004fd468f5854515039b08165d +X6=2378943c034697f72a80fce5059bf3f3 +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=75a34288b8c68f811c52b2e9a2f97f63 +C=c3762df1ca787d32ae47c13bf19844cbaf1ae14d0b976afac52ff7d79bba9de0feb582d33934a4f0954cc2363bc73f7862ac430e64abe499f47c9b1f +T=3a337dbf46a792c45e454913fe2ea8f2 + +test="Test Case 18" +K=feffe9928665731c6d6a8f9467308308feffe9928665731c6d6a8f9467308308 +P=d9313225f88406e5a55909c5aff5269a86a7a9531534f7da2e4c303d8a318a721c3c0c95956809532fcf0e2449a6b525b16aedf5aa0de657ba637b39 +A=feedfacedeadbeeffeedfacedeadbeefabaddad2 +IV=9313225df88406e555909c5aff5269aa6a7a9538534f7da1e4c303d2a318a728c3c0c95156809539fcf0e2429a6b525416aedbf5a0de6a57a637b39b +H=acbef20579b4b8ebce889bac8732dad7 +N1=0bfe66e2032f195516379f5fb710f987 +N2=f0631554d11409915feec8f9f5102aba +N3=749b90dda19a1557fd9e9fd31fed1d14 +N4=7a6a833f260d848793b327cb07d1b190 +len({})||len(IV)=000000000000000000000000000001e0 +Y0=0cd953e2140a5976079f8e2406bc8eb4 +E(K,Y0)=71b54d092bb0c3d9ba94538d4096e691 +X1=5165d242c2592c0a6375e2622cf925d2 +X2=8efa30ce83298b85fe71abefc0cdd01d +Y1=0cd953e2140a5976079f8e2406bc8eb5 +E(K,Y1)=83bcdd0af41a551452047196ca6b0cba +Y2=0cd953e2140a5976079f8e2406bc8eb6 +E(K,Y2)=68151b79baea93c38e149b72e545e186 +Y3=0cd953e2140a5976079f8e2406bc8eb7 +E(K,Y3)=13fccf22159a4d16026ce5d58c7e99fb +Y4=0cd953e2140a5976079f8e2406bc8eb8 +E(K,Y4)=132b64628a031e79fecd050675a64f07 +X3=e963941cfa8c417bdaa3b3d94ab4e905 +X4=2178d7f836e5fa105ce0fdf0fc8f0654 +X5=bac14eeba3216f966b3e7e011475b832 +X6=cc9ae9175729a649936e890bd971a8bf +len(A)||len(C)=00000000000000a000000000000001e0 +GHASH(H,A,C)=d5ffcf6fc5ac4d69722187421a7f170b +C=5a8def2f0c9e53f1f75d7853659e2a20eeb2b22aafde6419a058ab4f6f746bf40fc0c3b780f244452da3ebf1c5d82cdea2418997200ef82e44ae7e3f +T=a44a8266ee1c8eb0c8b5d4cf5ae9f19a + + + + + diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext0 new file mode 100644 index 0000000000..e7895954ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext0 @@ -0,0 +1 @@ +taydfPlRJe3wf8Td0xJ9Tw== diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext1 b/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext1 new file mode 100644 index 0000000000..7dbd9b036e --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext1 @@ -0,0 +1 @@ +yoYCZwKnUMcS4ADHxnwObA== diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext2 b/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext2 new file mode 100644 index 0000000000..007a2b0faf --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/ciphertext2 @@ -0,0 +1 @@ +T+Wn4cs1Sbqrh/XtNd4vzQ== diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/iv0 b/security/nss/cmd/bltest/tests/camellia_cbc/iv0 new file mode 100644 index 0000000000..4e65bc0347 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/iv0 @@ -0,0 +1 @@ +qwertyuiopasdfgh diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/key0 b/security/nss/cmd/bltest/tests/camellia_cbc/key0 new file mode 100644 index 0000000000..13911cc29a --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/key0 @@ -0,0 +1 @@ +fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/key1 b/security/nss/cmd/bltest/tests/camellia_cbc/key1 new file mode 100644 index 0000000000..a9cb2f12f8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/key1 @@ -0,0 +1 @@ +fedcba9876543210fedcba98 diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/key2 b/security/nss/cmd/bltest/tests/camellia_cbc/key2 new file mode 100644 index 0000000000..ab55fe2ee5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/key2 @@ -0,0 +1 @@ +fedcba9876543210fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/numtests b/security/nss/cmd/bltest/tests/camellia_cbc/numtests new file mode 100644 index 0000000000..00750edc07 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/numtests @@ -0,0 +1 @@ +3 diff --git a/security/nss/cmd/bltest/tests/camellia_cbc/plaintext0 b/security/nss/cmd/bltest/tests/camellia_cbc/plaintext0 new file mode 100644 index 0000000000..8d6a8d555b --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_cbc/plaintext0 @@ -0,0 +1 @@ +0123456789abcdef diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext0 new file mode 100644 index 0000000000..084ba780ee --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext0 @@ -0,0 +1 @@ +6v0CGxSwow3AhsyhunfdbQ== diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext1 b/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext1 new file mode 100644 index 0000000000..dbd6e5f420 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext1 @@ -0,0 +1 @@ +Nf1GwJiBtZT+VPJp+gBhPA== diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext2 b/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext2 new file mode 100644 index 0000000000..0b278ce2a6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/ciphertext2 @@ -0,0 +1 @@ +ilB/0K3SI86Oecwh7cruGA== diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/key0 b/security/nss/cmd/bltest/tests/camellia_ecb/key0 new file mode 100644 index 0000000000..13911cc29a --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/key0 @@ -0,0 +1 @@ +fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/key1 b/security/nss/cmd/bltest/tests/camellia_ecb/key1 new file mode 100644 index 0000000000..a9cb2f12f8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/key1 @@ -0,0 +1 @@ +fedcba9876543210fedcba98 diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/key2 b/security/nss/cmd/bltest/tests/camellia_ecb/key2 new file mode 100644 index 0000000000..ab55fe2ee5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/key2 @@ -0,0 +1 @@ +fedcba9876543210fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/numtests b/security/nss/cmd/bltest/tests/camellia_ecb/numtests new file mode 100644 index 0000000000..00750edc07 --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/numtests @@ -0,0 +1 @@ +3 diff --git a/security/nss/cmd/bltest/tests/camellia_ecb/plaintext0 b/security/nss/cmd/bltest/tests/camellia_ecb/plaintext0 new file mode 100644 index 0000000000..8d6a8d555b --- /dev/null +++ b/security/nss/cmd/bltest/tests/camellia_ecb/plaintext0 @@ -0,0 +1 @@ +0123456789abcdef diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/aad0 b/security/nss/cmd/bltest/tests/chacha20_poly1305/aad0 new file mode 100644 index 0000000000..a420ef1842 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/aad0 @@ -0,0 +1 @@ +PQRSÀÁÂÃÄÅÆÇ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/aad1 b/security/nss/cmd/bltest/tests/chacha20_poly1305/aad1 new file mode 100644 index 0000000000..91287a1a2e Binary files /dev/null and b/security/nss/cmd/bltest/tests/chacha20_poly1305/aad1 differ diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext0 b/security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext0 new file mode 100644 index 0000000000..a06f68b5f0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext0 @@ -0,0 +1 @@ +0xqNNGSOYNt7hq+8U+9+wqSt7VEpbgj+qeK1pzbuYtY9vqRejKlnEoL6+2naknKLGnHeCp4GCykF1qW2fs07NpLdvX8td4uMmAOu4ygJG1j6syTk+tZ1lFWFgItIMde8P/Te8I5Lep3ldtJlhs7GS2EWGuELWU8J4mp+kC7L0GAGkQ== diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext1 b/security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext1 new file mode 100644 index 0000000000..e7f0d01007 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/ciphertext1 @@ -0,0 +1 @@ +ZKCGFXWGGvRg8GLHm+ZDvV6AXP00XPOJ8QhnCsdsjLJMbPwYdV1D7qCe6U44LSawvbe3PDIbAQDU8Dt/NViUzzMvgw5xC5fOmMioSr0LlIEUrRduAI0zvWD5grH/N8hVl5egbvTw72HBhjJOKzUGODYGkHtqfAKw+fYVe1PIZ+S5Fmx2e4BNRqWbUhbN56TpkEDFpAQzIl7igqGwoGxSPq9FNNf4P6EVWwBHcYy8VGoNBysEs1ZO6htCInP1SCcaC7IxYFP6dpkZVevWMVlDTs67TkZtrloQc6ZydicJehBJ5hfZHTYQlPpo8P93mHEwMFvqui7aBN+Ze3FNbG8sKaatXLQCKwJwm+6tnWeJDLsiOSM2/qGFHzg= diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/iv0 b/security/nss/cmd/bltest/tests/chacha20_poly1305/iv0 new file mode 100644 index 0000000000..7e8a175046 Binary files /dev/null and b/security/nss/cmd/bltest/tests/chacha20_poly1305/iv0 differ diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/iv1 b/security/nss/cmd/bltest/tests/chacha20_poly1305/iv1 new file mode 100644 index 0000000000..7c8b98f50d Binary files /dev/null and b/security/nss/cmd/bltest/tests/chacha20_poly1305/iv1 differ diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/key0 b/security/nss/cmd/bltest/tests/chacha20_poly1305/key0 new file mode 100644 index 0000000000..503ecb84e0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/key0 @@ -0,0 +1 @@ +€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/key1 b/security/nss/cmd/bltest/tests/chacha20_poly1305/key1 new file mode 100644 index 0000000000..002bf1b455 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/key1 @@ -0,0 +1 @@ +’@¥ëUÓŠó3ˆ†öµðG9Á@+€ Ê\¼ puÀ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/numtests b/security/nss/cmd/bltest/tests/chacha20_poly1305/numtests new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/numtests @@ -0,0 +1 @@ +2 diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext0 b/security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext0 new file mode 100644 index 0000000000..74c2229083 --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext0 @@ -0,0 +1 @@ +Ladies and Gentlemen of the class of '99: If I could offer you only one tip for the future, sunscreen would be it. \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext1 b/security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext1 new file mode 100644 index 0000000000..029317d8ec --- /dev/null +++ b/security/nss/cmd/bltest/tests/chacha20_poly1305/plaintext1 @@ -0,0 +1 @@ +Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as /“work in progress./†\ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/des3_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/des3_cbc/ciphertext0 new file mode 100644 index 0000000000..61dae3192e --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_cbc/ciphertext0 @@ -0,0 +1 @@ +KV3MDNGKWOc= diff --git a/security/nss/cmd/bltest/tests/des3_cbc/iv0 b/security/nss/cmd/bltest/tests/des3_cbc/iv0 new file mode 100644 index 0000000000..97b5955f78 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_cbc/iv0 @@ -0,0 +1 @@ +12345678 diff --git a/security/nss/cmd/bltest/tests/des3_cbc/key0 b/security/nss/cmd/bltest/tests/des3_cbc/key0 new file mode 100644 index 0000000000..588efd1118 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_cbc/key0 @@ -0,0 +1 @@ +abcdefghijklmnopqrstuvwx diff --git a/security/nss/cmd/bltest/tests/des3_cbc/numtests b/security/nss/cmd/bltest/tests/des3_cbc/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_cbc/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/des3_cbc/plaintext0 b/security/nss/cmd/bltest/tests/des3_cbc/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_cbc/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/des3_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/des3_ecb/ciphertext0 new file mode 100644 index 0000000000..76dc820d3b --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_ecb/ciphertext0 @@ -0,0 +1 @@ +RgckVNh4QcM= diff --git a/security/nss/cmd/bltest/tests/des3_ecb/key0 b/security/nss/cmd/bltest/tests/des3_ecb/key0 new file mode 100644 index 0000000000..588efd1118 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_ecb/key0 @@ -0,0 +1 @@ +abcdefghijklmnopqrstuvwx diff --git a/security/nss/cmd/bltest/tests/des3_ecb/numtests b/security/nss/cmd/bltest/tests/des3_ecb/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_ecb/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/des3_ecb/plaintext0 b/security/nss/cmd/bltest/tests/des3_ecb/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des3_ecb/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/des_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/des_cbc/ciphertext0 new file mode 100644 index 0000000000..67d2ad1aac --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_cbc/ciphertext0 @@ -0,0 +1 @@ +Perdg9FMYQ4= diff --git a/security/nss/cmd/bltest/tests/des_cbc/iv0 b/security/nss/cmd/bltest/tests/des_cbc/iv0 new file mode 100644 index 0000000000..97b5955f78 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_cbc/iv0 @@ -0,0 +1 @@ +12345678 diff --git a/security/nss/cmd/bltest/tests/des_cbc/key0 b/security/nss/cmd/bltest/tests/des_cbc/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_cbc/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/des_cbc/numtests b/security/nss/cmd/bltest/tests/des_cbc/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_cbc/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/des_cbc/plaintext0 b/security/nss/cmd/bltest/tests/des_cbc/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_cbc/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/des_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/des_ecb/ciphertext0 new file mode 100644 index 0000000000..8be22fa5c6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_ecb/ciphertext0 @@ -0,0 +1 @@ +3bNoWzzNiFc= diff --git a/security/nss/cmd/bltest/tests/des_ecb/key0 b/security/nss/cmd/bltest/tests/des_ecb/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_ecb/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/des_ecb/numtests b/security/nss/cmd/bltest/tests/des_ecb/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_ecb/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/des_ecb/plaintext0 b/security/nss/cmd/bltest/tests/des_ecb/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/des_ecb/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext0 b/security/nss/cmd/bltest/tests/dsa/ciphertext0 new file mode 100644 index 0000000000..8e7150562e --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext0 @@ -0,0 +1 @@ +fB0bnKWvjT6X5NIkZ5l/Y/DXZ6QNI6j0iPhR/ZERkfj67xRnTWY1cg== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext1 b/security/nss/cmd/bltest/tests/dsa/ciphertext1 new file mode 100644 index 0000000000..4420dc71b4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext1 @@ -0,0 +1 @@ +UO0OgQ4/HHy2rGIzIFhEi9iyhMDGre0XIWtGt+S28ql8GtfMPag/3g== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext10 b/security/nss/cmd/bltest/tests/dsa/ciphertext10 new file mode 100644 index 0000000000..55e975aa82 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext10 @@ -0,0 +1,2 @@ +namWZQDenTtrf0QcpVAjP8RQlEvFB+Ac1KywMC1y8fZoHoZ/fYvq6+ukvFsjKHYE +pkz+4cFkWVo= diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext11 b/security/nss/cmd/bltest/tests/dsa/ciphertext11 new file mode 100644 index 0000000000..62388f1465 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext11 @@ -0,0 +1,2 @@ +Nj4BxWTzgKJ9fSOyB68/lh1I/AmVSH9gBSd11ySrPRBJFtkbKScpTkKdU3wG3SRj +0YRQGMyihz6Qpsg3tEX93g== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext12 b/security/nss/cmd/bltest/tests/dsa/ciphertext12 new file mode 100644 index 0000000000..5a933e6c85 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext12 @@ -0,0 +1,2 @@ +BZvunnCLfyDD95GmQO3ulk4KpnKJPEhHmXFYF7Oo9tRL1ByEpyTMhuTwGU7A+/N5 +5lTQ1/ah8IvUaBOUIqXDUw== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext13 b/security/nss/cmd/bltest/tests/dsa/ciphertext13 new file mode 100644 index 0000000000..4a21643e58 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext13 @@ -0,0 +1,2 @@ +YzBV4FXyN8OJmdgcOXhIw4zOgKVbZJ2eeQXCmOKlFEcrv2gxdmDsHksVSRUCewvA +DuGc/Av3XQGTBQTyzhCosA== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext14 b/security/nss/cmd/bltest/tests/dsa/ciphertext14 new file mode 100644 index 0000000000..ca7896ff3c --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext14 @@ -0,0 +1,2 @@ +T9jyXAWQMAJzgdQWfDF0tr4AiMFfClc9fr0Flg9aHrJfVoac7nv2T+xdXW6hW7H6 +EWkAOofszBYhuQobiSIm8g== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext15 b/security/nss/cmd/bltest/tests/dsa/ciphertext15 new file mode 100644 index 0000000000..65e68f99dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext15 @@ -0,0 +1,2 @@ +akfqV86uzBFtcZD/bG3Zgxq3W0v2yykQg+Qmi0hu0kUBc1X2mKMqvppNSn3afIWV +DN3DSKuKZ1HnL93AGqXR8A== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext16 b/security/nss/cmd/bltest/tests/dsa/ciphertext16 new file mode 100644 index 0000000000..e72ae9e72c --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext16 @@ -0,0 +1,2 @@ +IcoUjN9EvkrpOy81O45RLQOtltr6gGI/3kkiqV8DJzJz5It3o6pEMHSDwt2JXLUd +shEhd8GFxZyx3P8y/aAqTw== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext17 b/security/nss/cmd/bltest/tests/dsa/ciphertext17 new file mode 100644 index 0000000000..83417303a9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext17 @@ -0,0 +1,2 @@ +LlnV8w9zeB04JVtw3t7rOK54308ALB90fAjercZTAVVhXFWy3wyijGCms4XFj6A2 +34xLL08ZNXML+PTwvtE2EA== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext18 b/security/nss/cmd/bltest/tests/dsa/ciphertext18 new file mode 100644 index 0000000000..56e3ad3751 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext18 @@ -0,0 +1,2 @@ +U7rmxvM24usxHB6S2V/ESakpRE74HsQnlmCyANWUM95J86dOlT53p5Qa867+707U +mb4gmXag7bP6Xny5YbDBEg== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext19 b/security/nss/cmd/bltest/tests/dsa/ciphertext19 new file mode 100644 index 0000000000..16d0828bf1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext19 @@ -0,0 +1,2 @@ +dpVpihR1XbQgboULT18ZxUCwfQfgiqxZHiAIFkbm7tw9rgEVTs/3sZAHqVPxhfBm +PvfyU38LFeBPs0PJYfNt4g== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext2 b/security/nss/cmd/bltest/tests/dsa/ciphertext2 new file mode 100644 index 0000000000..e2442d9f79 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext2 @@ -0,0 +1 @@ +r+5xnn+Ei1Q0nMw7T7JgZYM6TY5zTv6ZIlbzEyXnSbwyokoflXs6Gw== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext20 b/security/nss/cmd/bltest/tests/dsa/ciphertext20 new file mode 100644 index 0000000000..ead0ebbeef --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext20 @@ -0,0 +1,2 @@ +pApskFZUxV/FjpnH0aP+6ixb5kgj1Ahs6BHzNM/cRI1keAUJd+xYWYBFTgovJqAw +N7khyliKeKTa/36E1JqKbA== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext3 b/security/nss/cmd/bltest/tests/dsa/ciphertext3 new file mode 100644 index 0000000000..072c996ef3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext3 @@ -0,0 +1 @@ +dmg6CF1nQurflaYa91+IEnbP0mo7naf5km6qrQvr1IRcZ/zbZNEkUw== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext4 b/security/nss/cmd/bltest/tests/dsa/ciphertext4 new file mode 100644 index 0000000000..4a5ebfa0a6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext4 @@ -0,0 +1 @@ +d8TZn2KzrX3R/mSY20Wl2nPOe94jhxoAKuUD/auqaoTcyPOHaXN/AQ== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext5 b/security/nss/cmd/bltest/tests/dsa/ciphertext5 new file mode 100644 index 0000000000..707fd56d06 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext5 @@ -0,0 +1 @@ +pT8fjyC409RyDxSourUiawedmVMR9T9qTla1H2DiDUlXronhYq6mFg== diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext6 b/security/nss/cmd/bltest/tests/dsa/ciphertext6 new file mode 100644 index 0000000000..1bba78703c --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext6 @@ -0,0 +1,2 @@ +Rd8vQj6UvxVd1OHZ5j8xXqYG3ThSfUz2Moc4yFmz6O+lvAzL9KPLtlFcS5v3hM+s +3MEB3J+B0x8= diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext7 b/security/nss/cmd/bltest/tests/dsa/ciphertext7 new file mode 100644 index 0000000000..d1a66d3366 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext7 @@ -0,0 +1,2 @@ +ZRAuj2TssR8GAXsaDA3vPCmJfCd8SpSLH02muSGtCrsnvTwhFmy5au9wwNvV8wec +qw3VQ9QSW9E= diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext8 b/security/nss/cmd/bltest/tests/dsa/ciphertext8 new file mode 100644 index 0000000000..87fa10cf5b --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext8 @@ -0,0 +1,2 @@ +nF+kaHndr1wU8H37UyBxX2em/sF5461TNC+20cPhfns8TQrI1J9N0PBMFqCU9C2g +r8xskPXxu8g= diff --git a/security/nss/cmd/bltest/tests/dsa/ciphertext9 b/security/nss/cmd/bltest/tests/dsa/ciphertext9 new file mode 100644 index 0000000000..dad2c50af8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/ciphertext9 @@ -0,0 +1,2 @@ +WrQ+3mahVogUbR9M1xZHAsDERXvU/d66wEgpU2xY6Ksn0oUSxGBjyWv1vOuPutIy +2PWznEdV0LE= diff --git a/security/nss/cmd/bltest/tests/dsa/dsa_fips.txt b/security/nss/cmd/bltest/tests/dsa/dsa_fips.txt new file mode 100644 index 0000000000..e657c083ed --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/dsa_fips.txt @@ -0,0 +1,248 @@ +# CAVS 11.2 +# "SigGen" information for "dsa2_values" +# Mod sizes selected: L=1024, N=160, SHA-1 L=1024, N=160, SHA-224 L=1024, N=160, SHA-256 L=1024, N=160, SHA-384 L=1024, N=160, SHA-512 L=2048, N=224, SHA-1 L=2048, N=224, SHA-224 L=2048, N=224, SHA-256 L=2048, N=224, SHA-384 L=2048, N=224, SHA-512 L=2048, N=256, SHA-1 L=2048, N=256, SHA-224 L=2048, N=256, SHA-256 L=2048, N=256, SHA-384 L=2048, N=256, SHA-512 L=3072, N=256, SHA-1 L=3072, N=256, SHA-224 L=3072, N=256, SHA-256 L=3072, N=256, SHA-384 L=3072, N=256, SHA-512 +# Generated on Tue Aug 16 11:21:08 2011 +# +# These sample from NIST were used to generate dsa tests 1-20 +# + +[mod = L=1024, N=160, SHA-1] + +P = a8f9cd201e5e35d892f85f80e4db2599a5676a3b1d4f190330ed3256b26d0e80a0e49a8fffaaad2a24f472d2573241d4d6d6c7480c80b4c67bb4479c15ada7ea8424d2502fa01472e760241713dab025ae1b02e1703a1435f62ddf4ee4c1b664066eb22f2e3bf28bb70a2a76e4fd5ebe2d1229681b5b06439ac9c7e9d8bde283 +Q = f85f0f83ac4df7ea0cdf8f469bfeeaea14156495 +G = 2b3152ff6c62f14622b8f48e59f8af46883b38e79b8c74deeae9df131f8b856e3ad6c8455dab87cc0da8ac973417ce4f7878557d6cdf40b35b4a0ca3eb310c6a95d68ce284ad4e25ea28591611ee08b8444bd64b25f3f7c572410ddfb39cc728b9c936f85f419129869929cdb909a6a3a99bbe089216368171bd0ba81de4fe33 +Msg = 3b46736d559bd4e0c2c1b2553a33ad3c6cf23cac998d3d0c0e8fa4b19bca06f2f386db2dcff9dca4f40ad8f561ffc308b46c5f31a7735b5fa7e0f9e6cb512e63d7eea05538d66a75cd0d4234b5ccf6c1715ccaaf9cdc0a2228135f716ee9bdee7fc13ec27a03a6d11c5c5b3685f51900b1337153bc6c4e8f52920c33fa37f4e7 +X = c53eae6d45323164c7d07af5715703744a63fc3a +Y = 313fd9ebca91574e1c2eebe1517c57e0c21b0209872140c5328761bbb2450b33f1b18b409ce9ab7c4cd8fda3391e8e34868357c199e16a6b2eba06d6749def791d79e95d3a4d09b24c392ad89dbf100995ae19c01062056bb14bce005e8731efde175f95b975089bdcdaea562b32786d96f5a31aedf75364008ad4fffebb970b +K = 98cbcc4969d845e2461b5f66383dd503712bbcfa +R = 50ed0e810e3f1c7cb6ac62332058448bd8b284c0 +S = c6aded17216b46b7e4b6f2a97c1ad7cc3da83fde + +[mod = L=1024, N=160, SHA-224] + +P = 8b9b32f5ba38faad5e0d506eb555540d0d7963195558ca308b7466228d92a17b3b14b8e0ab77a9f3b2959a09848aa69f8df92cd9e9edef0adf792ce77bfceccadd9352700ca5faecf181fa0c326db1d6e5d352458011e51bd3248f4e3bd7c820d7e0a81932aca1eba390175e53eada197223674e3900263e90f72d94e7447bff +Q = bc550e965647fb3a20f245ec8475624abbb26edd +G = 11333a931fba503487777376859fdc12f7c687b0948ae889d287f1b7a712ad220ae4f1ce379d0dbb5c9abf419621f005fc123c327e5055d1850634c36d397e689e111d598c1c3636b940c84f42f436846e8e7fcad9012ceda398720f32fffd1a45ab6136ce417069207ac140675b8f86dd063915ae6f62b0cec729fbd509ac17 +Msg = fb2128052509488cad0745ed3e6312850dd96ddaf791f1e624e22a6b9beaa65319c325c78ef59cacba0ccfa722259f24f92c17b77a8f6d8e97c93d880d2d8dbbbedcf6acefa06b0e476ca2013d0394bd90d56c10626ef43cea79d1ef0bc7ac452bf9b9acaef70325e055ac006d34024b32204abea4be5faae0a6d46d365ed0d9 +X = 6e2e31bbfc670944d7a7120e39a981520614d8a8 +Y = 7e339f3757450390160e02291559f30bed0b2d758c5ccc2d8d456232bb435ae49de7e7957e3aad9bfdcf6fd5d9b6ee3b521bc2229a8421dc2aa59b9952345a8fc1de49b348003a9b18da642d7f6f56e3bc665131ae9762088a93786f7b4b72a4bcc308c67e2532a3a5bf09652055cc26bf3b18833598cffd7011f2285f794557 +K = 8cb35d255505a4c41421e562d10827266aa68663 +R = afee719e7f848b54349ccc3b4fb26065833a4d8e +S = 734efe992256f31325e749bc32a24a1f957b3a1b + +[mod = L=1024, N=160, SHA-256] + +P = cba13e533637c37c0e80d9fcd052c1e41a88ac325c4ebe13b7170088d54eef4881f3d35eae47c210385a8485d2423a64da3ffda63a26f92cf5a304f39260384a9b7759d8ac1adc81d3f8bfc5e6cb10efb4e0f75867f4e848d1a338586dd0648feeb163647ffe7176174370540ee8a8f588da8cc143d939f70b114a7f981b8483 +Q = 95031b8aa71f29d525b773ef8b7c6701ad8a5d99 +G = 45bcaa443d4cd1602d27aaf84126edc73bd773de6ece15e97e7fef46f13072b7adcaf7b0053cf4706944df8c4568f26c997ee7753000fbe477a37766a4e970ff40008eb900b9de4b5f9ae06e06db6106e78711f3a67feca74dd5bddcdf675ae4014ee9489a42917fbee3bb9f2a24df67512c1c35c97bfbf2308eaacd28368c5c +Msg = 812172f09cbae62517804885754125fc6066e9a902f9db2041eeddd7e8da67e4a2e65d0029c45ecacea6002f9540eb1004c883a8f900fd84a98b5c449ac49c56f3a91d8bed3f08f427935fbe437ce46f75cd666a0707265c61a096698dc2f36b28c65ec7b6e475c8b67ddfb444b2ee6a984e9d6d15233e25e44bd8d7924d129d +X = 2eac4f4196fedb3e651b3b00040184cfd6da2ab4 +Y = 4cd6178637d0f0de1488515c3b12e203a3c0ca652f2fe30d088dc7278a87affa634a727a721932d671994a958a0f89223c286c3a9b10a96560542e2626b72e0cd28e5133fb57dc238b7fab2de2a49863ecf998751861ae668bf7cad136e6933f57dfdba544e3147ce0e7370fa6e8ff1de690c51b4aeedf0485183889205591e8 +K = 85976c5610a74959531040a5512b347eac587e48 +R = 76683a085d6742eadf95a61af75f881276cfd26a +S = 3b9da7f9926eaaad0bebd4845c67fcdb64d12453 + +[mod = L=1024, N=160, SHA-384] + +P = f24a4afc72c7e373a3c30962332fe5405c45930963909418c30792aaf135ddea561e94f24726716b75a18828982e4ce44c1fddcb746487b6b77a9a5a17f868ab50cd621b5bc9da470880b287d7398190a42a5ee22ed8d1ff147e2019810c8298ed68e1ca69d41d555f249e649fb1725ddb075c17b37beff467fdd1609243373f +Q = da065a078ddb56ee5d2ad06cafab20820d2c4755 +G = 47b5591b79043e4e03ca78a0e277c9a21e2a6b543bf4f044104cd9ac93eff8e101bb6031efc8c596d5d2f92e3a3d0f1f74702dd54f77d3cd46c04dee7a5de9f00ad317691fddcefe4a220a2651acae7fcedda92bfcca855db6705e8d864f8192bf6bf860c00f08ad6493ecc1872e0028d5c86d44505db57422515c3825a6f78a +Msg = b0dbbf4a421ba5c5b0e52f09629801c113258c252f29898c3354706e39ec5824be523d0e2f8cfe022cd61165301274d5d621a59755f50404d8b802371ce616defa962e3636ae934ec34e4bcf77a16c7eff8cf4cc08a0f4849d6ad4307e9f8df83f24ad16ab46d1a61d2d7d4e21681eb2ae281a1a5f9bca8573a3f5281d308a5a +X = 649820168eb594f59cd9b28b9aefe8cc106a6c4f +Y = 43a27b740f422cb2dc3eaa232315883a2f6a22927f997d024f5a638b507b17d3b1cbd3ec691cc674470960a0146efdecb95bb5fe249749e3c806cd5cc3e7f7bab845dadbe1f50b3366fb827a942ce6246dda7bd2c13e1b4a926c0c82c884639552d9d46036f9a4bc2a9e51c2d76e3074d1f53a63224c4279e0fa460474d4ffde +K = 33c7ba88ff69707971b25ac344ae4a566e195f99 +R = 77c4d99f62b3ad7dd1fe6498db45a5da73ce7bde +S = 23871a002ae503fdabaa6a84dcc8f38769737f01 + +[mod = L=1024, N=160, SHA-512] + +P = 88d968e9602ecbda6d86f7c970a3ffbeb1da962f28c0afb9270ef05bc330ca98c3adf83c072feb05fb2e293b5065bbb0cbcc930c24d8d07869deaecd92a2604c0f5dd35c5b431fda6a222c52c3562bf7571c710209be8b3b858818788725fe8112b7d6bc82e0ff1cbbf5d6fe94690af2b510e41ad8207dc2c02fb9fa5cefaab5 +Q = a665689b9e5b9ce82fd1676006cf4cf67ecc56b7 +G = 267e282857417752113fba3fca7155b5ce89e7c8a33c1a29122e2b720965fc04245267ff87fc67a5730fe5b308013aa3266990fbb398185a87e055b443a868ce0ce13ae6aee330b9d25d3bbb362665c5881daf0c5aa75e9d4a82e8f04c91a9ad294822e33978ab0c13fadc45831f9d37da4efa0fc2c5eb01371fa85b7ddb1f82 +Msg = 3a84a5314e90fd33bb7cd6ca68720c69058da1da1b359046ae8922cac8afc5e025771635fb4735491521a728441b5cb087d60776ee0ecc2174a41985a82cf46d8f8d8b274a0cc439b00971077c745f8cf701cf56bf9914cc57209b555dc87ca8c13da063270c60fc2c988e692b75a7f2a669903b93d2e14e8efb6fb9f8694a78 +X = 07ce8862e64b7f6c7482046dbfc93907123e5214 +Y = 60f5341e48ca7a3bc5decee61211dd2727cd8e2fc7635f3aabea262366e458f5c51c311afda916cb0dcdc5d5a5729f573a532b594743199bcfa7454903e74b33ddfe65896306cec20ebd8427682fa501ee06bc4c5d1425cbe31828ba008b19c9da68136cf71840b205919e783a628a5a57cf91cf569b2854ffef7a096eda96c9 +K = 2f170907ac69726b14f22056dcb37b4df85f7424 +R = a53f1f8f20b8d3d4720f14a8bab5226b079d9953 +S = 11f53f6a4e56b51f60e20d4957ae89e162aea616 + +[mod = L=2048, N=224, SHA-1] + +P = f2d39ed3062b13c916273600a0f2a029e86d7a4b9217b4f1815bf2b24d9710a57ab33f997294b014585b8d0198dfdccbcd75314da5ff85aa344b45adaeaa979b51a312a7bfa94472fb633f1a6f156bb4458867dfd38403f06b851f00fe2d3484077bded71ab7513d04a140220575fb693395480e4c8402b7a46cec2d37a778c305accd1f13e9f62e865315f4b22cc467c8986ec8e4961ddf810566b0c4ee369ac6aa15e43f4744005826f5bde8071a19e30b6909aac4b3d174237270dad02799d09b8a2cc5f22e66894b5422228b2c234f11f5a771c5b89cf465a2acecbbeeaa1725fe8f9b59422be8991052cb556ddf2c8ce8fa9206dbf39feadc194e00f8e5 +Q = 8000000000000000c118f49835e4ef733c4d15800fcf059e884d31b1 +G = e3a93c09da6f560e4d483a382a4c546f2335c36a4c35ac1463c08a3e6dd415df56fdc537f25fd5372be63e4f5300780b782f1acd01c8b4eb33414615fd0ea82573acba7ef83f5a943854151afc2d7dfe121fb8cd03335b065b549c5dcc606be9052483bc284e12ac3c8dba09b426e08402030e70bc1cc2bf8957c4ba0630f3f32ad689389ac47443176063f247d9e2296b3ea5b5bc2335828ea1a080ed35918dee212fd031279d1b894f01afec523833669eac031a420e540ba1320a59c424a3e5849a460a56bcb001647885b1433c4f992971746bfe2977ce7259c550b551a6c35761e4a41af764e8d92132fcc0a59d1684eab90d863f29f41cf7578faa908c +Msg = edc6fd9b6c6e8a59f283016f7f29ee16deeaa609b5737927162aef34fed985d0bcb550275637ba67831a2d4efccb35296dfe730f4a0b4f4728d1d7d1bb8f4a36238a5c94311fa1134a93a6b4de39c085e9f60ae4e237c0416d58042bb36baa38cba8c896295b745d5376fd8ce42eb6ee5a1b38f87716b265b76e58cfb24a9170 +X = 6132e551cdac88409183bd37ee1452cd247d4834b08814b275be3ff5 +Y = 289ff18c32a56bb0b8839370647683a38a5a7e291410b93207212adc8088d30f93e9e4abc523f3d46936e7d5c90d88742b36afd37563408f15c8c1a4f7ac24bf05f01008ffee70c8825d57c3a9308bad8a095af2b53b2dda3cbed846d95e301eb9b84766415d11f6c33209a0d28571096ab04a79aa0dc465997529686b68e887cd8a205c2dc8195aef0422eba9979f549ac85548e419413643b7244361153ada1480d238cd00dc16527938955548dd5d027ded1029eeeb8ed6c61b4cd59341d8b15466e9da890a989996f4d7691e6072de136af28b5874bf08bd1f8a60cfb1c00888132909f515e04bce81b02951aa41baac68ffdb8c5dc77a1d32d8f2c10dd7 +K = 7197392d32d0af6a7183cc3398556f8f687d86a8ff742be6ad38562f +R = 45df2f423e94bf155dd4e1d9e63f315ea606dd38527d4cf6328738c8 +S = 59b3e8efa5bc0ccbf4a3cbb6515c4b9bf784cfacdcc101dc9f81d31f + +[mod = L=2048, N=224, SHA-224] + +P = aa815c9db1c4d3d2773c7d0d4d1da75ecfc4a39e97d5fa191ffec8b1490a290ce335e5ce87ea620a8a17de0bb64714e2ec840bf00e6ebdb4ffb4e324ca07c3c8717309af1410362a772c9add838b2b0cae1e90ab448adabdacd2e5df59c4187a32a23719d6c57e9400885383bf8f066f23b941920d54c35b4f7cc5044f3b40f17046956307b748e840732844d00a9ce6ec5714293b6265147f15c67f4be38b082b55fdeadb6124689fb76f9d25cc28b8eaa98b562d5c1011e0dcf9b39923240d332d89dc9603b7bddd0c70b83caa2905631b1c83cabbae6c0c0c2efe8f58131ed8351bf93e875f6a73a93cbad470141a2687fbacf2d71c8ddee971ad660729ad +Q = ea347e90be7c2875d1fe1db622b4763837c5e27a6037310348c1aa11 +G = 2042094ccbc8b8723fc928c12fda671b83295e99c743576f44504be1186323319b5002d24f173df909ea241d6ea5289904ee4636204b2fbe94b068fe093f7962579549551d3af219ad8ed19939eff86bcec834de2f2f78596e89e7cb52c524e177098a56c232eb1f563aa84bc6b026deee6ff51cb441e080f2dafaea1ced86427d1c346be55c66803d4b76d133cd445b4c3482fa415023463c9bf30f2f784223e26057d3aa0d7fbb660630c52e49d4a0325c7389e072aa349f13c966e159752fbb71e9336890f93243fa6e72d299365ee5b3fe266ebf1110568fee4425c847b50210bd484b97431a42856adca3e7d1a9c9c675c7e266918320dd5a78a48c48a9 +Msg = e920fc1610718f2b0213d301c0092a51f3c6b0107bbbd8243a9689c044e2d142f202d9d195a5faef4be5acadc9ff6f7d2261e58b517139bcb9489b110423c2e59eb181294ffdae8aad0e624fab974c97f9f5e7dc19d678a9cb3429cf05ec509072856f5adfec6e29bafe8e5ba95593e612843e343111d88a1eaff7dc0a2e277f +X = 7b489021578e79e7bd3ee7ab456f659f3dc07c88f5c9a39e4f8cee81 +Y = 1ae10c786ad0902c5c685dae5c7121418a377b888b5f2f2bc76623570fd62bcb190b471ad5359c5f062f8819289e956d8aa6f90d1f8cf1ee72d3a1bdfd56c478dc29a19c4569b5a60e3a8f34f60656eac5b25dde5514a5c67b675423204f6ccaf0990617cc7355b9d3ed868978a252020a769ed59a6edaa6efe3377eef45f3f6f3e64179cc7db8b143fb835c5d71bfcfa1e2a9049bccf7fe9ab57546220fe3f4b7521c861739d138507e81a46a6993605441dcb90d6ee4afbc42cabe90a254444968109d7edd9694a023239f1d56175dd1fac115915e24fab563f4fc3f269bed2f300832d112596485a711417aa73bb4ac72a651a1fa5baed3636c720d397008 +K = 37fadd419fcbd2b073a06ae96b9eceb63e29aee9ac5fa2bdb31ab85d +R = 65102e8f64ecb11f06017b1a0c0def3c29897c277c4a948b1f4da6b9 +S = 21ad0abb27bd3c21166cb96aef70c0dbd5f3079cab0dd543d4125bd1 + +[mod = L=2048, N=224, SHA-256] + +P = a4c7eaab42c4c73b757770916489f17cd50725cd0a4bc4e1cf67f763b8c1de2d6dab9856baafb008f365b18a42e14dc51f350b88eca0209c5aa4fd71a7a96c765f5901c21e720570d7837bec7c76d2e49344731ca39405d0a879b9e0dcd1a8125fd130ec1e783e654b94e3002e6b629e904ab3877867720cbd54b4270a9e15cd028c7cc796f06c272a660951928fdbeb2dca061b41e932257305742ff16e2f429191d5e5f1a6ddf6e78c5d7722cff80a9c0bd5c8d7aeba8c04438992b075e307c1534c49ad380f477f5f7987dc172c161dca38dcaf3fb3846c72c9119a5299adc748951b3dce0d00d4a9013800b2008203b72465bc6a84ae059a30c4522dea57 +Q = ce89fe332b8e4eb3d1e8ddcea5d163a5bc13b63f16993755427aef43 +G = 8c465edf5a180730291e080dfc5385397a5006450dba2efe0129264fbd897bb5579ca0eab19aa278220424724b4f2a6f6ee6328432abf661380646097233505339c5519d357d7112b6eec938b85d5aa75cc2e38092f0a530acb54e50fe82c4d562fb0f3036b80b30334023ebbe6637a0010b00c7db86371168563671e1e0f028aedbd45d2d572621a609982a073e51aae27707afbeef29e2ecee84d7a6d5da382be3a35f42b6c66849202ab19d025b869d08776476d1ab981475ad2ad2f3e6fd07e30696d90a626816df60d6ca7afd7b482f942f83b45cc82933731f87faee320900f2aa3e70b1867e1430e40be67c07f9290299ef067b8b24a7515b3f992c07 +Msg = cec8d2843dee7cb5f9119b75562585e05c5ce2f4e6457e9bcc3c1c781ccd2c0442b6282aea610f7161dcede176e774861f7d2691be6c894ac3ebf80c0fab21e52a3e63ae0b35025762ccd6c9e1fecc7f9fe00aa55c0c3ae33ae88f66187f9598eba9f863171f3f56484625bf39d883427349b8671d9bb7d396180694e5b546ae +X = 551595eccbb003b0bf8ddda184a59da51e459a0d28205e5592ca4cb1 +Y = 748a40237211a2d9852596e7a891f43d4eb0ee48826c9cfb336bbb68dbe5a5e16b2e1271d4d13de03644bb85ef6be523a4d4d88415bcd596ba8e0a3c4f6439e981ed013d7d9c70336febf7d420cfed02c267457bb3f3e7c82145d2af54830b942ec74a5d503e4226cd25dd75decd3f50f0a858155d7be799410836ddc559ce99e1ae513808fdaeac34843dd7258f16f67f19205f6f139251a4186da8496d5e90d3fecf8ed10be6c25ff5eb33d960c9a8f4c581c8c724ca43b761e9fdb5af66bffb9d2ebb11a6b504a1fbe4f834ecb6ac254cab513e943b9a953a7084b3305c661bfad434f6a835503c9ade7f4a57f5c965ec301ecde938ee31b4deb038af97b3 +K = 6f326546aa174b3d319ef7331ec8dfd363dd78ae583a920165ff7e54 +R = 9c5fa46879ddaf5c14f07dfb5320715f67a6fec179e3ad53342fb6d1 +S = c3e17e7b3c4d0ac8d49f4dd0f04c16a094f42da0afcc6c90f5f1bbc8 + +[mod = L=2048, N=224, SHA-384] + +P = a6bb5333ce343c31c9b2c878ab91eef2fdea35c6db0e716762bfc0d436d87506e865a4d2c8cfbbd626ce8bfe64563ca5686cd8cf081490f02445b289087982495fb69976b10242d6d50fc23b4dbdb0bef78305d9a4d05d9eae65d87a893eaf397e04e39baa85a26c8ffbdef1233287b5f5b6ef6a90f27a69481a932ee47b18d5d27eb107ffb05025e646e8876b5cb567fec1dd35835d42082198531fafbe5ae280c575a1fb0e62e9b3ca37e197ad96d9dde1f33f2cec7d27deae261c83ee8e2002af7eb6e82f6a14796af037577a1032bbc709129caabd8addf870ae2d0595c8fdb37155748f0dea34b44d4f82ed58c2f5b1b8481662ac53473c693410082fbd +Q = 8c3ee5bd9a2aaf068bd5845bd55ecf27417055307577bbc3770ec68b +G = 43b5a6b6d0bb962ec9766a377c32cc4124f1311188c2ecf95c0cd4a4fa097225b7618cb1276c474578d3bf564c145199c092a1b14baa929c2f3f0f36e0c2dae91eba08be30992a889f2952e0442c37af484a4ecdc3243ccfcb9e3413cf5cdd6630b09fe17efbfde14d8725493019b7b73d1f782b48ef30bec36e00e02ba336d2254fc202a69612cd9446f91d76b739ffa6d8b86052f8dc5f1145801c56241af5ba9037241bd89e6338b58e01310671c268eb5e33acb57d1f99f16440a675827d4017754d601a17ada2fbedf904554a90b01530da8c93cd14ce293cb2bd3e7937e934b79e310fe4d80c13f92f63381355bd80a1abee1a73fdfb6da24ef28002a3 +Msg = df5d564db83592c1128be5d29b7036880d55e834a291a745ed8dcd438c4da6b1b9f39412b2c5110730db83c1ccdfe9059dd96ec7ea2bbcb34e3eba72ef0a1d4721c7c0221e29279f014d63facc5bc8f18c539b92ff2af89e568225d6b4cf599cb3dff5e3c6ddfac0a27f10f636ec220abb72630bae9a39c18fd3663e4651ccac +X = 4efa5136eb6aa74e92bbfc913b0bfebb613db7a47221fb7b64f42e6f +Y = 647979b7960ce7b971ff0e5f6435f42a41b18c9de09a301114a013a7cd01183f176f88838379dcb4efb67daea79def3f042cbcf9cc503b4c2151a2364f7c9437b19643e67e24a36bac4a4cfa293deedf8ec6b154a32aa72985f7d8de235334b546c29def458c55d0c5c0ac5d74e2024ec7d4abc2fda516a2a0b1a4d886ad92c204707828a4fc7794f60ee8a4be1101c9e5518f7e19eebd475f2de6f6ba89c28bd129f13993befe5818440319a79549833196342a31dbaf7d79497dec65ee7dbef70e58f99d0595f6a711409ade3151d45563d53c1cd0a8ab1a18beff6502cbb0c069b114ea7be77898d0f4e549991ba0b368971b1072ece4afc380e9ae329a50 +K = 7e0f1ce21d185ae65c0a00395567ea9cf217462b58b9c89c4e5ff9cf +R = 5ab43ede66a15688146d1f4cd7164702c0c4457bd4fddebac0482953 +S = 6c58e8ab27d28512c46063c96bf5bceb8fbad232d8f5b39c4755d0b1 + +[mod = L=2048, N=224, SHA-512] + +P = bfebd000b2d6cd4ab38efba35df334df721d6c2f2b3d956679cbad009f3dfbd002952cc899cc2356ec8769bd3d1ba5a73023729888da92ca48a5ee94c97f4f04a2e3acb4f33a2f0fb3783c31f2c70fa7c70f38214a27dadec8b12e67996a9e85ee3bb148803130147392dc5253c04d7063535e6cd646bfb186984e08b58b74a7be5b333bf32b0abfd5665360e9a923a0c528ff1c62c7253458f5678528719d436e50148741f45dc7dd2c6cac71c55231f12a83fefd2ed0a33ede1b8a51f566fcf7890682cdc1931dc207c92bf2ef4e28ab31661eeb77f1601eea941c9591f038d3f00d912857db05e64b2ad569320061c6f863ff3354d842e7e7ea715afef8d1 +Q = aa986df8a064278e9363316a9830bcfa490656faa6d5daa817d87949 +G = 8195ad9a478fd985216ee58368366d2edd13c12b3d62239169fa042d91156408b483122f44ed6236b8308a6cdb52f9af3de88ec89e039afad7da3aa66c1976049a8e0a7d18d567baf99fcefe315cada01548386b10b25e52f52ed78eb4d28082e5e1ffee9480c4fe2cc4aafd1efc9d4fd2cc6d155968931271ef15b3240e7fb043a80c8f628befe09d645077c1029d21e0ac8bf0ba9c27714d1b580ede594aa01b3b76f6e745fc1ec07db37e2fd7e98c6c8c6915228e422c309de9f5db168f50249d1be1ed3298090808e2ebb896bb79b8c4cbf94d4c2064e37e612ba4449d7ac210edde211416d64b051dd8046ab041732665411a7f154d31b3e11a51da7fc0 +Msg = e9f59c6a5cbe8f5b0cf75008d06a076a6739bdddb39b82143cd03939aa4738a287c2a6f31829bbe15f02cc2ee7d7122dbd132825970daddd8a4d851da86e7edc8940cb1188319218b8e0248a103eae34bc68d85f5a32830d7e5dc7718f74db5e4224c0debe1e841e1eea1a88fee0f85d9fb087cbcee55f86037a646e38346d2b +X = 6a5b4ffc44238d1852fb9b74e4c1661be85984043cfeee023f57cac6 +Y = af6721bf75dec6a1b76ad35ca3750def31117c5b441c15a306835a1db74c003b86ae9099ebfb745b0aa9cb000cf43fb021513b8f197bc865b22bf949b491809ad752ffc1ca8e54bea16dc7f539e4c55fb70a7743dd28f262f60ef0f2fcaac29e8021a7938c18ffe03075d0b7e0a2b4dcabe46ed1953d33e37f113af519ab0bf0b6186c12b5f6488437f5193096e2fd6a6a1835604794c66b42ae5265c1cf1cb53ae84997975e0318a93ce41e3902e4ef54de3c56555bd19491acd53f3e57464e1f460389dbc5fa80648fa5a5a0f2956e9ec3b8dc441b535c641c362eed770da828649bfd146472b0f46a4c064e459f88bff90dede7ec56177a9a71d167948712 +K = 9ced89ea5050982222830efef26e7394f5ab7d837d4549962d285fae +R = 9da9966500de9d3b6b7f441ca550233fc450944bc507e01cd4acb030 +S = 2d72f1f6681e867f7d8beaebeba4bc5b23287604a64cfee1c164595a + +[mod = L=2048, N=256, SHA-1] + +P = c1a59d215573949e0b20a974c2edf2e3137ff2463062f75f1d13df12aba1076bb2d013402b60af6c187fb0fa362167c976c2617c726f9077f09e18c11b60f65008825bd6c02a1f57d3eb0ad41cd547de43d87f2525f971d42b306506e7ca03be63b35f4ada172d0a06924440a14250d7822ac2d5aeafed4619e79d4158a7d5eb2d9f023db181a8f094b2c6cb87cb8535416ac19813f07144660c557745f44a01c6b1029092c129b0d27183e82c5a21a80177ee7476eb95c466fb472bd3d2dc286ce25847e93cbfa9ad39cc57035d0c7b64b926a9c7f5a7b2bc5abcbfbdc0b0e3fede3c1e02c44afc8aefc7957da07a0e5fd12339db8667616f62286df80d58ab +Q = 8000000000000000000000001bd62c65e8b87c89797f8f0cbfa55e4a6810e2c7 +G = aea5878740f1424d3c6ea9c6b4799615d2749298a17e26207f76cef340ddd390e1b1ad6b6c0010ad015a103342ddd452cac024b36e42d9b8ed52fafae7a1d3ce9e4b21f910d1356eb163a3e5a8184c781bf14492afa2e4b0a56d8884fd01a628b9662739c42e5c5795ade2f5f27e6de1d963917ce8806fc40d021cd87aa3aa3a9e4f0c2c4c45d2959b2578b2fb1a2229c37e181059b9d5e7b7862fa82e2377a49ed0f9dca820a5814079dd6610714efaf8b0cc683d8e72e4c884e6f9d4946b3e8d4cbb92adbbe7d4c47cc30be7f8c37ca81883a1aac6860059ff4640a29ccae73de20b12e63b00a88b2ee9ba94b75eb40a656e15d9ec83731c85d0effcb9ef9f +Msg = de3605dbefde353cbe05e0d6098647b6d041460dfd4c000312be1afe7551fd3b93fed76a9763c34e004564b8f7dcacbd99e85030632c94e9b0a032046523b7aacdf934a2dbbdcfceefe66b4e3d1cb29e994ff3a4648a8edd9d58ed71f12399d90624789c4e0eebb0fbd5080f7d730f875a1f290749334cb405e9fd2ae1b4ed65 +X = 5a42e77248358f06ae980a2c64f6a22bea2bf7b4fc0015745053c432b7132a67 +Y = 880e17c4ae8141750609d8251c0bbd7acf6d0b460ed3688e9a5f990e6c4b5b00875da750e0228a04102a35f57e74b8d2f9b6950f0d1db8d302c5c90a5b8786a82c68ff5b17a57a758496c5f8053e4484a253d9942204d9a1109f4bd2a3ec311a60cf69c685b586d986f565d33dbf5aab7091e31aa4102c4f4b53fbf872d700156465b6c075e7f778471a23502dc0fee41b271c837a1c26691699f3550d060a331099f64837cddec69caebf51bf4ec9f36f2a220fe773cb4d3c02d0446ddd46133532ef1c3c69d432e303502bd05a75279a7809a742ac4a7872b07f1908654049419350e37a95f2ef33361d8d8736d4083dc14c0bb972e14d4c7b97f3ddfccaef +K = 2cb9c1d617e127a4770d0a946fb947c5100ed0ca59454ea80479f6885ec10534 +R = 363e01c564f380a27d7d23b207af3f961d48fc0995487f60052775d724ab3d10 +S = 4916d91b2927294e429d537c06dd2463d1845018cca2873e90a6c837b445fdde + +[mod = L=2048, N=256, SHA-224] + +P = d02276ebf3c22ffd666983183a47ae94c9bccbcbf95ddcb491d1f7ce643549199992d37c79e7b032d26ed031b6ba4489f3125826fafb2726a98333ebd9abdde592d8693d9859536d9cc3841a1d24e044d35aced6136256fc6d6b615cf4f4163aa381eb2b4c480825a8eccc56d8ddcf5fe637e38ad9b2974bd2cf68bf271e0d067d2465a8b6b660524f0082598945ada58ea649b9804eb4753408c2c59768c46abb82e3295f3d9ca469f84cc187f572dc4b5a3b39346ec839dfad6f07d6d1f0e215209bb0ecc05c767cf2e7943ac9cfb02eee1e9ef5946e8ce88316b5e15fdcf95a132ef2e4bb0817136528cfa5dd96532f9c3abe5c421620edb6bcbd52234ca9 +Q = 8000000012997e8285e4089708f528070c6d7af8a0bd01409e7a079cdb6fc5bb +G = 778453049ef262147fed7b59b0ee6764607c51e7b5b5fc6fea7a7a7b1dd6bb283f4a9ae98efd3964b1556758cb15b2a53af8619e74d85898bec77d3b3f382494ae5961a13ffc745da386182291519800f99dd710e00aeb15adee088e2798ee2e46f598526cf0f4667055d1ba009750041dc5cdd2725ff1d97dd340c8518af7671b87d39d67aeced84b66f84e0701efc82a5c9ef954ee576d24c385b14d63037f0d866fd424b4975bdd5485ed740cb932e843f906683f7c7b2c74775d901c361b847b519c0da699638da40bd736b783d2710b2c2cc26ef91271bf4e2c1929f876e902e2057164223bc78d6a2b9f6c0c7a7cb85922f7d6c4287ae23861f8128848 +Msg = 39f2d8d503aae8cd17854456ecfad49a18900d4375412bc689181ed9c2ccafea98dca689a72dc75e5367d3d3abfc2169700d5891cff70f69d9aca093b061b9f5057f94636bc2783115254344fb12e33b167272e198838a8728e7744ea9a2e8248e34d5906e298302472637b879de91c1a6f9f331a5cf98a5af29132990d27416 +X = 6ba81e6cd4367798aaab8b7af1135183a37c42a766dbd68cd2dce78f2670ef0f +Y = 7bb31e98c7a0437f978a73d5dcfbdfbb09cc2499dfaf1eb5256bccd6358cabb5f67d04a42823463b7e957f2b9213f1fa8e5a98d614484701abb8c7d67641fe6ed06fa4527b493ddab2e74640fde3de70da693f1db2b8e26417040af0eea6cab451a795a52e187d2ee241b93f65c86c6d66f45834cce165ac5eb670d4f0095c23ce9757e3bdc636f991ee0073d90a09202edb35cc3ea1cf9adca1617fa0bffd9c126229a604a1d3bf4931ddf0b9942dfc8a2f8c09fcc97032564a79ae1ebe1e2ce49ff57839e7c43fa60b1603d15a450898aa4e4a1ee8065794126d64f013367096a83686b9f158c33b10f5f3b36cf1f6358b3f34f84b101dc26d3db68bcc95c8 +K = 45030b79a395b1632700cbaffead97998d02bed8e0656876fc0174e4bdb96f79 +R = 059bee9e708b7f20c3f791a640edee964e0aa672893c484799715817b3a8f6d4 +S = 4bd41c84a724cc86e4f0194ec0fbf379e654d0d7f6a1f08bd468139422a5c353 + +[mod = L=2048, N=256, SHA-256] + +P = a8adb6c0b4cf9588012e5deff1a871d383e0e2a85b5e8e03d814fe13a059705e663230a377bf7323a8fa117100200bfd5adf857393b0bbd67906c081e585410e38480ead51684dac3a38f7b64c9eb109f19739a4517cd7d5d6291e8af20a3fbf17336c7bf80ee718ee087e322ee41047dabefbcc34d10b66b644ddb3160a28c0639563d71993a26543eadb7718f317bf5d9577a6156561b082a10029cd44012b18de6844509fe058ba87980792285f2750969fe89c2cd6498db3545638d5379d125dccf64e06c1af33a6190841d223da1513333a7c9d78462abaab31b9f96d5f34445ceb6309f2f6d2c8dde06441e87980d303ef9a1ff007e8be2f0be06cc15f +Q = e71f8567447f42e75f5ef85ca20fe557ab0343d37ed09edc3f6e68604d6b9dfb +G = 5ba24de9607b8998e66ce6c4f812a314c6935842f7ab54cd82b19fa104abfb5d84579a623b2574b37d22ccae9b3e415e48f5c0f9bcbdff8071d63b9bb956e547af3a8df99e5d3061979652ff96b765cb3ee493643544c75dbe5bb39834531952a0fb4b0378b3fcbb4c8b5800a5330392a2a04e700bb6ed7e0b85795ea38b1b962741b3f33b9dde2f4ec1354f09e2eb78e95f037a5804b6171659f88715ce1a9b0cc90c27f35ef2f10ff0c7c7a2bb0154d9b8ebe76a3d764aa879af372f4240de8347937e5a90cec9f41ff2f26b8da9a94a225d1a913717d73f10397d2183f1ba3b7b45a68f1ff1893caf69a827802f7b6a48d51da6fbefb64fd9a6c5b75c4561 +Msg = 4e3a28bcf90d1d2e75f075d9fbe55b36c5529b17bc3a9ccaba6935c9e20548255b3dfae0f91db030c12f2c344b3a29c4151c5b209f5e319fdf1c23b190f64f1fe5b330cb7c8fa952f9d90f13aff1cb11d63181da9efc6f7e15bfed4862d1a62c7dcf3ba8bf1ff304b102b1ec3f1497dddf09712cf323f5610a9d10c3d9132659 +X = 446969025446247f84fdea74d02d7dd13672b2deb7c085be11111441955a377b +Y = 5a55dceddd1134ee5f11ed85deb4d634a3643f5f36dc3a70689256469a0b651ad22880f14ab85719434f9c0e407e60ea420e2a0cd29422c4899c416359dbb1e592456f2b3cce233259c117542fd05f31ea25b015d9121c890b90e0bad033be1368d229985aac7226d1c8c2eab325ef3b2cd59d3b9f7de7dbc94af1a9339eb430ca36c26c46ecfa6c5481711496f624e188ad7540ef5df26f8efacb820bd17a1f618acb50c9bc197d4cb7ccac45d824a3bf795c234b556b06aeb929173453252084003f69fe98045fe74002ba658f93475622f76791d9b2623d1b5fff2cc16844746efd2d30a6a8134bfc4c8cc80a46107901fb973c28fc553130f3286c1489da +K = 117a529e3fdfc79843a5a4c07539036b865214e014b4928c2a31f47bf62a4fdb +R = 633055e055f237c38999d81c397848c38cce80a55b649d9e7905c298e2a51447 +S = 2bbf68317660ec1e4b154915027b0bc00ee19cfc0bf75d01930504f2ce10a8b0 + +[mod = L=2048, N=256, SHA-384] + +P = a6167c16fff74e29342b8586aed3cd896f7b1635a2286ff16fdff41a06317ca6b05ca2ba7c060ad6db1561621ccb0c40b86a03619bfff32e204cbd90b79dcb5f86ebb493e3bd1988d8097fa23fa4d78fb3cddcb00c466423d8fa719873c37645fe4eecc57171bbedfe56fa9474c96385b8ba378c79972d7aaae69a2ba64cde8e5654f0f7b74550cd3447e7a472a33b4037db468dde31c348aa25e82b7fc41b837f7fc226a6103966ecd8f9d14c2d3149556d43829f137451b8d20f8520b0ce8e3d705f74d0a57ea872c2bdee9714e0b63906cddfdc28b6777d19325000f8ed5278ec5d912d102109319cba3b6469d4672909b4f0dbeec0bbb634b551ba0cf213 +Q = 8427529044d214c07574f7b359c2e01c23fd97701b328ac8c1385b81c5373895 +G = 6fc232415c31200cf523af3483f8e26ace808d2f1c6a8b863ab042cc7f6b7144b2d39472c3cb4c7681d0732843503d8f858cbe476e6740324aaa295950105978c335069b919ff9a6ff4b410581b80712fe5d3e04ddb4dfd26d5e7fbca2b0c52d8d404343d57b2f9b2a26daa7ece30ceab9e1789f9751aaa9387049965af32650c6ca5b374a5ae70b3f98e053f51857d6bbb17a670e6eaaf89844d641e1e13d5a1b24d053dc6b8fd101c624786951927e426310aba9498a0042b3dc7bbc59d705f80d9b807de415f7e94c5cf9d789992d3bb8336d1d808cb86b56dde09d934bb527033922de14bf307376ab7d22fbcd616f9eda479ab214a17850bdd0802a871c +Msg = 8c78cffdcf25d8230b835b30512684c9b252115870b603d1b4ba2eb5d35b33f26d96b684126ec34fff67dfe5c8c856acfe3a9ff45ae11d415f30449bcdc3bf9a9fb5a7e48afeaba6d0b0fc9bce0197eb2bf7a840249d4e550c5a25dc1c71370e67933edad2362fae6fad1efba5c08dc1931ca2841b44b78c0c63a1665ffac860 +X = 459eb1588e9f7dd4f286677a7415cb25a1b46e7a7cfadc8a45100383e20da69d +Y = 5ca7151bca0e457bbc46f59f71d81ab16688dc0eb7e4d17b166c3326c5b12c5bdebb3613224d1a754023c50b83cb5ecc139096cef28933b3b12ca31038e4089383597c59cc27b902be5da62cae7da5f4af90e9410ed1604082e2e38e25eb0b78dfac0aeb2ad3b19dc23539d2bcd755db1cc6c9805a7dd109e1c98667a5b9d52b21c2772121b8d0d2b246e5fd3da80728e85bbf0d7067d1c6baa64394a29e7fcbf80842bd4ab02b35d83f59805a104e0bd69d0079a065f59e3e6f21573a00da990b72ea537fa98caaa0a58800a7e7a0623e263d4fca65ebb8eded46efdfe7db92c9ebd38062d8f12534f015b186186ee2361d62c24e4f22b3e95da0f9062ce04d +K = 2368037a1c7647c683d7e301ac79b7feebc736effe3ab1644b68308b4b28620d +R = 4fd8f25c059030027381d4167c3174b6be0088c15f0a573d7ebd05960f5a1eb2 +S = 5f56869cee7bf64fec5d5d6ea15bb1fa1169003a87eccc1621b90a1b892226f2 + +[mod = L=2048, N=256, SHA-512] + +P = f63da3be9a9616196c6556f3ce6fd8b98bdda9137473da46fed970e2b8d147387a81922065d528a7d6433ebc5e35b15c67ea35a5a5bff5b9cef1cd1e6fe31dda52838da3aa89b9b4e8d9d3c0732ccc4f238ce1b416c4ca93f2c6800e5f4ed41c4f7615cec5531b98680b20dc63f73e70d803aacfaece33d45fa0e39d77c8508209528b9046b5917010791234397e412d22bc0b8d67cbd1cd28a32c2460a0bd86aaba0eea80e16e3245643171e34221760c203a56b8207a1009e6c1a2f6cda85f85c4f9e410b9499233c0ee072e465af4fb4fb9282c5c10e8234fd630ea92f0aae6b97a520db34475707b79a4c175265c0356ccbca827e3837df3d6d0576d9079 +Q = 9b7463f8269f0b909abed10991684f36a64ac864e0d6d717c0ef21577a4c3907 +G = 972a75f606e8aa3a91ff08fd131a20f5963251304e3d1431b712fa0803d527fd710fb7eb27e52904971cd43ca977199a24dbeeb4b7bc2ba075d3b72eb6b2c5ad8f0e8b8f48c50b554c7e0711f4c7416330806672498f430292724bf98a8ea48c7f53d7b31d8b7528b1a6f087d2c27c335202835b1e314225b37aef8bfcec7d80920c4a460a3d68344ded75ed9ee867fa2a6945063894f563b68633b8b39f83a1aaaf5a96c7f422687e7c84cf8fb8cc5f4504dff087bcb26a95bbf8583f03b3a0e43a356b2bd7e25cdddf7a015300faecc6793c5ee99b6327cb8456e32d9115339d5a6b712b7f9d0301acb05133e3115e454d3a6dd24a1693c94aab5406504bf7 +Msg = 8ab01510cfa33cfa5bcff003bba39996fa727693abf6ac010bb959b0b59a15306c0c3a1921af2a76717aa55b39fa3723f4c3229ca9acf6b741614bb551cde8a7220ab97d4b453bec1e05a0eaa42e382bbc7b9b84f8237dc8964ee5b66e9b2a4ca61cf675140efef54fb327a665def8d57ab097e8c53c643fcb58209c4215b608 +X = 5f6e545daef6cd1b8d9848dd98758807236ac0b7ff053b32c703eaa3b1147557 +Y = 41197ce2233d7e48c803cd64c78f657923b9e36b871401f8661c21d8ba38c6b9b3239db767b11d1d401e5faecbf7a45860cc5f1a54d60286b7d6e1c99fd5b8c84ed851c5357d41ad60163f224d78c996143fff89dd3a8fe123dae1f621427fd8cce76ed138d68fa248f374ae233249625b93f3dd5937d15e541b7effa4df4fea7d52faced615bfe0348418ff93e69a20a52e55c76cc30f307f84e71e4aabc0825eca3a95b4bd58ebfb0029d23a169e9d80ba7d1c5fd35395e6602e089aa9918f08bae35ae1cac7af33694129e98f0dadadd90eaeb6eed25024390b1a60af794734c397b0f509865b134b2867c115d6f489b6dd7e3c82994b45dce2a23c6bc902 +K = 5fe61afddbdf04449b24295a52a1a037d3f31441a3cec138b7f0102db86ef132 +R = 6a47ea57ceaecc116d7190ff6c6dd9831ab75b4bf6cb291083e4268b486ed245 +S = 017355f698a32abe9a4d4a7dda7c85950cddc348ab8a6751e72fddc01aa5d1f0 + +[mod = L=3072, N=256, SHA-1] + +P = fd5a6c56dd290f7dd84a29de17126eb4e4487b3eff0a44abe5c59792d2e1200b9c3db44d528b9f7d2248032e4ba0f7bfc4fafc706be511db2276c0b7ecffd38da2e1c2f237a75390c1e4d3239cba8e20e55840ecb05df5f01a1b6977ad1906f2cb544ccfb93b901ad0966b1832ad2dab526244a3156c905c01ac51cb73b9dcd9860d56175a425d846485d9b1f44a8a0c2578e6cf61947bc1a1392fdd320b16a9d70455fe436f2d47ded8e8e605f7486eb578ea7fc4ffd13c07f9996af159fd411e9451403278dd1141a8c926b35c96384bbd6bee09c46f44c36b1ffc7197f5e925dbe0544a68e6ab8c18e426a466b392f9c27dd79fefa9ca163cc5a375539a8559f277f657a535d1964c6a5e91683ef5698ebaa01ef818dbf72cb04c3ff092d188866f25cd405108f566b087f73d2d5beb51fac6de84ae5161a66af9602c7e4bfc146f4820bdfc092faeac69133e4a08a5b202a12498a22e57bad54674ed4b510109d52b5f74e70e1f6f82161718cd4cf00cc9f1958acc8bddcdfbd1fbe46cd1 +Q = 800000000000000000000000334a26dd8f49c6811ce81bb1342b06e980f64b75 +G = 99ab030a21a5c9818174872167641c81c1e03c9b274cfbc27bc472542927766de5fa0539b3b73f3f16ac866a9aec8b445ded97fbff08834ed98c77e7fc89e5dc657bef766ff7fbf8e76873e17bee412762d56fe1141760ab4d25bafd4b6ef25b49a3506632d1f8e10770930760ec1325932c5a4baf9e90154264ddf442ec5c41fed95d11525151dbcfb3758149bad81c62b9cff7816b8f953b8b7c022590d1584e921dc955f5328ac72983ed5cf0d04056fe0d531e62f8f6c9ab3c0fcd44e14860b7311d2561c77c1d32f6c69dc8f77968c9d881ad9db5e0c114fda8628bca0335eb7fb9e15e625aabab58fc01194c81bf6fb2ce54077b82250e57c6a7b25deb6ee39d4b686a5c307a7612b2d85ee92512413dea297e44f317be7ceb70a3328af0b401001a418562b8ffe4e9771b4b4a8e0b40c791349d5d4e459fe620a1a2fc72e2f6ca28567d4c2632bbde1b49864c06bb12619f132c1da8f571ef613eac739f66ab3914cb3fa1ab86e05e5082ebaa24ebeea4cf51beefc27df512fe3fee7d +Msg = ca84af5c9adbc0044db00d7acfb1b493aab0388ffbad47b38cd3e9e3111cfe2cda2a45f751c46862f05bdcec4b698adfd2e1606e484c3be4ac0c379d4fbc7c2cda43e922811d7f6c33040e8e65d5f317684b90e26387cf931fe7c2f515058d753b08137ff2c6b79c910de8283149e6872cb66f7e02e66f2371785129569362f1 +X = 433cfd0532ccfd8cdd1b25920d2bb7396987b766240379035b0e86527ce9c52d +Y = e7c2ee18c3aa362c0182c6a56c2584628083c73e045beda8d653690c9c2f6544edf9702c57c455273905336a5f5171107a313cd7d0b0f50f8d3342c60219f22a9023394059d05f464c4496d55dab6eb0898527ff4cf5678e7b5bfb5e18d92c4a9d73288cce14530fc4702f6d0397ec39a880c4a72d358730c56633386ede028023c1791f3164d1574e7823c79b8a3ca1343ea166ba6f02b7ff7e9ef2198db107f7cc159f3b6a1c00a78c355c566deb0ac6fde3f633cb9177a1fbc6c1766ca021d5fec470101abb440d2f06982181a8c92b7cdd765336b9a1e1ab70283d6db0a963fb648c37c4e29a74c37577291049ab47cdbc104c04db966681ea8ebb9f00cf4c4a5462117379575fbda4b801979451fa94b19b4e93656705c0f734f3e0914bb96c1e2b8a0fb68faf14296efdf3300ad95bcde8b67cc4b26e6488eef925cfaeac6f0d6567e8b41355f89d1c2b8fe687bfa2df5e287e1305b89b8c388c26196090ac0351abc561aadc797da8ccea4146c3e96095ebce353e0da4c55019052caa +K = 40f503abd70fd49a76c67a83e08b062b3fd465ad92be433c080e5f295bb9f559 +R = 21ca148cdf44be4ae93b2f353b8e512d03ad96dafa80623fde4922a95f032732 +S = 73e48b77a3aa44307483c2dd895cb51db2112177c185c59cb1dcff32fda02a4f + +[mod = L=3072, N=256, SHA-224] + +P = f63b3cdd646d8e7ddb57216aa6eec2134d707488a1f29cfa9970645f1227ea5db2e318eea5da1687c7ed90509669345ed6134cff32203ab72aecbfa693d216aeb55d8d28a981f4abff07d1319a799be5dd746f84842817929c305b408598af12045daa2f1ccc8be4d81b513c630f017fec1658aca108a1af6120ec05e3018c4253c9dd35bce062b73d0f2a93d41c481a5c43bb97909682d39a9a60dc3c35e36375dec6ced0d2db3ba0d111bedea701a0e4753624977a9e75b70a74e2b81e38a52ab22da131b35416d3cec9663079746a763476e57598142e39861545daaf8d38a176f26c71f5afebd9c5620da80cf3452b55c37c661b4a1ec0351710b9de4a3cbe0b98b4d9ec89128d97aa7efb19db8ba43cc0be25c200f90e1506cb78ec0c336d7a95613d4204e8ed68d0f0a6c78420105a8d2d438fbd2551a64a1a0b03ffb878742f8c9979cfa87394150281998d51701d5fcfa9696a4989fd25f400955e626b1abe926c0afa69aa6981900effcdd030592f82b2042a47a9a5a8cb0283dc4d +Q = 80000000ba4634b5fa4da054bd0ca48ae490e57711f381193842429159ba7ca1 +G = 8ad4553c4e49aa24728ab5024417b132d2ca53a55d959458f2f759adb0435beeefa3a2cfcd0038e2420643fc4a4deeb5d9feaa1edf21193b40e14b42982a94f35c58b81147d7189d263c9b12fe63ab9fa5f6f03a2860c186432e3ab04f2ab0f2fb6147bd9bf7ed5d20713b9da21383e2c3a168e7d09d3d8a5a058fd23095b5acfeb864a3306be2425fa1ad32ad6d9382e603b03c68af4af0246397102c4155cba811abf99da7839e77b2eac9970588ca1d0a2361723a164ac9229c2e80dcfa8db4f9e29803effb3168c7fed7a3a6de40dda19a0536af9b5b7afaefb9c70d6ae8df12da658f6236043aea873db29ceb6f07d108f5225687bd0c30e3084e2090b45ae2f92a97b8ecb7a9705c4956b8b31c4a3d61107c84e47adda6c80d5d22dab3d859220f9d5aab13677ae3df168f0c176d176b54506c639853f04ddef2722f39c18e5ce426e14562ad8ff26247af88870efb72c0cce836de8fee67a662378245b502bf1f83099988a093ce7cdc81364c78b1f4a51b800df6137c71d65e6b089a +Msg = 957973fc3f3fe3f559065be5d4a0c281cf17959018b9a670d2b3706d41d5812e37301005f8b70ebd2fba3c40a3f377a751b6cb9693e3cb00d92888247d07921d3c1e9257ce08733b8926e0df7bdb6e855f1f851075d4e628d110d42b643b54876e5faa3611477ee68371562555269ed62a9271bad50cc4d46038de2dd41920c2 +X = 524a7ea5977f8102b3552930477f5f042401165d4637dcd8b9d13df4f3aae5d0 +Y = 42243539e49db9ea19d98d97f6f2a94b23529812df889eaabcfeda01ce4c759487fb89bc82da75fe1c9134361f86de47d16d8eee80e56ac502178e8ed8129477af8bfbd8262c5edd937e1a86c0f0e7b2afe7bcbddfcb5814ced0b756a76ca178423bb4d578c5da183712d968582640aa0ec7e9fb56bfd960d7a57549747d8fb7ade47cfe816c1e57da6633dacc537de060813964bb5b2757a312f9da3d84e60aff98170051d3d90e380b8bcc1986c58ff9dc91e8827d4f9f5fc4b2b2e743cf9389ff02dec01f5d434b430d162e891c3355f91855339f8df58300e4c993ae4df8c4318b5c4bd05283ca4b46b7d2fb0f6476bf15907f50dd4141aa7acac9daa62eccd3a67357122060b6cece0446a93eb230ad93bc9a4d1b1efeeca1e3fc83c119785035b439509ffb7968b1a448b7bd8315753fdf04a256eca1562a11b096c90a36b353659cbde4420e17e90b94c43c7519c60641ceec056f897b97d6bb1861268e0dc79b7c3b6b7639c255bf06865737459126cb465bc1da4a043a1963da7d63 +K = 29e4d7790e181b4767903fe0eb37757f33f13337c33588c1fdbfba0e655ab621 +R = 2e59d5f30f73781d38255b70dedeeb38ae78df4f002c1f747c08deadc6530155 +S = 615c55b2df0ca28c60a6b385c58fa036df8c4b2f4f1935730bf8f4f0bed13610 + +[mod = L=3072, N=256, SHA-256] + +P = c7b86d7044218e367453d210e76433e4e27a983db1c560bb9755a8fb7d819912c56cfe002ab1ff3f72165b943c0b28ed46039a07de507d7a29f738603decd1270380a41f971f2592661a64ba2f351d9a69e51a888a05156b7fe1563c4b77ee93a44949138438a2ab8bdcfc49b4e78d1cde766e54984760057d76cd740c94a4dd25a46aa77b18e9d707d6738497d4eac364f4792d9766a16a0e234807e96b8c64d404bbdb876e39b5799ef53fe6cb9bab62ef19fdcc2bdd905beda13b9ef7ac35f1f557cb0dc458c019e2bc19a9f5dfc1e4eca9e6d466564124304a31f038605a3e342da01be1c2b545610edd2c1397a3c8396588c6329efeb4e165af5b368a39a88e4888e39f40bb3de4eb1416672f999fead37aef1ca9643ff32cdbc0fcebe628d7e46d281a989d43dd21432151af68be3f6d56acfbdb6c97d87fcb5e6291bf8b4ee1275ae0eb4383cc753903c8d29f4adb6a547e405decdff288c5f6c7aa30dcb12f84d392493a70933317c0f5e6552601fae18f17e6e5bb6bf396d32d8ab9 +Q = 876fa09e1dc62b236ce1c3155ba48b0ccfda29f3ac5a97f7ffa1bd87b68d2a4b +G = 110afebb12c7f862b6de03d47fdbc3326e0d4d31b12a8ca95b2dee2123bcc667d4f72c1e7209767d2721f95fbd9a4d03236d54174fbfaff2c4ff7deae4738b20d9f37bf0a1134c288b420af0b5792e47a92513c0413f346a4edbab2c45bdca13f5341c2b55b8ba54932b9217b5a859e553f14bb8c120fbb9d99909dff5ea68e14b379964fd3f3861e5ba5cc970c4a180eef54428703961021e7bd68cb637927b8cbee6805fa27285bfee4d1ef70e02c1a18a7cd78bef1dd9cdad45dde9cd690755050fc4662937ee1d6f4db12807ccc95bc435f11b71e7086048b1dab5913c6055012de82e43a4e50cf93feff5dcab814abc224c5e0025bd868c3fc592041bba04747c10af513fc36e4d91c63ee5253422cf4063398d77c52fcb011427cbfcfa67b1b2c2d1aa4a3da72645cb1c767036054e2f31f88665a54461c885fb3219d5ad8748a01158f6c7c0df5a8c908ba8c3e536822428886c7b500bbc15b49df746b9de5a78fe3b4f6991d0110c3cbff458039dc36261cf46af4bc2515368f4abb7 +Msg = cb06e02234263c22b80e832d6dc5a1bee5ea8af3bc2da752441c04027f176158bfe68372bd67f84d489c0d49b07d4025962976be60437be1a2d01d3be0992afa5abe0980e26a9da4ae72f827b423665195cc4eed6fe85c335b32d9c03c945a86e7fa99373f0a30c6eca938b3afb6dff67adb8bece6f8cfec4b6a12ea281e2323 +X = 3470832055dade94e14cd8777171d18e5d06f66aeff4c61471e4eba74ee56164 +Y = 456a105c713566234838bc070b8a751a0b57767cb75e99114a1a46641e11da1fa9f22914d808ad7148612c1ea55d25301781e9ae0c9ae36a69d87ba039ec7cd864c3ad094873e6e56709fd10d966853d611b1cff15d37fdee424506c184d62c7033358be78c2250943b6f6d043d63b317de56e5ad8d1fd97dd355abe96452f8e435485fb3b907b51900aa3f24418df50b4fcdafbf6137548c39373b8bc4ba3dabb4746ebd17b87fcd6a2f197c107b18ec5b465e6e4cb430d9c0ce78da5988441054a370792b730da9aba41a3169af26176f74e6f7c0c9c9b55b62bbe7ce38d4695d48157e660c2acb63f482f55418150e5fee43ace84c540c3ba7662ae80835c1a2d51890ea96ba206427c41ef8c38aa07d2a365e7e58380d8f4782e22ac2101af732ee22758337b253637838e16f50f56d313d07981880d685557f7d79a6db823c61f1bb3dbc5d50421a4843a6f29690e78aa0f0cff304231818b81fc4a243fc00f09a54c466d6a8c73d32a55e1abd5ec8b4e1afa32a79b01df85a81f3f5cfe +K = 3d7c068a3978b2d8fe9034bcad65ad7c300c4440e4085de280e577eea72c1207 +R = 53bae6c6f336e2eb311c1e92d95fc449a929444ef81ec4279660b200d59433de +S = 49f3a74e953e77a7941af3aefeef4ed499be209976a0edb3fa5e7cb961b0c112 + +[mod = L=3072, N=256, SHA-384] + +P = a410d23ed9ad9964d3e401cb9317a25213f75712acbc5c12191abf3f1c0e723e2333b49eb1f95b0f9748d952f04a5ae358859d384403ce364aa3f58dd9769909b45048548c55872a6afbb3b15c54882f96c20df1b2df164f0bac849ca17ad2df63abd75c881922e79a5009f00b7d631622e90e7fa4e980618575e1d6bd1a72d5b6a50f4f6a68b793937c4af95fc11541759a1736577d9448b87792dff07232415512e933755e12250d466e9cc8df150727d747e51fea7964158326b1365d580cb190f4518291598221fdf36c6305c8b8a8ed05663dd7b006e945f592abbecae460f77c71b6ec649d3fd5394202ed7bbbd040f7b8fd57cb06a99be254fa25d71a3760734046c2a0db383e02397913ae67ce65870d9f6c6f67a9d00497be1d763b21937cf9cbf9a24ef97bbcaa07916f8894e5b7fb03258821ac46140965b23c5409ca49026efb2bf95bce025c4183a5f659bf6aaeef56d7933bb29697d7d541348c871fa01f869678b2e34506f6dc0a4c132b689a0ed27dc3c8d53702aa584877 +Q = abc67417725cf28fc7640d5de43825f416ebfa80e191c42ee886303338f56045 +G = 867d5fb72f5936d1a14ed3b60499662f3124686ef108c5b3da6663a0e86197ec2cc4c9460193a74ff16028ac9441b0c7d27c2272d483ac7cd794d598416c4ff9099a61679d417d478ce5dd974bf349a14575afe74a88b12dd5f6d1cbd3f91ddd597ed68e79eba402613130c224b94ac28714a1f1c552475a5d29cfcdd8e08a6b1d65661e28ef313514d1408f5abd3e06ebe3a7d814d1ede316bf495273ca1d574f42b482eea30db53466f454b51a175a0b89b3c05dda006e719a2e6371669080d768cc038cdfb8098e9aad9b8d83d4b759f43ac9d22b353ed88a33723550150de0361b7a376f37b45d437f71cb711f2847de671ad1059516a1d45755224a15d37b4aeada3f58c69a136daef0636fe38e3752064afe598433e80089fda24b144a462734bef8f77638845b00e59ce7fa4f1daf487a2cada11eaba72bb23e1df6b66a183edd226c440272dd9b06bec0e57f1a0822d2e00212064b6dba64562085f5a75929afa5fe509e0b78e630aaf12f91e4980c9b0d6f7e059a2ea3e23479d930 +Msg = ed9a64d3109ef8a9292956b946873ca4bd887ce624b81be81b82c69c67aaddf5655f70fe4768114db2834c71787f858e5165da1a7fa961d855ad7e5bc4b7be31b97dbe770798ef7966152b14b86ae35625a28aee5663b9ef3067cbdfbabd87197e5c842d3092eb88dca57c6c8ad4c00a19ddf2e1967b59bd06ccaef933bc28e7 +X = 6d4c934391b7f6fb6e19e3141f8c0018ef5726118a11064358c7d35b37737377 +Y = 1f0a5c75e7985d6e70e4fbfda51a10b925f6accb600d7c6510db90ec367b93bb069bd286e8f979b22ef0702f717a8755c18309c87dae3fe82cc3dc8f4b7aa3d5f3876f4d4b3eb68bfe910c43076d6cd0d39fc88dde78f09480db55234e6c8ca59fe2700efec04feee6b4e8ee2413721858be7190dbe905f456edcab55b2dc2916dc1e8731988d9ef8b619abcf8955aa960ef02b3f02a8dc649369222af50f1338ed28d667f3f10cae2a3c28a3c1d08df639c81ada13c8fd198c6dae3d62a3fe9f04c985c65f610c06cb8faea68edb80de6cf07a8e89c00218185a952b23572e34df07ce5b4261e5de427eb503ee1baf5992db6d438b47434c40c22657bc163e7953fa33eff39dc2734607039aadd6ac27e4367131041f845ffa1a13f556bfba2307a5c78f2ccf11298c762e08871968e48dc3d1569d09965cd09da43cf0309a16af1e20fee7da3dc21b364c4615cd5123fa5f9b23cfc4ffd9cfdcea670623840b062d4648d2eba786ad3f7ae337a4284324ace236f9f7174fbf442b99043002f +K = 40b5cc685c3d1f59072228af9551683b5b8c8ff65240114ad2dacfccf3928057 +R = 7695698a14755db4206e850b4f5f19c540b07d07e08aac591e20081646e6eedc +S = 3dae01154ecff7b19007a953f185f0663ef7f2537f0b15e04fb343c961f36de2 + +[mod = L=3072, N=256, SHA-512] + +P = c1d0a6d0b5ed615dee76ac5a60dd35ecb000a202063018b1ba0a06fe7a00f765db1c59a680cecfe3ad41475badb5ad50b6147e2596b88d34656052aca79486ea6f6ec90b23e363f3ab8cdc8b93b62a070e02688ea877843a4685c2ba6db111e9addbd7ca4bce65bb10c9ceb69bf806e2ebd7e54edeb7f996a65c907b50efdf8e575bae462a219c302fef2ae81d73cee75274625b5fc29c6d60c057ed9e7b0d46ad2f57fe01f823230f31422722319ce0abf1f141f326c00fbc2be4cdb8944b6fd050bd300bdb1c5f4da72537e553e01d51239c4d461860f1fb4fd8fa79f5d5263ff62fed7008e2e0a2d36bf7b9062d0d75db226c3464b67ba24101b085f2c670c0f87ae530d98ee60c5472f4aa15fb25041e19106354da06bc2b1d322d40ed97b21fd1cdad3025c69da6ce9c7ddf3dcf1ea4d56577bfdec23071c1f05ee4077b5391e9a404eaffe12d1ea62d06acd6bf19e91a158d2066b4cd20e4c4e52ffb1d5204cd022bc7108f2c799fb468866ef1cb09bce09dfd49e4740ff8140497be61 +Q = bf65441c987b7737385eadec158dd01614da6f15386248e59f3cddbefc8e9dd1 +G = c02ac85375fab80ba2a784b94e4d145b3be0f92090eba17bd12358cf3e03f4379584f8742252f76b1ede3fc37281420e74a963e4c088796ff2bab8db6e9a4530fc67d51f88b905ab43995aab46364cb40c1256f0466f3dbce36203ef228b35e90247e95e5115e831b126b628ee984f349911d30ffb9d613b50a84dfa1f042ba536b82d5101e711c629f9f2096dc834deec63b70f2a2315a6d27323b995aa20d3d0737075186f5049af6f512a0c38a9da06817f4b619b94520edfac85c4a6e2e186225c95a04ec3c3422b8deb284e98d24b31465802008a097c25969e826c2baa59d2cba33d6c1d9f3962330c1fcda7cfb18508fea7d0555e3a169daed353f3ee6f4bb30244319161dff6438a37ca793b24bbb1b1bc2194fc6e6ef60278157899cb03c5dd6fc91a836eb20a25c09945643d95f7bd50d206684d6ffc14d16d82d5f781225bff908392a5793b803f9b70b4dfcb394f9ed81c18e391a09eb3f93a032d81ba670cabfd6f64aa5e3374cb7c2029f45200e4f0bfd820c8bd58dc5eeb34 +Msg = 494180eed0951371bbaf0a850ef13679df49c1f13fe3770b6c13285bf3ad93dc4ab018aab9139d74200808e9c55bf88300324cc697efeaa641d37f3acf72d8c97bff0182a35b940150c98a03ef41a3e1487440c923a988e53ca3ce883a2fb532bb7441c122f1dc2f9d0b0bc07f26ba29a35cdf0da846a9d8eab405cbf8c8e77f +X = 150b5c51ea6402276bc912322f0404f6d57ff7d32afcaa83b6dfde11abb48181 +Y = 6da54f2b0ddb4dcce2da1edfa16ba84953d8429ce60cd111a5c65edcf7ba5b8d9387ab6881c24880b2afbdb437e9ed7ffb8e96beca7ea80d1d90f24d546112629df5c9e9661742cc872fdb3d409bc77b75b17c7e6cfff86261071c4b5c9f9898be1e9e27349b933c34fb345685f8fc6c12470d124cecf51b5d5adbf5e7a2490f8d67aac53a82ed6a2110686cf631c348bcbc4cf156f3a6980163e2feca72a45f6b3d68c10e5a2283b470b7292674490383f75fa26ccf93c0e1c8d0628ca35f2f3d9b6876505d118988957237a2fc8051cb47b410e8b7a619e73b1350a9f6a260c5f16841e7c4db53d8eaa0b4708d62f95b2a72e2f04ca14647bca6b5e3ee707fcdf758b925eb8d4e6ace4fc7443c9bc5819ff9e555be098aa055066828e21b818fedc3aac517a0ee8f9060bd86e0d4cce212ab6a3a243c5ec0274563353ca7103af085e8f41be524fbb75cda88903907df94bfd69373e288949bd0626d85c1398b3073a139d5c747d24afdae7a3e745437335d0ee993eef36a3041c912f7eb58 +K = b599111b9f78402cefe7bde8bf553b6ca00d5abaf9a158aa42f2607bf78510bc +R = a40a6c905654c55fc58e99c7d1a3feea2c5be64823d4086ce811f334cfdc448d +S = 6478050977ec585980454e0a2f26a03037b921ca588a78a4daff7e84d49a8a6c + diff --git a/security/nss/cmd/bltest/tests/dsa/key0 b/security/nss/cmd/bltest/tests/dsa/key0 new file mode 100644 index 0000000000..e582eeb044 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key0 @@ -0,0 +1,6 @@ +AAAAQI3ypJRJInaqPSV1m7BoacvqwNg6+40M98u4Mk8NeILl0HYvxbchDq/C6a2s +Mqt6rElpPfv4NyTC7Ac27jHIApEAAAAUx3MhjHN+yO6ZO08t7TD0jtrOkV8AAABA +Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc +xC6fb0ZLCIzFcq9T5teIAgAAAEAZExhx11sWEqgZ8p140bDXNG96p3u2KoWb/WxW +ddqdIS06Nu8Wcu9mC4x8JVzA7HSFj7oz9EwGaZYwp2sDDuMzAAAAFCBwsyI9ujcv +3hwP/HsuO0mLJgYU diff --git a/security/nss/cmd/bltest/tests/dsa/key1 b/security/nss/cmd/bltest/tests/dsa/key1 new file mode 100644 index 0000000000..8ba3118ddf --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key1 @@ -0,0 +1,10 @@ +AAAAgKj5zSAeXjXYkvhfgOTbJZmlZ2o7HU8ZAzDtMlaybQ6AoOSaj/+qrSok9HLS +VzJB1NbWx0gMgLTGe7RHnBWtp+qEJNJQL6AUcudgJBcT2rAlrhsC4XA6FDX2Ld9O +5MG2ZAZusi8uO/KLtwoqduT9Xr4tEiloG1sGQ5rJx+nYveKDAAAAFPhfD4OsTffq +DN+PRpv+6uoUFWSVAAAAgCsxUv9sYvFGIrj0jln4r0aIOzjnm4x03urp3xMfi4Vu +OtbIRV2rh8wNqKyXNBfOT3h4VX1s30CzW0oMo+sxDGqV1ozihK1OJeooWRYR7gi4 +REvWSyXz98VyQQ3fs5zHKLnJNvhfQZEphpkpzbkJpqOpm74IkhY2gXG9C6gd5P4z +AAAAgDE/2evKkVdOHC7r4VF8V+DCGwIJhyFAxTKHYbuyRQsz8bGLQJzpq3xM2P2j +OR6ONIaDV8GZ4WprLroG1nSd73kdeeldOk0Jskw5KtidvxAJla4ZwBBiBWuxS84A +Xocx794XX5W5dQib3NrqVisyeG2W9aMa7fdTZACK1P/+u5cLAAAAFMU+rm1FMjFk +x9B69XFXA3RKY/w6 diff --git a/security/nss/cmd/bltest/tests/dsa/key10 b/security/nss/cmd/bltest/tests/dsa/key10 new file mode 100644 index 0000000000..166f9bd03f --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key10 @@ -0,0 +1,18 @@ +AAABAL/r0ACy1s1Ks477o13zNN9yHWwvKz2VZnnLrQCfPfvQApUsyJnMI1bsh2m9 +PRulpzAjcpiI2pLKSKXulMl/TwSi46y08zovD7N4PDHyxw+nxw84IUon2t7IsS5n +mWqehe47sUiAMTAUc5LcUlPATXBjU15s1ka/sYaYTgi1i3SnvlszO/MrCr/VZlNg +6akjoMUo/xxixyU0WPVnhShxnUNuUBSHQfRdx90sbKxxxVIx8SqD/v0u0KM+3huK +UfVm/PeJBoLNwZMdwgfJK/LvTiirMWYe63fxYB7qlByVkfA40/ANkShX2wXmSyrV +aTIAYcb4Y/8zVNhC5+fqcVr++NEAAAAcqpht+KBkJ46TYzFqmDC8+kkGVvqm1dqo +F9h5SQAAAQCBla2aR4/ZhSFu5YNoNm0u3RPBKz1iI5Fp+gQtkRVkCLSDEi9E7WI2 +uDCKbNtS+a896I7IngOa+tfaOqZsGXYEmo4KfRjVZ7r5n87+MVytoBVIOGsQsl5S +9S7XjrTSgILl4f/ulIDE/izEqv0e/J1P0sxtFVlokxJx7xWzJA5/sEOoDI9ii+/g +nWRQd8ECnSHgrIvwupwncU0bWA7eWUqgGzt29udF/B7AfbN+L9fpjGyMaRUijkIs +MJ3p9dsWj1AknRvh7TKYCQgI4uu4lrt5uMTL+U1MIGTjfmErpESdesIQ7d4hFBbW +SwUd2ARqsEFzJmVBGn8VTTGz4RpR2n/AAAABAK9nIb913saht2rTXKN1De8xEXxb +RBwVowaDWh23TAA7hq6Qmev7dFsKqcsADPQ/sCFRO48Ze8hlsiv5SbSRgJrXUv/B +yo5UvqFtx/U55MVftwp3Q90o8mL2DvDy/KrCnoAhp5OMGP/gMHXQt+CitNyr5G7R +lT0z438ROvUZqwvwthhsErX2SIQ39RkwluL9amoYNWBHlMZrQq5SZcHPHLU66EmX +l14DGKk85B45AuTvVN48VlVb0ZSRrNU/PldGTh9GA4nbxfqAZI+lpaDylW6ew7jc +RBtTXGQcNi7tdw2oKGSb/RRkcrD0akwGTkWfiL/5De3n7FYXeppx0WeUhxIAAAAc +altP/EQjjRhS+5t05MFmG+hZhAQ8/u4CP1fKxg== diff --git a/security/nss/cmd/bltest/tests/dsa/key11 b/security/nss/cmd/bltest/tests/dsa/key11 new file mode 100644 index 0000000000..086f493759 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key11 @@ -0,0 +1,18 @@ +AAABAMGlnSFVc5SeCyCpdMLt8uMTf/JGMGL3Xx0T3xKroQdrstATQCtgr2wYf7D6 +NiFnyXbCYXxyb5B38J4YwRtg9lAIglvWwCofV9PrCtQc1UfeQ9h/JSX5cdQrMGUG +58oDvmOzX0raFy0KBpJEQKFCUNeCKsLVrq/tRhnnnUFYp9XrLZ8CPbGBqPCUssbL +h8uFNUFqwZgT8HFEZgxVd0X0SgHGsQKQksEpsNJxg+gsWiGoAXfudHbrlcRm+0cr +09LcKGziWEfpPL+prTnMVwNdDHtkuSapx/WnsrxavL+9wLDj/t48HgLESvyK78eV +faB6Dl/RIznbhmdhb2IobfgNWKsAAAAggAAAAAAAAAAAAAAAG9YsZei4fIl5f48M +v6VeSmgQ4scAAAEArqWHh0DxQk08bqnGtHmWFdJ0kpihfiYgf3bO80Dd05Dhsa1r +bAAQrQFaEDNC3dRSysAks25C2bjtUvr656HTzp5LIfkQ0TVusWOj5agYTHgb8USS +r6LksKVtiIT9AaYouWYnOcQuXFeVreL18n5t4dljkXzogG/EDQIc2HqjqjqeTwws +TEXSlZsleLL7GiIpw34YEFm51ee3hi+oLiN3pJ7Q+dyoIKWBQHndZhBxTvr4sMxo +PY5y5MiE5vnUlGs+jUy7kq2759TEfMML5/jDfKgYg6GqxoYAWf9GQKKcyuc94gsS +5jsAqIsu6bqUt160CmVuFdnsg3MchdDv/LnvnwAAAQCIDhfEroFBdQYJ2CUcC716 +z20LRg7TaI6aX5kObEtbAIddp1DgIooEECo19X50uNL5tpUPDR240wLFyQpbh4ao +LGj/WxelenWElsX4BT5EhKJT2ZQiBNmhEJ9L0qPsMRpgz2nGhbWG2Yb1ZdM9v1qr +cJHjGqQQLE9LU/v4ctcAFWRltsB15/d4RxojUC3A/uQbJxyDehwmaRaZ81UNBgoz +EJn2SDfN3sacrr9Rv07J828qIg/nc8tNPALQRG3dRhM1Mu8cPGnUMuMDUCvQWnUn +mngJp0KsSnhysH8ZCGVASUGTUON6lfLvMzYdjYc21Ag9wUwLuXLhTUx7l/Pd/Mrv +AAAAIFpC53JINY8GrpgKLGT2oivqK/e0/AAVdFBTxDK3Eypn diff --git a/security/nss/cmd/bltest/tests/dsa/key12 b/security/nss/cmd/bltest/tests/dsa/key12 new file mode 100644 index 0000000000..bb2cba1cfe --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key12 @@ -0,0 +1,18 @@ +AAABANAiduvzwi/9ZmmDGDpHrpTJvMvL+V3ctJHR985kNUkZmZLTfHnnsDLSbtAx +trpEifMSWCb6+ycmqYMz69mr3eWS2Gk9mFlTbZzDhBodJOBE01rO1hNiVvxta2Fc +9PQWOqOB6ytMSAglqOzMVtjdz1/mN+OK2bKXS9LPaL8nHg0GfSRlqLa2YFJPAIJZ +iUWtpY6mSbmATrR1NAjCxZdoxGq7guMpXz2cpGn4TMGH9XLcS1o7OTRuyDnfrW8H +1tHw4hUgm7DswFx2fPLnlDrJz7Au7h6e9ZRujOiDFrXhX9z5WhMu8uS7CBcTZSjP +pd2WUy+cOr5cQhYg7ba8vVIjTKkAAAAggAAAABKZfoKF5AiXCPUoBwxtevigvQFA +nnoHnNtvxbsAAAEAd4RTBJ7yYhR/7XtZsO5nZGB8Uee1tfxv6np6ex3Wuyg/Sprp +jv05ZLFVZ1jLFbKlOvhhnnTYWJi+x307PzgklK5ZYaE//HRdo4YYIpFRmAD5ndcQ +4ArrFa3uCI4nmO4uRvWYUmzw9GZwVdG6AJdQBB3FzdJyX/HZfdNAyFGK92cbh9Od +Z67O2Etm+E4HAe/IKlye+VTuV20kw4WxTWMDfw2Gb9QktJdb3VSF7XQMuTLoQ/kG +aD98eyx0d12QHDYbhHtRnA2mmWONpAvXNreD0nELLCzCbvkScb9OLBkp+HbpAuIF +cWQiO8eNaiufbAx6fLhZIvfWxCh64jhh+BKISAAAAQB7sx6Yx6BDf5eKc9Xc+9+7 +Ccwkmd+vHrUla8zWNYyrtfZ9BKQoI0Y7fpV/K5IT8fqOWpjWFEhHAau4x9Z2Qf5u +0G+kUntJPdqy50ZA/ePecNppPx2yuOJkFwQK8O6myrRRp5WlLhh9LuJBuT9lyGxt +ZvRYNMzhZaxetnDU8AlcI86XV+O9xjb5ke4Ac9kKCSAu2zXMPqHPmtyhYX+gv/2c +EmIppgSh079JMd3wuZQt/IovjAn8yXAyVkp5rh6+Hizkn/V4OefEP6YLFgPRWkUI +mKpOSh7oBleUEm1k8BM2cJaoNoa58VjDOxD187Ns8fY1iz80+EsQHcJtPbaLzJXI +AAAAIGuoHmzUNneYqquLevETUYOjfEKnZtvWjNLc548mcO8P diff --git a/security/nss/cmd/bltest/tests/dsa/key13 b/security/nss/cmd/bltest/tests/dsa/key13 new file mode 100644 index 0000000000..b3e25c7ccd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key13 @@ -0,0 +1,18 @@ +AAABAKittsC0z5WIAS5d7/GocdOD4OKoW16OA9gU/hOgWXBeZjIwo3e/cyOo+hFx +ACAL/VrfhXOTsLvWeQbAgeWFQQ44SA6tUWhNrDo497ZMnrEJ8Zc5pFF819XWKR6K +8go/vxczbHv4DucY7gh+Mi7kEEfavvvMNNELZrZE3bMWCijAY5Vj1xmTomVD6tt3 +GPMXv12Vd6YVZWGwgqEAKc1EASsY3mhEUJ/gWLqHmAeSKF8nUJaf6Jws1kmNs1RW +ONU3nRJdzPZOBsGvM6YZCEHSI9oVEzM6fJ14Riq6qzG5+W1fNERc62MJ8vbSyN3g +ZEHoeYDTA++aH/AH6L4vC+BswV8AAAAg5x+FZ0R/QudfXvhcog/lV6sDQ9N+0J7c +P25oYE1rnfsAAAEAW6JN6WB7iZjmbObE+BKjFMaTWEL3q1TNgrGfoQSr+12EV5pi +OyV0s30izK6bPkFeSPXA+by9/4Bx1jubuVblR686jfmeXTBhl5ZS/5a3Zcs+5JNk +NUTHXb5bs5g0UxlSoPtLA3iz/LtMi1gApTMDkqKgTnALtu1+C4V5XqOLG5YnQbPz +O53eL07BNU8J4ut46V8DelgEthcWWfiHFc4amwzJDCfzXvLxD/DHx6K7AVTZuOvn +aj12Sqh5rzcvQkDeg0eTflqQzsn0H/Lya42pqUoiXRqRNxfXPxA5fSGD8bo7e0Wm +jx/xiTyvaagngC97akjVHab777ZP2abFt1xFYQAAAQBaVdzt3RE07l8R7YXetNY0 +o2Q/XzbcOnBoklZGmgtlGtIogPFKuFcZQ0+cDkB+YOpCDioM0pQixImcQWNZ27Hl +kkVvKzzOIzJZwRdUL9BfMeolsBXZEhyJC5DgutAzvhNo0imYWqxyJtHIwuqzJe87 +LNWdO59959vJSvGpM560MMo2wmxG7PpsVIFxFJb2JOGIrXVA713yb476y4IL0Xof +YYrLUMm8GX1Mt8ysRdgko795XCNLVWsGrrkpFzRTJSCEAD9p/pgEX+dAArplj5NH +ViL3Z5HZsmI9G1//LMFoRHRu/S0wpqgTS/xMjMgKRhB5AfuXPCj8VTEw8yhsFIna +AAAAIERpaQJURiR/hP3qdNAtfdE2crLet8CFvhERFEGVWjd7 diff --git a/security/nss/cmd/bltest/tests/dsa/key14 b/security/nss/cmd/bltest/tests/dsa/key14 new file mode 100644 index 0000000000..759c602be8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key14 @@ -0,0 +1,18 @@ +AAABAKYWfBb/904pNCuFhq7TzYlvexY1oihv8W/f9BoGMXymsFyiunwGCtbbFWFi +HMsMQLhqA2Gb//MuIEy9kLedy1+G67ST470ZiNgJf6I/pNePs83csAxGZCPY+nGY +c8N2Rf5O7MVxcbvt/lb6lHTJY4W4ujeMeZcteqrmmiumTN6OVlTw97dFUM00R+ek +cqM7QDfbRo3eMcNIqiXoK3/EG4N/f8ImphA5ZuzY+dFMLTFJVW1Dgp8TdFG40g+F +ILDOjj1wX3TQpX6ocsK97pcU4LY5Bs3f3Ci2d30ZMlAA+O1SeOxdkS0QIQkxnLo7 +ZGnUZykJtPDb7sC7tjS1UboM8hMAAAAghCdSkETSFMB1dPezWcLgHCP9l3AbMorI +wThbgcU3OJUAAAEAb8IyQVwxIAz1I680g/jias6AjS8caouGOrBCzH9rcUSy05Ry +w8tMdoHQcyhDUD2PhYy+R25nQDJKqilZUBBZeMM1BpuRn/mm/0tBBYG4BxL+XT4E +3bTf0m1ef7yisMUtjUBDQ9V7L5sqJtqn7OMM6rnheJ+XUaqpOHBJllrzJlDGyls3 +SlrnCz+Y4FP1GFfWu7F6Zw5uqviYRNZB4eE9Whsk0FPca4/RAcYkeGlRkn5CYxCr +qUmKAEKz3Hu8WdcF+A2bgH3kFffpTFz514mZLTu4M20dgIy4a1bd4J2TS7UnAzki +3hS/MHN2q30i+81hb57aR5qyFKF4UL3QgCqHHAAAAQBcpxUbyg5Fe7xG9Z9x2Bqx +ZojcDrfk0XsWbDMmxbEsW967NhMiTRp1QCPFC4PLXswTkJbO8okzs7EsoxA45AiT +g1l8WcwnuQK+XaYsrn2l9K+Q6UEO0WBAguLjjiXrC3jfrArrKtOxncI1OdK811Xb +HMbJgFp90QnhyYZnpbnVKyHCdyEhuNDSskbl/T2oByjoW78NcGfRxrqmQ5Sinn/L ++AhCvUqwKzXYP1mAWhBOC9adAHmgZfWePm8hVzoA2pkLcupTf6mMqqCliACn56Bi +PiY9T8pl67jt7Ubv3+fbksnr04Bi2PElNPAVsYYYbuI2HWLCTk8is+ldoPkGLOBN +AAAAIEWesViOn33U8oZnenQVyyWhtG56fPrcikUQA4PiDaad diff --git a/security/nss/cmd/bltest/tests/dsa/key15 b/security/nss/cmd/bltest/tests/dsa/key15 new file mode 100644 index 0000000000..dee9a8a756 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key15 @@ -0,0 +1,18 @@ +AAABAPY9o76alhYZbGVW885v2LmL3akTdHPaRv7ZcOK40Uc4eoGSIGXVKKfWQz68 +XjWxXGfqNaWlv/W5zvHNHm/jHdpSg42jqom5tOjZ08BzLMxPI4zhtBbEypPyxoAO +X07UHE92Fc7FUxuYaAsg3GP3PnDYA6rPrs4z1F+g4513yFCCCVKLkEa1kXAQeRI0 +OX5BLSK8C41ny9HNKKMsJGCgvYaqug7qgOFuMkVkMXHjQiF2DCA6VrggehAJ5sGi +9s2oX4XE+eQQuUmSM8DuBy5GWvT7T7koLFwQ6CNP1jDqkvCq5rl6Ug2zRHVwe3mk +wXUmXANWzLyoJ+ODffPW0FdtkHkAAAAgm3Rj+CafC5CavtEJkWhPNqZKyGTg1tcX +wO8hV3pMOQcAAAEAlyp19gboqjqR/wj9Exog9ZYyUTBOPRQxtxL6CAPVJ/1xD7fr +J+UpBJcc1DypdxmaJNvutLe8K6B107cutrLFrY8Oi49IxQtVTH4HEfTHQWMwgGZy +SY9DApJyS/mKjqSMf1PXsx2LdSixpvCH0sJ8M1ICg1seMUIls3rvi/zsfYCSDEpG +Cj1oNE3tde2e6Gf6KmlFBjiU9WO2hjO4s5+DoaqvWpbH9CJofnyEz4+4zF9FBN/w +h7yyapW7+Fg/A7Og5Do1ayvX4lzd33oBUwD67MZ5PF7pm2Mny4RW4y2RFTOdWmtx +K3+dAwGssFEz4xFeRU06bdJKFpPJSqtUBlBL9wAAAQBBGXziIz1+SMgDzWTHj2V5 +I7nja4cUAfhmHCHYujjGubMjnbdnsR0dQB5frsv3pFhgzF8aVNYChrfW4cmf1bjI +TthRxTV9Qa1gFj8iTXjJlhQ//4ndOo/hI9rh9iFCf9jM527RONaPokjzdK4jMkli +W5Pz3Vk30V5UG37/pN9P6n1S+s7WFb/gNIQY/5PmmiClLlXHbMMPMH+E5x5Kq8CC +Xso6lbS9WOv7ACnSOhaenYC6fRxf01OV5mAuCJqpkY8IuuNa4crHrzNpQSnpjw2t +rdkOrrbu0lAkOQsaYK95RzTDl7D1CYZbE0soZ8EV1vSJtt1+PIKZS0Xc4qI8a8kC +AAAAIF9uVF2u9s0bjZhI3Zh1iAcjasC3/wU7MscD6qOxFHVX diff --git a/security/nss/cmd/bltest/tests/dsa/key16 b/security/nss/cmd/bltest/tests/dsa/key16 new file mode 100644 index 0000000000..704d76cb49 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key16 @@ -0,0 +1,26 @@ +AAABgP1abFbdKQ992Eop3hcSbrTkSHs+/wpEq+XFl5LS4SALnD20TVKLn30iSAMu +S6D3v8T6/HBr5RHbInbAt+z/042i4cLyN6dTkMHk0yOcuo4g5VhA7LBd9fAaG2l3 +rRkG8stUTM+5O5Aa0JZrGDKtLatSYkSjFWyQXAGsUctzudzZhg1WF1pCXYRkhdmx +9EqKDCV45s9hlHvBoTkv3TILFqnXBFX+Q28tR97Y6OYF90hutXjqf8T/0TwH+Zlq +8Vn9QR6UUUAyeN0RQajJJrNcljhLvWvuCcRvRMNrH/xxl/XpJdvgVEpo5quMGOQm +pGazkvnCfdef76nKFjzFo3VTmoVZ8nf2V6U10ZZMal6RaD71aY66oB74GNv3LLBM +P/CS0YiGbyXNQFEI9Wawh/c9LVvrUfrG3oSuUWGmavlgLH5L/BRvSCC9/Akvrqxp +Ez5KCKWyAqEkmKIuV7rVRnTtS1EBCdUrX3TnDh9vghYXGM1M8AzJ8ZWKzIvdzfvR +++Rs0QAAACCAAAAAAAAAAAAAAAAzSibdj0nGgRzoG7E0KwbpgPZLdQAAAYCZqwMK +IaXJgYF0hyFnZByBweA8mydM+8J7xHJUKSd2beX6BTmztz8/FqyGaprsi0Rd7Zf7 +/wiDTtmMd+f8ieXcZXvvdm/3+/jnaHPhe+5BJ2LVb+EUF2CrTSW6/Utu8ltJo1Bm +MtH44Qdwkwdg7BMlkyxaS6+ekBVCZN30QuxcQf7ZXRFSUVHbz7N1gUm62Bxiuc/3 +gWuPlTuLfAIlkNFYTpIdyVX1MorHKYPtXPDQQFb+DVMeYvj2yas8D81E4UhgtzEd +JWHHfB0y9sadyPd5aMnYga2dteDBFP2oYovKAzXrf7nhXmJaq6tY/AEZTIG/b7LO +VAd7giUOV8ansl3rbuOdS2hqXDB6dhKy2F7pJRJBPeopfkTzF75863CjMorwtAEA +GkGFYrj/5Ol3G0tKjgtAx5E0nV1ORZ/mIKGi/HLi9sooVn1MJjK73htJhkwGuxJh +nxMsHaj1ce9hPqxzn2arORTLP6GrhuBeUILrqiTr7qTPUb7vwn31Ev4/7n0AAAGA +58LuGMOqNiwBgsalbCWEYoCDxz4EW+2o1lNpDJwvZUTt+XAsV8RVJzkFM2pfUXEQ +ejE819Cw9Q+NM0LGAhnyKpAjOUBZ0F9GTESW1V2rbrCJhSf/TPVnjntb+14Y2SxK +nXMojM4UUw/EcC9tA5fsOaiAxKctNYcwxWYzOG7eAoAjwXkfMWTRV054I8ebijyh +ND6hZrpvArf/fp7yGY2xB/fMFZ87ahwAp4w1XFZt6wrG/eP2M8uRd6H7xsF2bKAh +1f7EcBAau0QNLwaYIYGoySt83XZTNrmh4atwKD1tsKlj+2SMN8TimnTDdXcpEEmr +R828EEwE25ZmgeqOu58Az0xKVGIRc3lXX72kuAGXlFH6lLGbTpNlZwXA9zTz4JFL +uWweK4oPto+vFClu/fMwCtlbzei2fMSybmSI7vklz66sbw1lZ+i0E1X4nRwrj+aH +v6LfXih+EwW4m4w4jCYZYJCsA1GrxWGq3Hl9qMzqQUbD6WCV6841Pg2kxVAZBSyq +AAAAIEM8/QUyzP2M3Rslkg0rtzlph7dmJAN5A1sOhlJ86cUt diff --git a/security/nss/cmd/bltest/tests/dsa/key17 b/security/nss/cmd/bltest/tests/dsa/key17 new file mode 100644 index 0000000000..d5b0144963 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key17 @@ -0,0 +1,26 @@ +AAABgPY7PN1kbY5921chaqbuwhNNcHSIofKc+plwZF8SJ+pdsuMY7qXaFofH7ZBQ +lmk0XtYTTP8yIDq3Kuy/ppPSFq61XY0oqYH0q/8H0TGaeZvl3XRvhIQoF5KcMFtA +hZivEgRdqi8czIvk2BtRPGMPAX/sFlisoQihr2Eg7AXjAYxCU8ndNbzgYrc9DyqT +1BxIGlxDu5eQloLTmppg3Dw142N13sbO0NLbO6DREb7epwGg5HU2JJd6nnW3CnTi +uB44pSqyLaExs1QW087JZjB5dGp2NHbldZgULjmGFUXar404oXbybHH1r+vZxWIN +qAzzRStVw3xmG0oewDUXELneSjy+C5i02eyJEo2Xqn77GduLpDzAviXCAPkOFQbL +eOwMM216lWE9QgTo7WjQ8KbHhCAQWo0tQ4+9JVGmShoLA/+4eHQvjJl5z6hzlBUC +gZmNUXAdX8+paWpJif0l9ACVXmJrGr6SbAr6aappgZAO/83QMFkvgrIEKkeppajL +AoPcTQAAACCAAAAAukY0tfpNoFS9DKSK5JDldxHzgRk4QkKRWbp8oQAAAYCK1FU8 +TkmqJHKKtQJEF7Ey0spTpV2VlFjy91mtsENb7u+jos/NADjiQgZD/EpN7rXZ/qoe +3yEZO0DhS0KYKpTzXFi4EUfXGJ0mPJsS/mOrn6X28DooYMGGQy46sE8qsPL7YUe9 +m/ftXSBxO52iE4Piw6Fo59CdPYpaBY/SMJW1rP64ZKMwa+JCX6GtMq1tk4LmA7A8 +aK9K8CRjlxAsQVXLqBGr+Z2ng553surJlwWIyh0KI2FyOhZKySKcLoDc+o20+eKY +A+/7MWjH/tejpt5A3aGaBTavm1t6+u+5xw1q6N8S2mWPYjYEOuqHPbKc628H0Qj1 +IlaHvQww4whOIJC0WuL5Kpe47LepcFxJVrizHEo9YRB8hOR63abIDV0i2rPYWSIP +nVqrE2d6498WjwwXbRdrVFBsY5hT8E3e8nIvOcGOXOQm4UVirY/yYkeviIcO+3LA +zOg23o/uZ6ZiN4JFtQK/H4MJmYigk8583IE2THix9KUbgA32E3xx1l5rCJoAAAGA +QiQ1OeSdueoZ2Y2X9vKpSyNSmBLfiJ6qvP7aAc5MdZSH+4m8gtp1/hyRNDYfht5H +0W2O7oDlasUCF46O2BKUd6+L+9gmLF7dk34ahsDw57Kv57y938tYFM7Qt1anbKF4 +Qju01XjF2hg3EtloWCZAqg7H6ftWv9lg16V1SXR9j7et5Hz+gWweV9pmM9rMU33g +YIE5ZLtbJ1ejEvnaPYTmCv+YFwBR09kOOAuLzBmGxY/53JHogn1Pn1/EsrLnQ8+T +if8C3sAfXUNLQw0WLokcM1X5GFUzn431gwDkyZOuTfjEMYtcS9BSg8pLRrfS+w9k +dr8VkH9Q3UFBqnrKydqmLszTpnNXEiBgts7OBEapPrIwrZO8mk0bHv7soeP8g8EZ +eFA1tDlQn/t5aLGkSLe9gxV1P98EolbsoVYqEbCWyQo2s1NlnL3kQg4X6QuUxDx1 +GcYGQc7sBW+Je5fWuxhhJo4Nx5t8O2t2OcJVvwaGVzdFkSbLRlvB2koEOhlj2n1j +AAAAIFJKfqWXf4ECs1UpMEd/XwQkARZdRjfc2LnRPfTzquXQ diff --git a/security/nss/cmd/bltest/tests/dsa/key18 b/security/nss/cmd/bltest/tests/dsa/key18 new file mode 100644 index 0000000000..fe841bb262 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key18 @@ -0,0 +1,26 @@ +AAABgMe4bXBEIY42dFPSEOdkM+Tiepg9scVgu5dVqPt9gZkSxWz+ACqx/z9yFluU +PAso7UYDmgfeUH16Kfc4YD3s0ScDgKQflx8lkmYaZLovNR2aaeUaiIoFFWt/4VY8 +S3fuk6RJSROEOKKri9z8SbTnjRzedm5UmEdgBX12zXQMlKTdJaRqp3sY6dcH1nOE +l9Tqw2T0eS2XZqFqDiNIB+lrjGTUBLvbh245tXme9T/my5urYu8Z/cwr3ZBb7aE7 +nvesNfH1V8sNxFjAGeK8Gan138Hk7Knm1GZWQSQwSjHwOGBaPjQtoBvhwrVFYQ7d +LBOXo8g5ZYjGMp7+tOFlr1s2ijmojkiI459Auz3k6xQWZy+Zn+rTeu8cqWQ/8yzb +wPzr5ijX5G0oGpidQ90hQyFRr2i+P21WrPvbbJfYf8teYpG/i07hJ1rg60ODzHU5 +A8jSn0rbalR+QF3s3/KIxfbHqjDcsS+E05JJOnCTMxfA9eZVJgH64Y8X5uW7a/OW +0y2KuQAAACCHb6CeHcYrI2zhwxVbpIsMz9op86xal/f/ob2Hto0qSwAAAYARCv67 +Esf4YrbeA9R/28Mybg1NMbEqjKlbLe4hI7zGZ9T3LB5yCXZ9JyH5X72aTQMjbVQX +T7+v8sT/ferkc4sg2fN78KETTCiLQgrwtXkuR6klE8BBPzRqTturLEW9yhP1NBwr +Vbi6VJMrkhe1qFnlU/FLuMEg+7nZmQnf9epo4Us3mWT9Pzhh5bpcyXDEoYDu9UQo +cDlhAh571oy2N5J7jL7mgF+icoW/7k0e9w4CwaGKfNeL7x3Zza1F3enNaQdVBQ/E +Zik37h1vTbEoB8zJW8Q18Rtx5whgSLHatZE8YFUBLeguQ6TlDPk/7/Xcq4FKvCJM +XgAlvYaMP8WSBBu6BHR8EK9RP8NuTZHGPuUlNCLPQGM5jXfFL8sBFCfL/PpnsbLC +0apKPacmRcscdnA2BU4vMfiGZaVEYciF+zIZ1a2HSKARWPbHwN9ajJCLqMPlNoIk +KIhse1ALvBW0nfdGud5aeP47T2mR0BEMPL/0WAOdw2Jhz0avS8JRU2j0q7cAAAGA +RWoQXHE1ZiNIOLwHC4p1GgtXdny3XpkRShpGZB4R2h+p8ikU2AitcUhhLB6lXSUw +F4Hprgya42pp2HugOex82GTDrQlIc+blZwn9ENlmhT1hGxz/FdN/3uQkUGwYTWLH +AzNYvnjCJQlDtvbQQ9Y7MX3lblrY0f2X3TVavpZFL45DVIX7O5B7UZAKo/JEGN9Q +tPza+/YTdUjDk3O4vEuj2rtHRuvRe4f81qLxl8EHsY7FtGXm5MtDDZwM542lmIRB +BUo3B5K3MNqaukGjFpryYXb3Tm98DJybVbYrvnzjjUaV1IFX5mDCrLY/SC9VQYFQ +5f7kOs6ExUDDunZiroCDXBotUYkOqWuiBkJ8Qe+MOKoH0qNl5+WDgNj0eC4irCEB +r3Mu4idYM3slNjeDjhb1D1bTE9B5gYgNaFVX99eabbgjxh8bs9vF1QQhpIQ6bylp +DniqDwz/MEIxgYuB/EokP8APCaVMRm1qjHPTKlXhq9Xsi04a+jKnmwHfhagfP1z+ +AAAAIDRwgyBV2t6U4UzYd3Fx0Y5dBvZq7/TGFHHk66dO5WFk diff --git a/security/nss/cmd/bltest/tests/dsa/key19 b/security/nss/cmd/bltest/tests/dsa/key19 new file mode 100644 index 0000000000..5f769bec2f --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key19 @@ -0,0 +1,26 @@ +AAABgKQQ0j7ZrZlk0+QBy5MXolIT91cSrLxcEhkavz8cDnI+IzO0nrH5Ww+XSNlS +8Epa41iFnThEA842SqP1jdl2mQm0UEhUjFWHKmr7s7FcVIgvlsIN8bLfFk8LrISc +oXrS32Or11yIGSLnmlAJ8At9YxYi6Q5/pOmAYYV14da9GnLVtqUPT2pot5OTfEr5 +X8EVQXWaFzZXfZRIuHeS3/ByMkFVEukzdV4SJQ1GbpzI3xUHJ9dH5R/qeWQVgyax +Nl1YDLGQ9FGCkVmCIf3zbGMFyLio7QVmPdewBulF9ZKrvsrkYPd8cbbsZJ0/1TlC +Au17u9BA97j9V8sGqZviVPol1xo3YHNARsKg2zg+Ajl5E65nzmWHDZ9sb2ep0ASX +vh12OyGTfPnL+aJO+Xu8qgeRb4iU5bf7AyWIIaxGFAllsjxUCcpJAm77K/lbzgJc +QYOl9lm/aq7vVteTO7KWl9fVQTSMhx+gH4aWeLLjRQb23ApMEytomg7SfcPI1TcC +qlhIdwAAACCrxnQXclzyj8dkDV3kOCX0Fuv6gOGRxC7ohjAzOPVgRQAAAYCGfV+3 +L1k20aFO07YEmWYvMSRobvEIxbPaZmOg6GGX7CzEyUYBk6dP8WAorJRBsMfSfCJy +1IOsfNeU1ZhBbE/5CZphZ51BfUeM5d2XS/NJoUV1r+dKiLEt1fbRy9P5Hd1ZftaO +eeukAmExMMIkuUrChxSh8cVSR1pdKc/N2OCKax1lZh4o7zE1FNFAj1q9Pgbr46fY +FNHt4xa/SVJzyh1XT0K0gu6jDbU0ZvRUtRoXWguJs8Bd2gBucZouY3FmkIDXaMwD +jN+4CY6arZuNg9S3WfQ6ydIrNT7YijNyNVAVDeA2G3o3bze0XUN/cctxHyhH3mca +0QWVFqHUV1UiShXTe0rq2j9YxpoTba7wY2/jjjdSBkr+WYQz6ACJ/aJLFEpGJzS+ ++Pd2OIRbAOWc5/pPHa9IeiytoR6rpyuyPh32tmoYPt0ibEQCct2bBr7A5X8aCCLS +4AISBkttumRWIIX1p1kpr6X+UJ4LeOYwqvEvkeSYDJsNb34Fmi6j4jR52TAAAAGA +HwpcdeeYXW5w5Pv9pRoQuSX2rMtgDXxlENuQ7DZ7k7sGm9KG6Pl5si7wcC9xeodV +wYMJyH2uP+gsw9yPS3qj1fOHb01LPraL/pEMQwdtbNDTn8iN3njwlIDbVSNObIyl +n+JwDv7AT+7mtOjuJBNyGFi+cZDb6QX0Vu3KtVstwpFtwehzGYjZ74thmrz4lVqp +YO8Cs/AqjcZJNpIir1DxM47SjWZ/PxDK4qPCijwdCN9jnIGtoTyP0ZjG2uPWKj/p +8EyYXGX2EMBsuPrqaO24DebPB6jonAAhgYWpUrI1cuNN8HzltCYeXeQn61A+4br1 +mS221Di0dDTEDCJle8Fj55U/oz7/OdwnNGBwOardasJ+Q2cTEEH4Rf+hoT9Va/ui +MHpcePLM8RKYx2LgiHGWjkjcPRVp0JllzQnaQ88DCaFq8eIP7n2j3CGzZMRhXNUS +P6X5sjz8T/2c/c6mcGI4QLBi1GSNLrp4atP3rjN6QoQySs4jb59xdPv0QrmQQwAv +AAAAIG1Mk0ORt/b7bhnjFB+MABjvVyYRihEGQ1jH01s3c3N3 diff --git a/security/nss/cmd/bltest/tests/dsa/key2 b/security/nss/cmd/bltest/tests/dsa/key2 new file mode 100644 index 0000000000..7df1a90316 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key2 @@ -0,0 +1,10 @@ +AAAAgIubMvW6OPqtXg1QbrVVVA0NeWMZVVjKMIt0ZiKNkqF7OxS44Kt3qfOylZoJ +hIqmn435LNnp7e8K33ks53v87Mrdk1JwDKX67PGB+gwybbHW5dNSRYAR5RvTJI9O +O9fIINfgqBkyrKHro5AXXlPq2hlyI2dOOQAmPpD3LZTnRHv/AAAAFLxVDpZWR/s6 +IPJF7IR1Ykq7sm7dAAAAgBEzOpMfulA0h3dzdoWf3BL3xoewlIroidKH8benEq0i +CuTxzjedDbtcmr9BliHwBfwSPDJ+UFXRhQY0w205fmieER1ZjBw2NrlAyE9C9DaE +bo5/ytkBLO2jmHIPMv/9GkWrYTbOQXBpIHrBQGdbj4bdBjkVrm9isM7HKfvVCawX +AAAAgH4znzdXRQOQFg4CKRVZ8wvtCy11jFzMLY1FYjK7Q1rknefnlX46rZv9z2/V +2bbuO1IbwiKahCHcKqWbmVI0Wo/B3kmzSAA6mxjaZC1/b1bjvGZRMa6XYgiKk3hv +e0typLzDCMZ+JTKjpb8JZSBVzCa/OxiDNZjP/XAR8ihfeUVXAAAAFG4uMbv8ZwlE +16cSDjmpgVIGFNio diff --git a/security/nss/cmd/bltest/tests/dsa/key20 b/security/nss/cmd/bltest/tests/dsa/key20 new file mode 100644 index 0000000000..5a5dbfdb17 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key20 @@ -0,0 +1,26 @@ +AAABgMHQptC17WFd7nasWmDdNeywAKICBjAYsboKBv56APdl2xxZpoDOz+OtQUdb +rbWtULYUfiWWuI00ZWBSrKeUhupvbskLI+Nj86uM3IuTtioHDgJojqh3hDpGhcK6 +bbER6a3b18pLzmW7EMnOtpv4BuLr1+VO3rf5lqZckHtQ79+OV1uuRiohnDAv7yro +HXPO51J0YltfwpxtYMBX7Z57DUatL1f+AfgjIw8xQiciMZzgq/HxQfMmwA+8K+TN +uJRLb9BQvTAL2xxfTaclN+VT4B1RI5xNRhhg8ftP2Pp59dUmP/Yv7XAI4uCi02v3 +uQYtDXXbImw0ZLZ7okEBsIXyxnDA+HrlMNmO5gxUcvSqFfslBB4ZEGNU2ga8Kx0y +LUDtl7If0c2tMCXGnabOnH3fPc8epNVld7/ewjBxwfBe5Ad7U5HppATq/+EtHqYt +BqzWvxnpGhWNIGa0zSDkxOUv+x1SBM0CK8cQjyx5n7Rohm7xywm84J39SeR0D/gU +BJe+YQAAACC/ZUQcmHt3NzherewVjdAWFNpvFThiSOWfPN2+/I6d0QAAAYDAKshT +dfq4C6KnhLlOTRRbO+D5IJDroXvRI1jPPgP0N5WE+HQiUvdrHt4/w3KBQg50qWPk +wIh5b/K6uNtumkUw/GfVH4i5BatDmVqrRjZMtAwSVvBGbz2842ID7yKLNekCR+le +URXoMbEmtijumE80mRHTD/udYTtQqE36HwQrpTa4LVEB5xHGKfnyCW3INN7sY7cP +KiMVptJzI7mVqiDT0HNwdRhvUEmvb1EqDDip2gaBf0thm5RSDt+shcSm4uGGIlyV +oE7Dw0IrjesoTpjSSzFGWAIAigl8JZaegmwrqlnSy6M9bB2fOWIzDB/Np8+xhQj+ +p9BVXjoWna7TU/Pub0uzAkQxkWHf9kOKN8p5OyS7sbG8IZT8bm72AngVeJnLA8Xd +b8kag26yCiXAmUVkPZX3vVDSBmhNb/wU0W2C1feBIlv/kIOSpXk7gD+bcLTfyzlP +ntgcGOORoJ6z+ToDLYG6Zwyr/W9kql4zdMt8ICn0UgDk8L/YIMi9WNxe6zQAAAGA +baVPKw3bTczi2h7foWuoSVPYQpzmDNERpcZe3Pe6W42Th6togcJIgLKvvbQ36e1/ ++46Wvsp+qA0dkPJNVGESYp31yelmF0LMhy/bPUCbx3t1sXx+bP/4YmEHHEtcn5iY +vh6eJzSbkzw0+zRWhfj8bBJHDRJM7PUbXVrb9eeiSQ+NZ6rFOoLtaiEQaGz2McNI +vLxM8VbzppgBY+L+ynKkX2s9aMEOWiKDtHC3KSZ0SQOD91+ibM+TwOHI0GKMo18v +PZtodlBdEYmIlXI3ovyAUctHtBDot6YZ5zsTUKn2omDF8WhB58TbU9jqoLRwjWL5 +Wypy4vBMoUZHvKa14+5wf833WLkl641Oas5Px0Q8m8WBn/nlVb4JiqBVBmgo4huB +j+3DqsUXoO6PkGC9huDUzOISq2o6JDxewCdFYzU8pxA68IXo9BvlJPu3XNqIkDkH +35S/1pNz4oiUm9BibYXBOYswc6E51cdH0kr9rno+dFQ3M10O6ZPu82owQckS9+tY +AAAAIBULXFHqZAIna8kSMi8EBPbVf/fTKvyqg7bf3hGrtIGB diff --git a/security/nss/cmd/bltest/tests/dsa/key3 b/security/nss/cmd/bltest/tests/dsa/key3 new file mode 100644 index 0000000000..50c0a9b31e --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key3 @@ -0,0 +1,10 @@ +AAAAgMuhPlM2N8N8DoDZ/NBSweQaiKwyXE6+E7cXAIjVTu9IgfPTXq5HwhA4WoSF +0kI6ZNo//aY6Jvks9aME85JgOEqbd1nYrBrcgdP4v8XmyxDvtOD3WGf06EjRozhY +bdBkj+6xY2R//nF2F0NwVA7oqPWI2ozBQ9k59wsRSn+YG4SDAAAAFJUDG4qnHynV +Jbdz74t8ZwGtil2ZAAAAgEW8qkQ9TNFgLSeq+EEm7cc713Pebs4V6X5/70bxMHK3 +rcr3sAU89HBpRN+MRWjybJl+53UwAPvkd6N3ZqTpcP9AAI65ALneS1+a4G4G22EG +54cR86Z/7KdN1b3c32da5AFO6UiaQpF/vuO7nyok32dRLBw1yXv78jCOqs0oNoxc +AAAAgEzWF4Y30PDeFIhRXDsS4gOjwMplLy/jDQiNxyeKh6/6Y0pyenIZMtZxmUqV +ig+JIjwobDqbEKllYFQuJia3LgzSjlEz+1fcI4t/qy3ipJhj7PmYdRhhrmaL98rR +NuaTP1ff26VE4xR84Oc3D6bo/x3mkMUbSu7fBIUYOIkgVZHoAAAAFC6sT0GW/ts+ +ZRs7AAQBhM/W2iq0 diff --git a/security/nss/cmd/bltest/tests/dsa/key4 b/security/nss/cmd/bltest/tests/dsa/key4 new file mode 100644 index 0000000000..657abc8c49 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key4 @@ -0,0 +1,10 @@ +AAAAgPJKSvxyx+Nzo8MJYjMv5UBcRZMJY5CUGMMHkqrxNd3qVh6U8kcmcWt1oYgo +mC5M5Ewf3ct0ZIe2t3qaWhf4aKtQzWIbW8naRwiAsofXOYGQpCpe4i7Y0f8UfiAZ +gQyCmO1o4cpp1B1VXySeZJ+xcl3bB1wXs3vv9Gf90WCSQzc/AAAAFNoGWgeN21bu +XSrQbK+rIIINLEdVAAAAgEe1WRt5BD5OA8p4oOJ3yaIeKmtUO/TwRBBM2ayT7/jh +AbtgMe/IxZbV0vkuOj0PH3RwLdVPd9PNRsBN7npd6fAK0xdpH93O/koiCiZRrK5/ +zt2pK/zKhV22cF6Nhk+Bkr9r+GDADwitZJPswYcuACjVyG1EUF21dCJRXDglpveK +AAAAgEOie3QPQiyy3D6qIyMViDovaiKSf5l9Ak9aY4tQexfTscvT7GkcxnRHCWCg +FG797Llbtf4kl0njyAbNXMPn97q4Rdrb4fULM2b7gnqULOYkbdp70sE+G0qSbAyC +yIRjlVLZ1GA2+aS8Kp5RwtduMHTR9TpjIkxCeeD6RgR01P/eAAAAFGSYIBaOtZT1 +nNmyi5rv6MwQamxP diff --git a/security/nss/cmd/bltest/tests/dsa/key5 b/security/nss/cmd/bltest/tests/dsa/key5 new file mode 100644 index 0000000000..8d94d7fa77 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key5 @@ -0,0 +1,10 @@ +AAAAgIjZaOlgLsvabYb3yXCj/76x2pYvKMCvuScO8FvDMMqYw634PAcv6wX7Lik7 +UGW7sMvMkwwk2NB4ad6uzZKiYEwPXdNcW0Mf2moiLFLDViv3VxxxAgm+izuFiBh4 +hyX+gRK31ryC4P8cu/XW/pRpCvK1EOQa2CB9wsAvufpc76q1AAAAFKZlaJueW5zo +L9FnYAbPTPZ+zFa3AAAAgCZ+KChXQXdSET+6P8pxVbXOiefIozwaKRIuK3IJZfwE +JFJn/4f8Z6VzD+WzCAE6oyZpkPuzmBhah+BVtEOoaM4M4TrmruMwudJdO7s2JmXF +iB2vDFqnXp1KgujwTJGprSlIIuM5eKsME/rcRYMfnTfaTvoPwsXrATcfqFt92x+C +AAAAgGD1NB5Iyno7xd7O5hIR3ScnzY4vx2NfOqvqJiNm5Fj1xRwxGv2pFssNzcXV +pXKfVzpTK1lHQxmbz6dFSQPnSzPd/mWJYwbOwg69hCdoL6UB7ga8TF0UJcvjGCi6 +AIsZydpoE2z3GECyBZGeeDpiilpXz5HPVpsoVP/veglu2pbJAAAAFAfOiGLmS39s +dIIEbb/JOQcSPlIU diff --git a/security/nss/cmd/bltest/tests/dsa/key6 b/security/nss/cmd/bltest/tests/dsa/key6 new file mode 100644 index 0000000000..3408d5cc90 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key6 @@ -0,0 +1,18 @@ +AAABAPLTntMGKxPJFic2AKDyoCnobXpLkhe08YFb8rJNlxClerM/mXKUsBRYW40B +mN/cy811MU2l/4WqNEtFra6ql5tRoxKnv6lEcvtjPxpvFWu0RYhn39OEA/BrhR8A +/i00hAd73tcat1E9BKFAIgV1+2kzlUgOTIQCt6Rs7C03p3jDBazNHxPp9i6GUxX0 +sizEZ8iYbsjklh3fgQVmsMTuNprGqhXkP0dEAFgm9b3oBxoZ4wtpCarEs9F0I3Jw +2tAnmdCbiizF8i5miUtUIiKLLCNPEfWnccW4nPRloqzsu+6qFyX+j5tZQivomRBS +y1Vt3yyM6PqSBtvzn+rcGU4A+OUAAAAcgAAAAAAAAADBGPSYNeTvczxNFYAPzwWe +iE0xsQAAAQDjqTwJ2m9WDk1IOjgqTFRvIzXDakw1rBRjwIo+bdQV31b9xTfyX9U3 +K+Y+T1MAeAt4LxrNAci06zNBRhX9Dqglc6y6fvg/WpQ4VBUa/C19/hIfuM0DM1sG +W1ScXcxga+kFJIO8KE4SrDyNugm0JuCEAgMOcLwcwr+JV8S6BjDz8yrWiTiaxHRD +F2Bj8kfZ4ilrPqW1vCM1go6hoIDtNZGN7iEv0DEnnRuJTwGv7FI4M2aerAMaQg5U +C6EyClnEJKPlhJpGCla8sAFkeIWxQzxPmSlxdGv+KXfOclnFULVRpsNXYeSkGvdk +6NkhMvzApZ0WhOq5DYY/KfQc91ePqpCMAAABACif8YwypWuwuIOTcGR2g6OKWn4p +FBC5MgchKtyAiNMPk+nkq8Uj89RpNufVyQ2IdCs2r9N1Y0CPFcjBpPesJL8F8BAI +/+5wyIJdV8OpMIutigla8rU7Ldo8vthG2V4wHrm4R2ZBXRH2wzIJoNKFcQlqsEp5 +qg3EZZl1KWhraOiHzYogXC3IGVrvBCLrqZefVJrIVUjkGUE2Q7ckQ2EVOtoUgNI4 +zQDcFlJ5OJVVSN1dAn3tECnu647WxhtM1ZNB2LFUZunaiQqYmZb012keYHLeE2ry +i1h0vwi9H4pgz7HACIgTKQn1FeBLzoGwKVGqQbqsaP/bjF3Heh0y2PLBDdcAAAAc +YTLlUc2siECRg7037hRSzSR9SDSwiBSydb4/9Q== diff --git a/security/nss/cmd/bltest/tests/dsa/key7 b/security/nss/cmd/bltest/tests/dsa/key7 new file mode 100644 index 0000000000..e7830fb08c --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key7 @@ -0,0 +1,18 @@ +AAABAKqBXJ2xxNPSdzx9DU0dp17PxKOel9X6GR/+yLFJCikM4zXlzofqYgqKF94L +tkcU4uyEC/AObr20/7TjJMoHw8hxcwmvFBA2Kncsmt2DiysMrh6Qq0SK2r2s0uXf +WcQYejKiNxnWxX6UAIhTg7+PBm8juUGSDVTDW098xQRPO0DxcEaVYwe3SOhAcyhE +0Aqc5uxXFCk7YmUUfxXGf0vjiwgrVf3q22EkaJ+3b50lzCi46qmLVi1cEBHg3Pmz +mSMkDTMtidyWA7e93QxwuDyqKQVjGxyDyruubAwMLv6PWBMe2DUb+T6HX2pzqTy6 +1HAUGiaH+6zy1xyN3ulxrWYHKa0AAAAc6jR+kL58KHXR/h22IrR2ODfF4npgNzED +SMGqEQAAAQAgQglMy8i4cj/JKMEv2mcbgylemcdDV29EUEvhGGMjMZtQAtJPFz35 +CeokHW6lKJkE7kY2IEsvvpSwaP4JP3liV5VJVR068hmtjtGZOe/4a87INN4vL3hZ +bonny1LFJOF3CYpWwjLrH1Y6qEvGsCbe7m/1HLRB4IDy2vrqHO2GQn0cNGvlXGaA +PUt20TPNRFtMNIL6QVAjRjyb8w8veEIj4mBX06oNf7tmBjDFLknUoDJcc4ngcqo0 +nxPJZuFZdS+7cekzaJD5MkP6bnLSmTZe5bP+Jm6/ERBWj+5EJchHtQIQvUhLl0Ma +QoVq3KPn0anJxnXH4maRgyDdWnikjEipAAABABrhDHhq0JAsXGhdrlxxIUGKN3uI +i18vK8dmI1cP1ivLGQtHGtU1nF8GL4gZKJ6VbYqm+Q0fjPHuctOhvf1WxHjcKaGc +RWm1pg46jzT2BlbqxbJd3lUUpcZ7Z1QjIE9syvCZBhfMc1W50+2GiXiiUgIKdp7V +mm7apu/jN37vRfP28+ZBecx9uLFD+4NcXXG/z6HiqQSbzPf+mrV1RiIP4/S3UhyG +FznROFB+gaRqaZNgVEHcuQ1u5K+8Qsq+kKJUREloEJ1+3ZaUoCMjnx1WF13R+sEV +kV4k+rVj9Pw/JpvtLzAIMtESWWSFpxFBeqc7tKxyplGh+luu02Nscg05cAgAAAAc +e0iQIVeOeee9PuerRW9lnz3AfIj1yaOeT4zugQ== diff --git a/security/nss/cmd/bltest/tests/dsa/key8 b/security/nss/cmd/bltest/tests/dsa/key8 new file mode 100644 index 0000000000..e7e72bd30e --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key8 @@ -0,0 +1,18 @@ +AAABAKTH6qtCxMc7dXdwkWSJ8XzVByXNCkvE4c9n92O4wd4tbauYVrqvsAjzZbGK +QuFNxR81C4jsoCCcWqT9caepbHZfWQHCHnIFcNeDe+x8dtLkk0RzHKOUBdCoebng +3NGoEl/RMOweeD5lS5TjAC5rYp6QSrOHeGdyDL1UtCcKnhXNAox8x5bwbCcqZglR +ko/b6y3KBhtB6TIlcwV0L/FuL0KRkdXl8abd9ueMXXciz/gKnAvVyNeuuowEQ4mS +sHXjB8FTTEmtOA9Hf195h9wXLBYdyjjcrz+zhGxyyRGaUpmtx0iVGz3ODQDUqQE4 +ALIAggO3JGW8aoSuBZowxFIt6lcAAAAczon+MyuOTrPR6N3OpdFjpbwTtj8WmTdV +QnrvQwAAAQCMRl7fWhgHMCkeCA38U4U5elAGRQ26Lv4BKSZPvYl7tVecoOqxmqJ4 +IgQkcktPKm9u5jKEMqv2YTgGRglyM1BTOcVRnTV9cRK27sk4uF1ap1zC44CS8KUw +rLVOUP6CxNVi+w8wNrgLMDNAI+u+ZjegAQsAx9uGNxFoVjZx4eDwKK7b1F0tVyYh +pgmYKgc+Uaridwevvu8p4uzuhNem1do4K+OjX0K2xmhJICqxnQJbhp0Id2R20auY +FHWtKtLz5v0H4waW2QpiaBbfYNbKev17SC+UL4O0XMgpM3Mfh/ruMgkA8qo+cLGG +fhQw5AvmfAf5KQKZ7wZ7iySnUVs/mSwHAAABAHSKQCNyEaLZhSWW56iR9D1OsO5I +gmyc+zNru2jb5aXhay4ScdTRPeA2RLuF72vlI6TU2IQVvNWWuo4KPE9kOemB7QE9 +fZxwM2/r99Qgz+0CwmdFe7Pz58ghRdKvVIMLlC7HSl1QPkImzSXddd7NP1DwqFgV +XXvnmUEINt3FWc6Z4a5ROAj9rqw0hD3XJY8W9n8ZIF9vE5JRpBhtqEltXpDT/s+O +0Qvmwl/16zPZYMmo9MWByMckykO3Yen9ta9mv/udLrsRprUEofvk+DTstqwlTKtR +PpQ7mpU6cISzMFxmG/rUNPaoNVA8mt5/Slf1yWXsMB7N6TjuMbTesDivl7MAAAAc +VRWV7MuwA7C/jd2hhKWdpR5Fmg0oIF5VkspMsQ== diff --git a/security/nss/cmd/bltest/tests/dsa/key9 b/security/nss/cmd/bltest/tests/dsa/key9 new file mode 100644 index 0000000000..1ab8a0c90a --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/key9 @@ -0,0 +1,18 @@ +AAABAKa7UzPONDwxybLIeKuR7vL96jXG2w5xZ2K/wNQ22HUG6GWk0sjPu9Ymzov+ +ZFY8pWhs2M8IFJDwJEWyiQh5gklftpl2sQJC1tUPwjtNvbC+94MF2aTQXZ6uZdh6 +iT6vOX4E45uqhaJsj/ve8SMyh7X1tu9qkPJ6aUgaky7kexjV0n6xB/+wUCXmRuiH +a1y1Z/7B3TWDXUIIIZhTH6++WuKAxXWh+w5i6bPKN+GXrZbZ3eHzPyzsfSferiYc +g+6OIAKvfrboL2oUeWrwN1d6EDK7xwkSnKq9it34cK4tBZXI/bNxVXSPDeo0tE1P +gu1YwvWxuEgWYqxTRzxpNBAIL70AAAAcjD7lvZoqrwaL1YRb1V7PJ0FwVTB1d7vD +dw7GiwAAAQBDtaa20LuWLsl2ajd8MsxBJPExEYjC7PlcDNSk+glyJbdhjLEnbEdF +eNO/VkwUUZnAkqGxS6qSnC8/DzbgwtrpHroIvjCZKoifKVLgRCw3r0hKTs3DJDzP +y540E89c3WYwsJ/hfvv94U2HJUkwGbe3PR94K0jvML7DbgDgK6M20iVPwgKmlhLN +lEb5HXa3Of+m2LhgUvjcXxFFgBxWJBr1upA3JBvYnmM4tY4BMQZxwmjrXjOstX0f +mfFkQKZ1gn1AF3VNYBoXraL77fkEVUqQsBUw2oyTzRTOKTyyvT55N+k0t54xD+TY +DBP5L2M4E1W9gKGr7hpz/fttok7ygAKjAAABAGR5ebeWDOe5cf8OX2Q19CpBsYyd +4JowERSgE6fNARg/F2+Ig4N53LTvtn2up53vPwQsvPnMUDtMIVGiNk98lDexlkPm +fiSja6xKTPopPe7fjsaxVKMqpymF99jeI1M0tUbCne9FjFXQxcCsXXTiAk7H1KvC +/aUWoqCxpNiGrZLCBHB4KKT8d5T2DuikvhEByeVRj34Z7r1HXy3m9rqJwovRKfE5 +k77+WBhEAxmnlUmDMZY0KjHbr315SX3sZe59vvcOWPmdBZX2pxFAmt4xUdRVY9U8 +HNCoqxoYvv9lAsuwwGmxFOp753iY0PTlSZkboLNolxsQcuzkr8OA6a4ymlAAAAAc +TvpRNutqp06Su/yROwv+u2E9t6RyIft7ZPQubw== diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed0 b/security/nss/cmd/bltest/tests/dsa/keyseed0 new file mode 100644 index 0000000000..6eea359dbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed0 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed1 b/security/nss/cmd/bltest/tests/dsa/keyseed1 new file mode 100644 index 0000000000..6eea359dbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed1 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed10 b/security/nss/cmd/bltest/tests/dsa/keyseed10 new file mode 100644 index 0000000000..054c192d98 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed10 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed11 b/security/nss/cmd/bltest/tests/dsa/keyseed11 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed11 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed12 b/security/nss/cmd/bltest/tests/dsa/keyseed12 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed12 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed13 b/security/nss/cmd/bltest/tests/dsa/keyseed13 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed13 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed14 b/security/nss/cmd/bltest/tests/dsa/keyseed14 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed14 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed15 b/security/nss/cmd/bltest/tests/dsa/keyseed15 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed15 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed16 b/security/nss/cmd/bltest/tests/dsa/keyseed16 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed16 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed17 b/security/nss/cmd/bltest/tests/dsa/keyseed17 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed17 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed18 b/security/nss/cmd/bltest/tests/dsa/keyseed18 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed18 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed19 b/security/nss/cmd/bltest/tests/dsa/keyseed19 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed19 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed2 b/security/nss/cmd/bltest/tests/dsa/keyseed2 new file mode 100644 index 0000000000..6eea359dbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed2 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed20 b/security/nss/cmd/bltest/tests/dsa/keyseed20 new file mode 100644 index 0000000000..cde1798da8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed20 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed3 b/security/nss/cmd/bltest/tests/dsa/keyseed3 new file mode 100644 index 0000000000..6eea359dbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed3 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed4 b/security/nss/cmd/bltest/tests/dsa/keyseed4 new file mode 100644 index 0000000000..6eea359dbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed4 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed5 b/security/nss/cmd/bltest/tests/dsa/keyseed5 new file mode 100644 index 0000000000..6eea359dbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed5 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAA= diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed6 b/security/nss/cmd/bltest/tests/dsa/keyseed6 new file mode 100644 index 0000000000..054c192d98 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed6 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed7 b/security/nss/cmd/bltest/tests/dsa/keyseed7 new file mode 100644 index 0000000000..054c192d98 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed7 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed8 b/security/nss/cmd/bltest/tests/dsa/keyseed8 new file mode 100644 index 0000000000..054c192d98 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed8 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== diff --git a/security/nss/cmd/bltest/tests/dsa/keyseed9 b/security/nss/cmd/bltest/tests/dsa/keyseed9 new file mode 100644 index 0000000000..054c192d98 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/keyseed9 @@ -0,0 +1 @@ +AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA== diff --git a/security/nss/cmd/bltest/tests/dsa/numtests b/security/nss/cmd/bltest/tests/dsa/numtests new file mode 100644 index 0000000000..aabe6ec390 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/numtests @@ -0,0 +1 @@ +21 diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext0 b/security/nss/cmd/bltest/tests/dsa/plaintext0 new file mode 100644 index 0000000000..48fbdb6fde --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext0 @@ -0,0 +1 @@ +qZk+NkcGgWq6PiVxeFDCbJzQ2J0= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext1 b/security/nss/cmd/bltest/tests/dsa/plaintext1 new file mode 100644 index 0000000000..f7b1badf6e --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext1 @@ -0,0 +1 @@ +WEKejzcfnh1ppb+WpVTWJ8/VSFw= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext10 b/security/nss/cmd/bltest/tests/dsa/plaintext10 new file mode 100644 index 0000000000..08d653e66c --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext10 @@ -0,0 +1,2 @@ +rBhknAaqqqlnKm/advb86OGGUVWFcbz9ihmsNZcQniSGMCNRB1ROUVCb5azZuiZ+ +4ImIYj1aymGnxDoIS+YZng== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext11 b/security/nss/cmd/bltest/tests/dsa/plaintext11 new file mode 100644 index 0000000000..05f0054e57 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext11 @@ -0,0 +1 @@ +PlUtQFJV4fg6RHC9IFSw1nSy/dY= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext12 b/security/nss/cmd/bltest/tests/dsa/plaintext12 new file mode 100644 index 0000000000..639a7cce7b --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext12 @@ -0,0 +1 @@ +tGiqjB9KQERHn6GvDD8iHrgM5nYcmcaGbRp9nQ== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext13 b/security/nss/cmd/bltest/tests/dsa/plaintext13 new file mode 100644 index 0000000000..924d0edc29 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext13 @@ -0,0 +1 @@ +CrhLNBzxdeOM06JwSiDHlsHH0AlCJKHkdpQvJw4OTio= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext14 b/security/nss/cmd/bltest/tests/dsa/plaintext14 new file mode 100644 index 0000000000..967d952be9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext14 @@ -0,0 +1 @@ +4II54Zw0xvxpgkZbrlGIWAPGug2Ih8VgwXb+NG3cRkcdkNR5SHsy/jDgrlTYQGn/ diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext15 b/security/nss/cmd/bltest/tests/dsa/plaintext15 new file mode 100644 index 0000000000..a702f7ed22 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext15 @@ -0,0 +1,2 @@ +OfmOLA3KSs6DsKB+owDqX4JKdU9bT3xwUOJzPGkrsyKo3mur8w2dklEbOObDF5zg +XxEGB/8DFIp8sCqeP2qewg== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext16 b/security/nss/cmd/bltest/tests/dsa/plaintext16 new file mode 100644 index 0000000000..dfa0cdaa5d --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext16 @@ -0,0 +1 @@ +mbNzEDnv9o8UR+5qjp+UCBlCe70= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext17 b/security/nss/cmd/bltest/tests/dsa/plaintext17 new file mode 100644 index 0000000000..ec01a51bda --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext17 @@ -0,0 +1 @@ +INmoiblVarLpT/1EghXog/90qXfqHhqcQlUsmg== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext18 b/security/nss/cmd/bltest/tests/dsa/plaintext18 new file mode 100644 index 0000000000..84a9856298 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext18 @@ -0,0 +1 @@ +b5h4y7cMDS2TQtEP6tSlMuxCp3q1hlT3LLt7noMBKrA= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext19 b/security/nss/cmd/bltest/tests/dsa/plaintext19 new file mode 100644 index 0000000000..aa054c5cee --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext19 @@ -0,0 +1 @@ +kYTu+RQoZJZSUNshOvoBQxBj2N7aAyjFYJzs0WWVBdRaLlujVOVu2dlxGwJktm9M diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext2 b/security/nss/cmd/bltest/tests/dsa/plaintext2 new file mode 100644 index 0000000000..bf54afc074 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext2 @@ -0,0 +1 @@ +IDdekD+X/lylh+t2yXvLHboeHUZAZUozsUU48g== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext20 b/security/nss/cmd/bltest/tests/dsa/plaintext20 new file mode 100644 index 0000000000..20c8ee2c35 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext20 @@ -0,0 +1,2 @@ +Q6bpLpUVhU3Sjdd4YG4BnAfUf4u6TrwCAzmSB0q66YryvQBzf3fQ3H4fp4GVuYRV +ftjzEtAhCf9OYBtR4GSnvA== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext3 b/security/nss/cmd/bltest/tests/dsa/plaintext3 new file mode 100644 index 0000000000..a8ec5df961 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext3 @@ -0,0 +1 @@ +Mqqlk48AsWXhRAWNXCGQuvRpPAwqfbTlmnfsFKcKblA= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext4 b/security/nss/cmd/bltest/tests/dsa/plaintext4 new file mode 100644 index 0000000000..46644c0d56 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext4 @@ -0,0 +1 @@ +w8+3pOAcqljMh1bLGnWAWlZvlgnJhOJDBC2C0M3mTFrCeylP+FfUSfGfRD2uDS2f diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext5 b/security/nss/cmd/bltest/tests/dsa/plaintext5 new file mode 100644 index 0000000000..631d1eb9e5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext5 @@ -0,0 +1,2 @@ +PiPosk1QVF3Ck1taH0AunEzHuPxBHnFMTKPWBsxTI9YdZ5XAEzt5QPHQKm7ja20+ +bmsWwSw++jcz8N2DY6WW2g== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext6 b/security/nss/cmd/bltest/tests/dsa/plaintext6 new file mode 100644 index 0000000000..f62997be73 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext6 @@ -0,0 +1 @@ +uCkA/iALiJlpG34VqA2JNi5cqJY= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext7 b/security/nss/cmd/bltest/tests/dsa/plaintext7 new file mode 100644 index 0000000000..c0f0aa06a6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext7 @@ -0,0 +1 @@ +KfVXa9k+jC0vrKPpgWQNMrHmPXpYTROh7YXBMw== diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext8 b/security/nss/cmd/bltest/tests/dsa/plaintext8 new file mode 100644 index 0000000000..9c053cbf87 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext8 @@ -0,0 +1 @@ +GC7dULJ04jKDdn7fzRjVyUZm7aDbl31cEJU6STyznuA= diff --git a/security/nss/cmd/bltest/tests/dsa/plaintext9 b/security/nss/cmd/bltest/tests/dsa/plaintext9 new file mode 100644 index 0000000000..c0378ae026 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/plaintext9 @@ -0,0 +1 @@ +hV6v7+GSeeSI2lL+Nu9CJCNoU2pR8eyGkOsfOxb2lBZ42gDIglCTvg88E4ocTsam diff --git a/security/nss/cmd/bltest/tests/dsa/pqg0 b/security/nss/cmd/bltest/tests/dsa/pqg0 new file mode 100644 index 0000000000..f16326cccb --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg0 @@ -0,0 +1,4 @@ +AAAAQI3ypJRJInaqPSV1m7BoacvqwNg6+40M98u4Mk8NeILl0HYvxbchDq/C6a2s +Mqt6rElpPfv4NyTC7Ac27jHIApEAAAAUx3MhjHN+yO6ZO08t7TD0jtrOkV8AAABA +Ym0CeDnqChNBMWOlW0y1ACmdVSKVbO/LO/8Q85nOLC5xy53l+iS6v1jlt5Uhklyc +xC6fb0ZLCIzFcq9T5teIAg== diff --git a/security/nss/cmd/bltest/tests/dsa/pqg1 b/security/nss/cmd/bltest/tests/dsa/pqg1 new file mode 100644 index 0000000000..0c09290dcc --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg1 @@ -0,0 +1,6 @@ +AAAAgKj5zSAeXjXYkvhfgOTbJZmlZ2o7HU8ZAzDtMlaybQ6AoOSaj/+qrSok9HLS +VzJB1NbWx0gMgLTGe7RHnBWtp+qEJNJQL6AUcudgJBcT2rAlrhsC4XA6FDX2Ld9O +5MG2ZAZusi8uO/KLtwoqduT9Xr4tEiloG1sGQ5rJx+nYveKDAAAAFPhfD4OsTffq +DN+PRpv+6uoUFWSVAAAAgCsxUv9sYvFGIrj0jln4r0aIOzjnm4x03urp3xMfi4Vu +OtbIRV2rh8wNqKyXNBfOT3h4VX1s30CzW0oMo+sxDGqV1ozihK1OJeooWRYR7gi4 +REvWSyXz98VyQQ3fs5zHKLnJNvhfQZEphpkpzbkJpqOpm74IkhY2gXG9C6gd5P4z diff --git a/security/nss/cmd/bltest/tests/dsa/pqg10 b/security/nss/cmd/bltest/tests/dsa/pqg10 new file mode 100644 index 0000000000..6654a09f37 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg10 @@ -0,0 +1,12 @@ +AAABAL/r0ACy1s1Ks477o13zNN9yHWwvKz2VZnnLrQCfPfvQApUsyJnMI1bsh2m9 +PRulpzAjcpiI2pLKSKXulMl/TwSi46y08zovD7N4PDHyxw+nxw84IUon2t7IsS5n +mWqehe47sUiAMTAUc5LcUlPATXBjU15s1ka/sYaYTgi1i3SnvlszO/MrCr/VZlNg +6akjoMUo/xxixyU0WPVnhShxnUNuUBSHQfRdx90sbKxxxVIx8SqD/v0u0KM+3huK +UfVm/PeJBoLNwZMdwgfJK/LvTiirMWYe63fxYB7qlByVkfA40/ANkShX2wXmSyrV +aTIAYcb4Y/8zVNhC5+fqcVr++NEAAAAcqpht+KBkJ46TYzFqmDC8+kkGVvqm1dqo +F9h5SQAAAQCBla2aR4/ZhSFu5YNoNm0u3RPBKz1iI5Fp+gQtkRVkCLSDEi9E7WI2 +uDCKbNtS+a896I7IngOa+tfaOqZsGXYEmo4KfRjVZ7r5n87+MVytoBVIOGsQsl5S +9S7XjrTSgILl4f/ulIDE/izEqv0e/J1P0sxtFVlokxJx7xWzJA5/sEOoDI9ii+/g +nWRQd8ECnSHgrIvwupwncU0bWA7eWUqgGzt29udF/B7AfbN+L9fpjGyMaRUijkIs +MJ3p9dsWj1AknRvh7TKYCQgI4uu4lrt5uMTL+U1MIGTjfmErpESdesIQ7d4hFBbW +SwUd2ARqsEFzJmVBGn8VTTGz4RpR2n/A diff --git a/security/nss/cmd/bltest/tests/dsa/pqg11 b/security/nss/cmd/bltest/tests/dsa/pqg11 new file mode 100644 index 0000000000..a0a47d4539 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg11 @@ -0,0 +1,12 @@ +AAABAMGlnSFVc5SeCyCpdMLt8uMTf/JGMGL3Xx0T3xKroQdrstATQCtgr2wYf7D6 +NiFnyXbCYXxyb5B38J4YwRtg9lAIglvWwCofV9PrCtQc1UfeQ9h/JSX5cdQrMGUG +58oDvmOzX0raFy0KBpJEQKFCUNeCKsLVrq/tRhnnnUFYp9XrLZ8CPbGBqPCUssbL +h8uFNUFqwZgT8HFEZgxVd0X0SgHGsQKQksEpsNJxg+gsWiGoAXfudHbrlcRm+0cr +09LcKGziWEfpPL+prTnMVwNdDHtkuSapx/WnsrxavL+9wLDj/t48HgLESvyK78eV +faB6Dl/RIznbhmdhb2IobfgNWKsAAAAggAAAAAAAAAAAAAAAG9YsZei4fIl5f48M +v6VeSmgQ4scAAAEArqWHh0DxQk08bqnGtHmWFdJ0kpihfiYgf3bO80Dd05Dhsa1r +bAAQrQFaEDNC3dRSysAks25C2bjtUvr656HTzp5LIfkQ0TVusWOj5agYTHgb8USS +r6LksKVtiIT9AaYouWYnOcQuXFeVreL18n5t4dljkXzogG/EDQIc2HqjqjqeTwws +TEXSlZsleLL7GiIpw34YEFm51ee3hi+oLiN3pJ7Q+dyoIKWBQHndZhBxTvr4sMxo +PY5y5MiE5vnUlGs+jUy7kq2759TEfMML5/jDfKgYg6GqxoYAWf9GQKKcyuc94gsS +5jsAqIsu6bqUt160CmVuFdnsg3MchdDv/Lnvnw== diff --git a/security/nss/cmd/bltest/tests/dsa/pqg12 b/security/nss/cmd/bltest/tests/dsa/pqg12 new file mode 100644 index 0000000000..b62db4b953 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg12 @@ -0,0 +1,12 @@ +AAABANAiduvzwi/9ZmmDGDpHrpTJvMvL+V3ctJHR985kNUkZmZLTfHnnsDLSbtAx +trpEifMSWCb6+ycmqYMz69mr3eWS2Gk9mFlTbZzDhBodJOBE01rO1hNiVvxta2Fc +9PQWOqOB6ytMSAglqOzMVtjdz1/mN+OK2bKXS9LPaL8nHg0GfSRlqLa2YFJPAIJZ +iUWtpY6mSbmATrR1NAjCxZdoxGq7guMpXz2cpGn4TMGH9XLcS1o7OTRuyDnfrW8H +1tHw4hUgm7DswFx2fPLnlDrJz7Au7h6e9ZRujOiDFrXhX9z5WhMu8uS7CBcTZSjP +pd2WUy+cOr5cQhYg7ba8vVIjTKkAAAAggAAAABKZfoKF5AiXCPUoBwxtevigvQFA +nnoHnNtvxbsAAAEAd4RTBJ7yYhR/7XtZsO5nZGB8Uee1tfxv6np6ex3Wuyg/Sprp +jv05ZLFVZ1jLFbKlOvhhnnTYWJi+x307PzgklK5ZYaE//HRdo4YYIpFRmAD5ndcQ +4ArrFa3uCI4nmO4uRvWYUmzw9GZwVdG6AJdQBB3FzdJyX/HZfdNAyFGK92cbh9Od +Z67O2Etm+E4HAe/IKlye+VTuV20kw4WxTWMDfw2Gb9QktJdb3VSF7XQMuTLoQ/kG +aD98eyx0d12QHDYbhHtRnA2mmWONpAvXNreD0nELLCzCbvkScb9OLBkp+HbpAuIF +cWQiO8eNaiufbAx6fLhZIvfWxCh64jhh+BKISA== diff --git a/security/nss/cmd/bltest/tests/dsa/pqg13 b/security/nss/cmd/bltest/tests/dsa/pqg13 new file mode 100644 index 0000000000..3f01b91a74 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg13 @@ -0,0 +1,12 @@ +AAABAKittsC0z5WIAS5d7/GocdOD4OKoW16OA9gU/hOgWXBeZjIwo3e/cyOo+hFx +ACAL/VrfhXOTsLvWeQbAgeWFQQ44SA6tUWhNrDo497ZMnrEJ8Zc5pFF819XWKR6K +8go/vxczbHv4DucY7gh+Mi7kEEfavvvMNNELZrZE3bMWCijAY5Vj1xmTomVD6tt3 +GPMXv12Vd6YVZWGwgqEAKc1EASsY3mhEUJ/gWLqHmAeSKF8nUJaf6Jws1kmNs1RW +ONU3nRJdzPZOBsGvM6YZCEHSI9oVEzM6fJ14Riq6qzG5+W1fNERc62MJ8vbSyN3g +ZEHoeYDTA++aH/AH6L4vC+BswV8AAAAg5x+FZ0R/QudfXvhcog/lV6sDQ9N+0J7c +P25oYE1rnfsAAAEAW6JN6WB7iZjmbObE+BKjFMaTWEL3q1TNgrGfoQSr+12EV5pi +OyV0s30izK6bPkFeSPXA+by9/4Bx1jubuVblR686jfmeXTBhl5ZS/5a3Zcs+5JNk +NUTHXb5bs5g0UxlSoPtLA3iz/LtMi1gApTMDkqKgTnALtu1+C4V5XqOLG5YnQbPz +O53eL07BNU8J4ut46V8DelgEthcWWfiHFc4amwzJDCfzXvLxD/DHx6K7AVTZuOvn +aj12Sqh5rzcvQkDeg0eTflqQzsn0H/Lya42pqUoiXRqRNxfXPxA5fSGD8bo7e0Wm +jx/xiTyvaagngC97akjVHab777ZP2abFt1xFYQ== diff --git a/security/nss/cmd/bltest/tests/dsa/pqg14 b/security/nss/cmd/bltest/tests/dsa/pqg14 new file mode 100644 index 0000000000..5b04b1e93f --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg14 @@ -0,0 +1,12 @@ +AAABAKYWfBb/904pNCuFhq7TzYlvexY1oihv8W/f9BoGMXymsFyiunwGCtbbFWFi +HMsMQLhqA2Gb//MuIEy9kLedy1+G67ST470ZiNgJf6I/pNePs83csAxGZCPY+nGY +c8N2Rf5O7MVxcbvt/lb6lHTJY4W4ujeMeZcteqrmmiumTN6OVlTw97dFUM00R+ek +cqM7QDfbRo3eMcNIqiXoK3/EG4N/f8ImphA5ZuzY+dFMLTFJVW1Dgp8TdFG40g+F +ILDOjj1wX3TQpX6ocsK97pcU4LY5Bs3f3Ci2d30ZMlAA+O1SeOxdkS0QIQkxnLo7 +ZGnUZykJtPDb7sC7tjS1UboM8hMAAAAghCdSkETSFMB1dPezWcLgHCP9l3AbMorI +wThbgcU3OJUAAAEAb8IyQVwxIAz1I680g/jias6AjS8caouGOrBCzH9rcUSy05Ry +w8tMdoHQcyhDUD2PhYy+R25nQDJKqilZUBBZeMM1BpuRn/mm/0tBBYG4BxL+XT4E +3bTf0m1ef7yisMUtjUBDQ9V7L5sqJtqn7OMM6rnheJ+XUaqpOHBJllrzJlDGyls3 +SlrnCz+Y4FP1GFfWu7F6Zw5uqviYRNZB4eE9Whsk0FPca4/RAcYkeGlRkn5CYxCr +qUmKAEKz3Hu8WdcF+A2bgH3kFffpTFz514mZLTu4M20dgIy4a1bd4J2TS7UnAzki +3hS/MHN2q30i+81hb57aR5qyFKF4UL3QgCqHHA== diff --git a/security/nss/cmd/bltest/tests/dsa/pqg15 b/security/nss/cmd/bltest/tests/dsa/pqg15 new file mode 100644 index 0000000000..ecc45f342c --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg15 @@ -0,0 +1,12 @@ +AAABAPY9o76alhYZbGVW885v2LmL3akTdHPaRv7ZcOK40Uc4eoGSIGXVKKfWQz68 +XjWxXGfqNaWlv/W5zvHNHm/jHdpSg42jqom5tOjZ08BzLMxPI4zhtBbEypPyxoAO +X07UHE92Fc7FUxuYaAsg3GP3PnDYA6rPrs4z1F+g4513yFCCCVKLkEa1kXAQeRI0 +OX5BLSK8C41ny9HNKKMsJGCgvYaqug7qgOFuMkVkMXHjQiF2DCA6VrggehAJ5sGi +9s2oX4XE+eQQuUmSM8DuBy5GWvT7T7koLFwQ6CNP1jDqkvCq5rl6Ug2zRHVwe3mk +wXUmXANWzLyoJ+ODffPW0FdtkHkAAAAgm3Rj+CafC5CavtEJkWhPNqZKyGTg1tcX +wO8hV3pMOQcAAAEAlyp19gboqjqR/wj9Exog9ZYyUTBOPRQxtxL6CAPVJ/1xD7fr +J+UpBJcc1DypdxmaJNvutLe8K6B107cutrLFrY8Oi49IxQtVTH4HEfTHQWMwgGZy +SY9DApJyS/mKjqSMf1PXsx2LdSixpvCH0sJ8M1ICg1seMUIls3rvi/zsfYCSDEpG +Cj1oNE3tde2e6Gf6KmlFBjiU9WO2hjO4s5+DoaqvWpbH9CJofnyEz4+4zF9FBN/w +h7yyapW7+Fg/A7Og5Do1ayvX4lzd33oBUwD67MZ5PF7pm2Mny4RW4y2RFTOdWmtx +K3+dAwGssFEz4xFeRU06bdJKFpPJSqtUBlBL9w== diff --git a/security/nss/cmd/bltest/tests/dsa/pqg16 b/security/nss/cmd/bltest/tests/dsa/pqg16 new file mode 100644 index 0000000000..e298647ebb --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg16 @@ -0,0 +1,17 @@ +AAABgP1abFbdKQ992Eop3hcSbrTkSHs+/wpEq+XFl5LS4SALnD20TVKLn30iSAMu +S6D3v8T6/HBr5RHbInbAt+z/042i4cLyN6dTkMHk0yOcuo4g5VhA7LBd9fAaG2l3 +rRkG8stUTM+5O5Aa0JZrGDKtLatSYkSjFWyQXAGsUctzudzZhg1WF1pCXYRkhdmx +9EqKDCV45s9hlHvBoTkv3TILFqnXBFX+Q28tR97Y6OYF90hutXjqf8T/0TwH+Zlq +8Vn9QR6UUUAyeN0RQajJJrNcljhLvWvuCcRvRMNrH/xxl/XpJdvgVEpo5quMGOQm +pGazkvnCfdef76nKFjzFo3VTmoVZ8nf2V6U10ZZMal6RaD71aY66oB74GNv3LLBM +P/CS0YiGbyXNQFEI9Wawh/c9LVvrUfrG3oSuUWGmavlgLH5L/BRvSCC9/Akvrqxp +Ez5KCKWyAqEkmKIuV7rVRnTtS1EBCdUrX3TnDh9vghYXGM1M8AzJ8ZWKzIvdzfvR +++Rs0QAAACCAAAAAAAAAAAAAAAAzSibdj0nGgRzoG7E0KwbpgPZLdQAAAYCZqwMK +IaXJgYF0hyFnZByBweA8mydM+8J7xHJUKSd2beX6BTmztz8/FqyGaprsi0Rd7Zf7 +/wiDTtmMd+f8ieXcZXvvdm/3+/jnaHPhe+5BJ2LVb+EUF2CrTSW6/Utu8ltJo1Bm +MtH44Qdwkwdg7BMlkyxaS6+ekBVCZN30QuxcQf7ZXRFSUVHbz7N1gUm62Bxiuc/3 +gWuPlTuLfAIlkNFYTpIdyVX1MorHKYPtXPDQQFb+DVMeYvj2yas8D81E4UhgtzEd +JWHHfB0y9sadyPd5aMnYga2dteDBFP2oYovKAzXrf7nhXmJaq6tY/AEZTIG/b7LO +VAd7giUOV8ansl3rbuOdS2hqXDB6dhKy2F7pJRJBPeopfkTzF75863CjMorwtAEA +GkGFYrj/5Ol3G0tKjgtAx5E0nV1ORZ/mIKGi/HLi9sooVn1MJjK73htJhkwGuxJh +nxMsHaj1ce9hPqxzn2arORTLP6GrhuBeUILrqiTr7qTPUb7vwn31Ev4/7n0= diff --git a/security/nss/cmd/bltest/tests/dsa/pqg17 b/security/nss/cmd/bltest/tests/dsa/pqg17 new file mode 100644 index 0000000000..fa1b638bce --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg17 @@ -0,0 +1,17 @@ +AAABgPY7PN1kbY5921chaqbuwhNNcHSIofKc+plwZF8SJ+pdsuMY7qXaFofH7ZBQ +lmk0XtYTTP8yIDq3Kuy/ppPSFq61XY0oqYH0q/8H0TGaeZvl3XRvhIQoF5KcMFtA +hZivEgRdqi8czIvk2BtRPGMPAX/sFlisoQihr2Eg7AXjAYxCU8ndNbzgYrc9DyqT +1BxIGlxDu5eQloLTmppg3Dw142N13sbO0NLbO6DREb7epwGg5HU2JJd6nnW3CnTi +uB44pSqyLaExs1QW087JZjB5dGp2NHbldZgULjmGFUXar404oXbybHH1r+vZxWIN +qAzzRStVw3xmG0oewDUXELneSjy+C5i02eyJEo2Xqn77GduLpDzAviXCAPkOFQbL +eOwMM216lWE9QgTo7WjQ8KbHhCAQWo0tQ4+9JVGmShoLA/+4eHQvjJl5z6hzlBUC +gZmNUXAdX8+paWpJif0l9ACVXmJrGr6SbAr6aappgZAO/83QMFkvgrIEKkeppajL +AoPcTQAAACCAAAAAukY0tfpNoFS9DKSK5JDldxHzgRk4QkKRWbp8oQAAAYCK1FU8 +TkmqJHKKtQJEF7Ey0spTpV2VlFjy91mtsENb7u+jos/NADjiQgZD/EpN7rXZ/qoe +3yEZO0DhS0KYKpTzXFi4EUfXGJ0mPJsS/mOrn6X28DooYMGGQy46sE8qsPL7YUe9 +m/ftXSBxO52iE4Piw6Fo59CdPYpaBY/SMJW1rP64ZKMwa+JCX6GtMq1tk4LmA7A8 +aK9K8CRjlxAsQVXLqBGr+Z2ng553surJlwWIyh0KI2FyOhZKySKcLoDc+o20+eKY +A+/7MWjH/tejpt5A3aGaBTavm1t6+u+5xw1q6N8S2mWPYjYEOuqHPbKc628H0Qj1 +IlaHvQww4whOIJC0WuL5Kpe47LepcFxJVrizHEo9YRB8hOR63abIDV0i2rPYWSIP +nVqrE2d6498WjwwXbRdrVFBsY5hT8E3e8nIvOcGOXOQm4UVirY/yYkeviIcO+3LA +zOg23o/uZ6ZiN4JFtQK/H4MJmYigk8583IE2THix9KUbgA32E3xx1l5rCJo= diff --git a/security/nss/cmd/bltest/tests/dsa/pqg18 b/security/nss/cmd/bltest/tests/dsa/pqg18 new file mode 100644 index 0000000000..cd7ed66ab7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg18 @@ -0,0 +1,17 @@ +AAABgMe4bXBEIY42dFPSEOdkM+Tiepg9scVgu5dVqPt9gZkSxWz+ACqx/z9yFluU +PAso7UYDmgfeUH16Kfc4YD3s0ScDgKQflx8lkmYaZLovNR2aaeUaiIoFFWt/4VY8 +S3fuk6RJSROEOKKri9z8SbTnjRzedm5UmEdgBX12zXQMlKTdJaRqp3sY6dcH1nOE +l9Tqw2T0eS2XZqFqDiNIB+lrjGTUBLvbh245tXme9T/my5urYu8Z/cwr3ZBb7aE7 +nvesNfH1V8sNxFjAGeK8Gan138Hk7Knm1GZWQSQwSjHwOGBaPjQtoBvhwrVFYQ7d +LBOXo8g5ZYjGMp7+tOFlr1s2ijmojkiI459Auz3k6xQWZy+Zn+rTeu8cqWQ/8yzb +wPzr5ijX5G0oGpidQ90hQyFRr2i+P21WrPvbbJfYf8teYpG/i07hJ1rg60ODzHU5 +A8jSn0rbalR+QF3s3/KIxfbHqjDcsS+E05JJOnCTMxfA9eZVJgH64Y8X5uW7a/OW +0y2KuQAAACCHb6CeHcYrI2zhwxVbpIsMz9op86xal/f/ob2Hto0qSwAAAYARCv67 +Esf4YrbeA9R/28Mybg1NMbEqjKlbLe4hI7zGZ9T3LB5yCXZ9JyH5X72aTQMjbVQX +T7+v8sT/ferkc4sg2fN78KETTCiLQgrwtXkuR6klE8BBPzRqTturLEW9yhP1NBwr +Vbi6VJMrkhe1qFnlU/FLuMEg+7nZmQnf9epo4Us3mWT9Pzhh5bpcyXDEoYDu9UQo +cDlhAh571oy2N5J7jL7mgF+icoW/7k0e9w4CwaGKfNeL7x3Zza1F3enNaQdVBQ/E +Zik37h1vTbEoB8zJW8Q18Rtx5whgSLHatZE8YFUBLeguQ6TlDPk/7/Xcq4FKvCJM +XgAlvYaMP8WSBBu6BHR8EK9RP8NuTZHGPuUlNCLPQGM5jXfFL8sBFCfL/PpnsbLC +0apKPacmRcscdnA2BU4vMfiGZaVEYciF+zIZ1a2HSKARWPbHwN9ajJCLqMPlNoIk +KIhse1ALvBW0nfdGud5aeP47T2mR0BEMPL/0WAOdw2Jhz0avS8JRU2j0q7c= diff --git a/security/nss/cmd/bltest/tests/dsa/pqg19 b/security/nss/cmd/bltest/tests/dsa/pqg19 new file mode 100644 index 0000000000..cacd4e4aad --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg19 @@ -0,0 +1,17 @@ +AAABgKQQ0j7ZrZlk0+QBy5MXolIT91cSrLxcEhkavz8cDnI+IzO0nrH5Ww+XSNlS +8Epa41iFnThEA842SqP1jdl2mQm0UEhUjFWHKmr7s7FcVIgvlsIN8bLfFk8LrISc +oXrS32Or11yIGSLnmlAJ8At9YxYi6Q5/pOmAYYV14da9GnLVtqUPT2pot5OTfEr5 +X8EVQXWaFzZXfZRIuHeS3/ByMkFVEukzdV4SJQ1GbpzI3xUHJ9dH5R/qeWQVgyax +Nl1YDLGQ9FGCkVmCIf3zbGMFyLio7QVmPdewBulF9ZKrvsrkYPd8cbbsZJ0/1TlC +Au17u9BA97j9V8sGqZviVPol1xo3YHNARsKg2zg+Ajl5E65nzmWHDZ9sb2ep0ASX +vh12OyGTfPnL+aJO+Xu8qgeRb4iU5bf7AyWIIaxGFAllsjxUCcpJAm77K/lbzgJc +QYOl9lm/aq7vVteTO7KWl9fVQTSMhx+gH4aWeLLjRQb23ApMEytomg7SfcPI1TcC +qlhIdwAAACCrxnQXclzyj8dkDV3kOCX0Fuv6gOGRxC7ohjAzOPVgRQAAAYCGfV+3 +L1k20aFO07YEmWYvMSRobvEIxbPaZmOg6GGX7CzEyUYBk6dP8WAorJRBsMfSfCJy +1IOsfNeU1ZhBbE/5CZphZ51BfUeM5d2XS/NJoUV1r+dKiLEt1fbRy9P5Hd1ZftaO +eeukAmExMMIkuUrChxSh8cVSR1pdKc/N2OCKax1lZh4o7zE1FNFAj1q9Pgbr46fY +FNHt4xa/SVJzyh1XT0K0gu6jDbU0ZvRUtRoXWguJs8Bd2gBucZouY3FmkIDXaMwD +jN+4CY6arZuNg9S3WfQ6ydIrNT7YijNyNVAVDeA2G3o3bze0XUN/cctxHyhH3mca +0QWVFqHUV1UiShXTe0rq2j9YxpoTba7wY2/jjjdSBkr+WYQz6ACJ/aJLFEpGJzS+ ++Pd2OIRbAOWc5/pPHa9IeiytoR6rpyuyPh32tmoYPt0ibEQCct2bBr7A5X8aCCLS +4AISBkttumRWIIX1p1kpr6X+UJ4LeOYwqvEvkeSYDJsNb34Fmi6j4jR52TA= diff --git a/security/nss/cmd/bltest/tests/dsa/pqg2 b/security/nss/cmd/bltest/tests/dsa/pqg2 new file mode 100644 index 0000000000..4bde8eca64 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg2 @@ -0,0 +1,6 @@ +AAAAgIubMvW6OPqtXg1QbrVVVA0NeWMZVVjKMIt0ZiKNkqF7OxS44Kt3qfOylZoJ +hIqmn435LNnp7e8K33ks53v87Mrdk1JwDKX67PGB+gwybbHW5dNSRYAR5RvTJI9O +O9fIINfgqBkyrKHro5AXXlPq2hlyI2dOOQAmPpD3LZTnRHv/AAAAFLxVDpZWR/s6 +IPJF7IR1Ykq7sm7dAAAAgBEzOpMfulA0h3dzdoWf3BL3xoewlIroidKH8benEq0i +CuTxzjedDbtcmr9BliHwBfwSPDJ+UFXRhQY0w205fmieER1ZjBw2NrlAyE9C9DaE +bo5/ytkBLO2jmHIPMv/9GkWrYTbOQXBpIHrBQGdbj4bdBjkVrm9isM7HKfvVCawX diff --git a/security/nss/cmd/bltest/tests/dsa/pqg20 b/security/nss/cmd/bltest/tests/dsa/pqg20 new file mode 100644 index 0000000000..f78284051f --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg20 @@ -0,0 +1,17 @@ +AAABgMHQptC17WFd7nasWmDdNeywAKICBjAYsboKBv56APdl2xxZpoDOz+OtQUdb +rbWtULYUfiWWuI00ZWBSrKeUhupvbskLI+Nj86uM3IuTtioHDgJojqh3hDpGhcK6 +bbER6a3b18pLzmW7EMnOtpv4BuLr1+VO3rf5lqZckHtQ79+OV1uuRiohnDAv7yro +HXPO51J0YltfwpxtYMBX7Z57DUatL1f+AfgjIw8xQiciMZzgq/HxQfMmwA+8K+TN +uJRLb9BQvTAL2xxfTaclN+VT4B1RI5xNRhhg8ftP2Pp59dUmP/Yv7XAI4uCi02v3 +uQYtDXXbImw0ZLZ7okEBsIXyxnDA+HrlMNmO5gxUcvSqFfslBB4ZEGNU2ga8Kx0y +LUDtl7If0c2tMCXGnabOnH3fPc8epNVld7/ewjBxwfBe5Ad7U5HppATq/+EtHqYt +BqzWvxnpGhWNIGa0zSDkxOUv+x1SBM0CK8cQjyx5n7Rohm7xywm84J39SeR0D/gU +BJe+YQAAACC/ZUQcmHt3NzherewVjdAWFNpvFThiSOWfPN2+/I6d0QAAAYDAKshT +dfq4C6KnhLlOTRRbO+D5IJDroXvRI1jPPgP0N5WE+HQiUvdrHt4/w3KBQg50qWPk +wIh5b/K6uNtumkUw/GfVH4i5BatDmVqrRjZMtAwSVvBGbz2842ID7yKLNekCR+le +URXoMbEmtijumE80mRHTD/udYTtQqE36HwQrpTa4LVEB5xHGKfnyCW3INN7sY7cP +KiMVptJzI7mVqiDT0HNwdRhvUEmvb1EqDDip2gaBf0thm5RSDt+shcSm4uGGIlyV +oE7Dw0IrjesoTpjSSzFGWAIAigl8JZaegmwrqlnSy6M9bB2fOWIzDB/Np8+xhQj+ +p9BVXjoWna7TU/Pub0uzAkQxkWHf9kOKN8p5OyS7sbG8IZT8bm72AngVeJnLA8Xd +b8kag26yCiXAmUVkPZX3vVDSBmhNb/wU0W2C1feBIlv/kIOSpXk7gD+bcLTfyzlP +ntgcGOORoJ6z+ToDLYG6Zwyr/W9kql4zdMt8ICn0UgDk8L/YIMi9WNxe6zQ= diff --git a/security/nss/cmd/bltest/tests/dsa/pqg3 b/security/nss/cmd/bltest/tests/dsa/pqg3 new file mode 100644 index 0000000000..1f9216111e --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg3 @@ -0,0 +1,6 @@ +AAAAgMuhPlM2N8N8DoDZ/NBSweQaiKwyXE6+E7cXAIjVTu9IgfPTXq5HwhA4WoSF +0kI6ZNo//aY6Jvks9aME85JgOEqbd1nYrBrcgdP4v8XmyxDvtOD3WGf06EjRozhY +bdBkj+6xY2R//nF2F0NwVA7oqPWI2ozBQ9k59wsRSn+YG4SDAAAAFJUDG4qnHynV +Jbdz74t8ZwGtil2ZAAAAgEW8qkQ9TNFgLSeq+EEm7cc713Pebs4V6X5/70bxMHK3 +rcr3sAU89HBpRN+MRWjybJl+53UwAPvkd6N3ZqTpcP9AAI65ALneS1+a4G4G22EG +54cR86Z/7KdN1b3c32da5AFO6UiaQpF/vuO7nyok32dRLBw1yXv78jCOqs0oNoxc diff --git a/security/nss/cmd/bltest/tests/dsa/pqg4 b/security/nss/cmd/bltest/tests/dsa/pqg4 new file mode 100644 index 0000000000..0446942f22 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg4 @@ -0,0 +1,6 @@ +AAAAgPJKSvxyx+Nzo8MJYjMv5UBcRZMJY5CUGMMHkqrxNd3qVh6U8kcmcWt1oYgo +mC5M5Ewf3ct0ZIe2t3qaWhf4aKtQzWIbW8naRwiAsofXOYGQpCpe4i7Y0f8UfiAZ +gQyCmO1o4cpp1B1VXySeZJ+xcl3bB1wXs3vv9Gf90WCSQzc/AAAAFNoGWgeN21bu +XSrQbK+rIIINLEdVAAAAgEe1WRt5BD5OA8p4oOJ3yaIeKmtUO/TwRBBM2ayT7/jh +AbtgMe/IxZbV0vkuOj0PH3RwLdVPd9PNRsBN7npd6fAK0xdpH93O/koiCiZRrK5/ +zt2pK/zKhV22cF6Nhk+Bkr9r+GDADwitZJPswYcuACjVyG1EUF21dCJRXDglpveK diff --git a/security/nss/cmd/bltest/tests/dsa/pqg5 b/security/nss/cmd/bltest/tests/dsa/pqg5 new file mode 100644 index 0000000000..6a091c5357 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg5 @@ -0,0 +1,6 @@ +AAAAgIjZaOlgLsvabYb3yXCj/76x2pYvKMCvuScO8FvDMMqYw634PAcv6wX7Lik7 +UGW7sMvMkwwk2NB4ad6uzZKiYEwPXdNcW0Mf2moiLFLDViv3VxxxAgm+izuFiBh4 +hyX+gRK31ryC4P8cu/XW/pRpCvK1EOQa2CB9wsAvufpc76q1AAAAFKZlaJueW5zo +L9FnYAbPTPZ+zFa3AAAAgCZ+KChXQXdSET+6P8pxVbXOiefIozwaKRIuK3IJZfwE +JFJn/4f8Z6VzD+WzCAE6oyZpkPuzmBhah+BVtEOoaM4M4TrmruMwudJdO7s2JmXF +iB2vDFqnXp1KgujwTJGprSlIIuM5eKsME/rcRYMfnTfaTvoPwsXrATcfqFt92x+C diff --git a/security/nss/cmd/bltest/tests/dsa/pqg6 b/security/nss/cmd/bltest/tests/dsa/pqg6 new file mode 100644 index 0000000000..e1220d7afc --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg6 @@ -0,0 +1,12 @@ +AAABAPLTntMGKxPJFic2AKDyoCnobXpLkhe08YFb8rJNlxClerM/mXKUsBRYW40B +mN/cy811MU2l/4WqNEtFra6ql5tRoxKnv6lEcvtjPxpvFWu0RYhn39OEA/BrhR8A +/i00hAd73tcat1E9BKFAIgV1+2kzlUgOTIQCt6Rs7C03p3jDBazNHxPp9i6GUxX0 +sizEZ8iYbsjklh3fgQVmsMTuNprGqhXkP0dEAFgm9b3oBxoZ4wtpCarEs9F0I3Jw +2tAnmdCbiizF8i5miUtUIiKLLCNPEfWnccW4nPRloqzsu+6qFyX+j5tZQivomRBS +y1Vt3yyM6PqSBtvzn+rcGU4A+OUAAAAcgAAAAAAAAADBGPSYNeTvczxNFYAPzwWe +iE0xsQAAAQDjqTwJ2m9WDk1IOjgqTFRvIzXDakw1rBRjwIo+bdQV31b9xTfyX9U3 +K+Y+T1MAeAt4LxrNAci06zNBRhX9Dqglc6y6fvg/WpQ4VBUa/C19/hIfuM0DM1sG +W1ScXcxga+kFJIO8KE4SrDyNugm0JuCEAgMOcLwcwr+JV8S6BjDz8yrWiTiaxHRD +F2Bj8kfZ4ilrPqW1vCM1go6hoIDtNZGN7iEv0DEnnRuJTwGv7FI4M2aerAMaQg5U +C6EyClnEJKPlhJpGCla8sAFkeIWxQzxPmSlxdGv+KXfOclnFULVRpsNXYeSkGvdk +6NkhMvzApZ0WhOq5DYY/KfQc91ePqpCM diff --git a/security/nss/cmd/bltest/tests/dsa/pqg7 b/security/nss/cmd/bltest/tests/dsa/pqg7 new file mode 100644 index 0000000000..f65cc5c3f4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg7 @@ -0,0 +1,12 @@ +AAABAKqBXJ2xxNPSdzx9DU0dp17PxKOel9X6GR/+yLFJCikM4zXlzofqYgqKF94L +tkcU4uyEC/AObr20/7TjJMoHw8hxcwmvFBA2Kncsmt2DiysMrh6Qq0SK2r2s0uXf +WcQYejKiNxnWxX6UAIhTg7+PBm8juUGSDVTDW098xQRPO0DxcEaVYwe3SOhAcyhE +0Aqc5uxXFCk7YmUUfxXGf0vjiwgrVf3q22EkaJ+3b50lzCi46qmLVi1cEBHg3Pmz +mSMkDTMtidyWA7e93QxwuDyqKQVjGxyDyruubAwMLv6PWBMe2DUb+T6HX2pzqTy6 +1HAUGiaH+6zy1xyN3ulxrWYHKa0AAAAc6jR+kL58KHXR/h22IrR2ODfF4npgNzED +SMGqEQAAAQAgQglMy8i4cj/JKMEv2mcbgylemcdDV29EUEvhGGMjMZtQAtJPFz35 +CeokHW6lKJkE7kY2IEsvvpSwaP4JP3liV5VJVR068hmtjtGZOe/4a87INN4vL3hZ +bonny1LFJOF3CYpWwjLrH1Y6qEvGsCbe7m/1HLRB4IDy2vrqHO2GQn0cNGvlXGaA +PUt20TPNRFtMNIL6QVAjRjyb8w8veEIj4mBX06oNf7tmBjDFLknUoDJcc4ngcqo0 +nxPJZuFZdS+7cekzaJD5MkP6bnLSmTZe5bP+Jm6/ERBWj+5EJchHtQIQvUhLl0Ma +QoVq3KPn0anJxnXH4maRgyDdWnikjEip diff --git a/security/nss/cmd/bltest/tests/dsa/pqg8 b/security/nss/cmd/bltest/tests/dsa/pqg8 new file mode 100644 index 0000000000..93b5700501 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg8 @@ -0,0 +1,12 @@ +AAABAKTH6qtCxMc7dXdwkWSJ8XzVByXNCkvE4c9n92O4wd4tbauYVrqvsAjzZbGK +QuFNxR81C4jsoCCcWqT9caepbHZfWQHCHnIFcNeDe+x8dtLkk0RzHKOUBdCoebng +3NGoEl/RMOweeD5lS5TjAC5rYp6QSrOHeGdyDL1UtCcKnhXNAox8x5bwbCcqZglR +ko/b6y3KBhtB6TIlcwV0L/FuL0KRkdXl8abd9ueMXXciz/gKnAvVyNeuuowEQ4mS +sHXjB8FTTEmtOA9Hf195h9wXLBYdyjjcrz+zhGxyyRGaUpmtx0iVGz3ODQDUqQE4 +ALIAggO3JGW8aoSuBZowxFIt6lcAAAAczon+MyuOTrPR6N3OpdFjpbwTtj8WmTdV +QnrvQwAAAQCMRl7fWhgHMCkeCA38U4U5elAGRQ26Lv4BKSZPvYl7tVecoOqxmqJ4 +IgQkcktPKm9u5jKEMqv2YTgGRglyM1BTOcVRnTV9cRK27sk4uF1ap1zC44CS8KUw +rLVOUP6CxNVi+w8wNrgLMDNAI+u+ZjegAQsAx9uGNxFoVjZx4eDwKK7b1F0tVyYh +pgmYKgc+Uaridwevvu8p4uzuhNem1do4K+OjX0K2xmhJICqxnQJbhp0Id2R20auY +FHWtKtLz5v0H4waW2QpiaBbfYNbKev17SC+UL4O0XMgpM3Mfh/ruMgkA8qo+cLGG +fhQw5AvmfAf5KQKZ7wZ7iySnUVs/mSwH diff --git a/security/nss/cmd/bltest/tests/dsa/pqg9 b/security/nss/cmd/bltest/tests/dsa/pqg9 new file mode 100644 index 0000000000..8cec6fa331 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/pqg9 @@ -0,0 +1,12 @@ +AAABAKa7UzPONDwxybLIeKuR7vL96jXG2w5xZ2K/wNQ22HUG6GWk0sjPu9Ymzov+ +ZFY8pWhs2M8IFJDwJEWyiQh5gklftpl2sQJC1tUPwjtNvbC+94MF2aTQXZ6uZdh6 +iT6vOX4E45uqhaJsj/ve8SMyh7X1tu9qkPJ6aUgaky7kexjV0n6xB/+wUCXmRuiH +a1y1Z/7B3TWDXUIIIZhTH6++WuKAxXWh+w5i6bPKN+GXrZbZ3eHzPyzsfSferiYc +g+6OIAKvfrboL2oUeWrwN1d6EDK7xwkSnKq9it34cK4tBZXI/bNxVXSPDeo0tE1P +gu1YwvWxuEgWYqxTRzxpNBAIL70AAAAcjD7lvZoqrwaL1YRb1V7PJ0FwVTB1d7vD +dw7GiwAAAQBDtaa20LuWLsl2ajd8MsxBJPExEYjC7PlcDNSk+glyJbdhjLEnbEdF +eNO/VkwUUZnAkqGxS6qSnC8/DzbgwtrpHroIvjCZKoifKVLgRCw3r0hKTs3DJDzP +y540E89c3WYwsJ/hfvv94U2HJUkwGbe3PR94K0jvML7DbgDgK6M20iVPwgKmlhLN +lEb5HXa3Of+m2LhgUvjcXxFFgBxWJBr1upA3JBvYnmM4tY4BMQZxwmjrXjOstX0f +mfFkQKZ1gn1AF3VNYBoXraL77fkEVUqQsBUw2oyTzRTOKTyyvT55N+k0t54xD+TY +DBP5L2M4E1W9gKGr7hpz/fttok7ygAKj diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed0 b/security/nss/cmd/bltest/tests/dsa/sigseed0 new file mode 100644 index 0000000000..05d7fd2d65 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed0 @@ -0,0 +1 @@ +aHpm2QZI+ZOGfhIfTd+d2wEgVYQ= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed1 b/security/nss/cmd/bltest/tests/dsa/sigseed1 new file mode 100644 index 0000000000..83a7ecfa3a --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed1 @@ -0,0 +1 @@ +mMvMSWnYReJGG19mOD3VA3ErvPo= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed10 b/security/nss/cmd/bltest/tests/dsa/sigseed10 new file mode 100644 index 0000000000..7ddd4ea0db --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed10 @@ -0,0 +1 @@ +nO2J6lBQmCIigw7+8m5zlPWrfYN9RUmWLShfrg== diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed11 b/security/nss/cmd/bltest/tests/dsa/sigseed11 new file mode 100644 index 0000000000..a12adcbfc1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed11 @@ -0,0 +1 @@ +LLnB1hfhJ6R3DQqUb7lHxRAO0MpZRU6oBHn2iF7BBTQ= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed12 b/security/nss/cmd/bltest/tests/dsa/sigseed12 new file mode 100644 index 0000000000..d51eaf3887 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed12 @@ -0,0 +1 @@ +RQMLeaOVsWMnAMuv/q2XmY0CvtjgZWh2/AF05L25b3k= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed13 b/security/nss/cmd/bltest/tests/dsa/sigseed13 new file mode 100644 index 0000000000..77c773ac7d --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed13 @@ -0,0 +1 @@ +EXpSnj/fx5hDpaTAdTkDa4ZSFOAUtJKMKjH0e/YqT9s= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed14 b/security/nss/cmd/bltest/tests/dsa/sigseed14 new file mode 100644 index 0000000000..8178d4b665 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed14 @@ -0,0 +1 @@ +I2gDehx2R8aD1+MBrHm3/uvHNu/+OrFkS2gwi0soYg0= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed15 b/security/nss/cmd/bltest/tests/dsa/sigseed15 new file mode 100644 index 0000000000..8bfb678098 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed15 @@ -0,0 +1 @@ +X+Ya/dvfBESbJClaUqGgN9PzFEGjzsE4t/AQLbhu8TI= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed16 b/security/nss/cmd/bltest/tests/dsa/sigseed16 new file mode 100644 index 0000000000..06c4c1bdbd --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed16 @@ -0,0 +1 @@ +QPUDq9cP1Jp2xnqD4IsGKz/UZa2SvkM8CA5fKVu59Vk= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed17 b/security/nss/cmd/bltest/tests/dsa/sigseed17 new file mode 100644 index 0000000000..43148bff9e --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed17 @@ -0,0 +1 @@ +KeTXeQ4YG0dnkD/g6zd1fzPxMzfDNYjB/b+6DmVatiE= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed18 b/security/nss/cmd/bltest/tests/dsa/sigseed18 new file mode 100644 index 0000000000..370f857d60 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed18 @@ -0,0 +1 @@ +PXwGijl4stj+kDS8rWWtfDAMREDkCF3igOV37qcsEgc= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed19 b/security/nss/cmd/bltest/tests/dsa/sigseed19 new file mode 100644 index 0000000000..edb0bf8a52 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed19 @@ -0,0 +1 @@ +QLXMaFw9H1kHIiivlVFoO1uMj/ZSQBFK0trPzPOSgFc= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed2 b/security/nss/cmd/bltest/tests/dsa/sigseed2 new file mode 100644 index 0000000000..814709f1bf --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed2 @@ -0,0 +1 @@ +jLNdJVUFpMQUIeVi0QgnJmqmhmM= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed20 b/security/nss/cmd/bltest/tests/dsa/sigseed20 new file mode 100644 index 0000000000..de625fdd23 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed20 @@ -0,0 +1 @@ +tZkRG594QCzv573ov1U7bKANWrr5oViqQvJge/eFELw= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed3 b/security/nss/cmd/bltest/tests/dsa/sigseed3 new file mode 100644 index 0000000000..d2c7339408 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed3 @@ -0,0 +1 @@ +hZdsVhCnSVlTEEClUSs0fqxYfkg= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed4 b/security/nss/cmd/bltest/tests/dsa/sigseed4 new file mode 100644 index 0000000000..036d29a8ff --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed4 @@ -0,0 +1 @@ +M8e6iP9pcHlxslrDRK5KVm4ZX5k= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed5 b/security/nss/cmd/bltest/tests/dsa/sigseed5 new file mode 100644 index 0000000000..7d80d66772 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed5 @@ -0,0 +1 @@ +LxcJB6xpcmsU8iBW3LN7TfhfdCQ= diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed6 b/security/nss/cmd/bltest/tests/dsa/sigseed6 new file mode 100644 index 0000000000..2f8d8df4e4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed6 @@ -0,0 +1 @@ +cZc5LTLQr2pxg8wzmFVvj2h9hqj/dCvmrThWLw== diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed7 b/security/nss/cmd/bltest/tests/dsa/sigseed7 new file mode 100644 index 0000000000..eda93236db --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed7 @@ -0,0 +1 @@ +N/rdQZ/L0rBzoGrpa57Otj4prumsX6K9sxq4XQ== diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed8 b/security/nss/cmd/bltest/tests/dsa/sigseed8 new file mode 100644 index 0000000000..03997e0107 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed8 @@ -0,0 +1 @@ +bzJlRqoXSz0xnvczHsjf02PdeK5YOpIBZf9+VA== diff --git a/security/nss/cmd/bltest/tests/dsa/sigseed9 b/security/nss/cmd/bltest/tests/dsa/sigseed9 new file mode 100644 index 0000000000..0ce4ead348 --- /dev/null +++ b/security/nss/cmd/bltest/tests/dsa/sigseed9 @@ -0,0 +1 @@ +fg8c4h0YWuZcCgA5VWfqnPIXRitYucicTl/5zw== diff --git a/security/nss/cmd/bltest/tests/ecdsa/README b/security/nss/cmd/bltest/tests/ecdsa/README new file mode 100644 index 0000000000..e562a38a8d --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/README @@ -0,0 +1,5 @@ +The files in this directory contain test-vectors for ECDSA using NIST P-256 Curve (the test-vectors from 0 to 6 included), using NIST P-384 Curve (the test-vectors from 7 to 13 included) and using NIST P-521 Curve (the test-vectors from 14 to 20 included). + +The key files used for the signature contain a curve, a private key and a public key. Each key is represented as follows: Base64(len (curveID), curveID, len(privateKey), privateKey, len(publicKey), publicKey). The length is 4 bytes long. The curveID is a DER encoded OID (as stated in http://www.secg.org/sec2-v2.pdf). A public key (a point) is encoded as 0x4 || x coordinate || y coordinate, where (x, y) computed using the base point. The private key is generated randomly. To generate the test-vectors we were using Sage Math system. + +The random nonces (sigseed) and the plaintexts (already as hashes) are generated randomly and encoded using Base64 encoding. The resulted ciphertexts are presented in the ciphertext files and encoded using Base64 encoding. \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext0 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext0 new file mode 100644 index 0000000000..30b6d6ff23 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext0 @@ -0,0 +1 @@ +g0O4OK4uKlJAlR1MDRLTBjyfxFI3PLKLYk+pJyu7gDJTgMptbhg+vZS0lgEBR7jHFDG89TymXn2bZ+NWDE6h5Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext1 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext1 new file mode 100644 index 0000000000..4941703a81 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext1 @@ -0,0 +1 @@ +yaMRWtXb5AUhgva2zYOq3aczhYOP5pEldcaXtbnIbARVv3o2RjdhnVl2Nq6BaL36nPdO6KZrjHm0oQoUvD2bTA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext10 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext10 new file mode 100644 index 0000000000..e6f98da8ac --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext10 @@ -0,0 +1,2 @@ +AIlc19+p3H+s2rJ98KkTaA351Vz2pAVuMCFB1jRshJVrw4QbHS+UQ9VuSGjZLe6dTf5vBAjlfeYQ +NGnU7yhOxU2nl3tI+9qe/MrAL76d3e0+G/jBHk8hp006TbdiBrNK \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext11 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext11 new file mode 100644 index 0000000000..4bdf36dd58 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext11 @@ -0,0 +1 @@ +L8GGYb8eZCyjr/YAgmB7jWonjqXZ773+Iizm80wRe9PQzQKjaP3c9PiBjAJ5W8VBH8X0twayfznc/v4jozzE2PC3adIkOiIhn4TGWd0zcD/TpxeVreCEOLtCnO7ZTwGh \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext12 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext12 new file mode 100644 index 0000000000..9914f4d47a --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext12 @@ -0,0 +1 @@ +lbxmnrmyoI+SotJ0F3cTBm+XigEB12hCBhXWdLotb1juvr80ksg2komHRqzKuuyrgQbmQwTnpQfmn/Y2iNx3CsL4++UWRH77/MaleccxGjHTJ0fNoQsBTT3Pa7s+1FDg \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext13 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext13 new file mode 100644 index 0000000000..01fe1f9057 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext13 @@ -0,0 +1 @@ +wRJKnt6DnqSYtMHr0HX/4v3qT2FTdLA/aY40y0Grz8Jc5aPD062+mUSSI3d43BKy3aGvJBJPXo5FfBAGZrrcPTZ4hb783D8MnRRzGnYqlP18d+HxGbhI/X3FgQvDpvoA \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext14 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext14 new file mode 100644 index 0000000000..7f3d91f8f9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext14 @@ -0,0 +1,3 @@ +AcKWiddIfeC5MGnUw8HxiW6h55HY+QgSgE2aPGdgv06hz3fF7+ibSHHWOOOKDAb+DOkDS/06fUSj +Bz4JPrI+1S7GAfsjSDNA7FCdMMDlz6SzJ/AXtDqEnqPvuKjxkZTIWFoGcl3ckEqaXuHZQY6/ZUEC +tU6BBedWeaZcj0VDiFDhT7VM \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext15 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext15 new file mode 100644 index 0000000000..d00accee00 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext15 @@ -0,0 +1,3 @@ +ALrhfS4bAPvF9GooBRAmS5BPItf9JJxuB9kXAnqFyoTfeo9Qj2X1BsZ1lRQ9/tNm791Pg434w6XT +jVifx3sWdo79AZ/sgRq97VGVjVLvSNPkEuDWUP0UcjHQP7sOPZS3i04pactfM2D/xI9KKTH7nF0/ +oNQGqp3kSV5pdo9tBD5kNLxP \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext16 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext16 new file mode 100644 index 0000000000..329ca475d6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext16 @@ -0,0 +1,3 @@ +AUpC4BhuE7JTjlHZVrtjHZgzyudEOC5/I73cN3IJREJoUi4GaD34Lbc2Uaj2I40J/imqTukMAF92 +AIhzAoPKbY7LATmfsfCzC9QJJ110ch19FxipEUEmgYi2khejzsDgSjhDP9DjUHyvnX5GCC/jGzbZ ++38Vef+1pH73V1Dk7VGPfly/ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext17 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext17 new file mode 100644 index 0000000000..35bff63b1b --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext17 @@ -0,0 +1,3 @@ +AVu1YHSDn9uZIQcRKy79vaUtrfJb6dG6gX001BmwMnInkt3QpylrzyPScpWlMHHeNG7WhSJudTp+ +9EbcmQOvG6eUAb1cnamAm0q3oX4PlJMM50lUsX1bjSG7CEYwb0x1H9xr9fN+TgFMUgvZZXC7pY5r +bhHlEUYQcMmRKG9ZHFc6LbEj \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext18 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext18 new file mode 100644 index 0000000000..4cb3b8eb44 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext18 @@ -0,0 +1,3 @@ +AHC8RciYJUDbd9w/47KfKD/9pKS98cXqep7XnKi9NDRuKi1wzgnVDMiUACkRA4IRy2I1/9cNKA8o +j17hRNbWAEO9AF2fg5BhJSNLiOAkhBCt2GvLOsBRvPX58xn4u6gWyY8oV5bFBrMQvHS2avNujgHs +MI+/lDXXb7w6GOFiScWeX6NC \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext19 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext19 new file mode 100644 index 0000000000..0d87e32c0c --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext19 @@ -0,0 +1,3 @@ +AXNA1v4coiWNri0FEpHBpyDBt3IWjsaSa222ySUgcf6bz1SUIfB0DBGPZI7CZpRHl+B8oRHaD6gB ++IN6+4UI+nf+ACSsoM4ivi6HO3OcwG1uK1I93qhujMOkHSWZ27njMq6K20VbAW1WIAOwIwhEyqUc +br/V+GZCCQgoKdmRh4Q2daOi \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext2 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext2 new file mode 100644 index 0000000000..1b6a3aade6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext2 @@ -0,0 +1 @@ +tnDjU02HxiZc64bV5bXn0SY9qRc302CSEXbSojvsVWL9MDLf7n+HYoCL3KzDzc9c3Am23YkNe+UmGmyiQ2cDsQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext20 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext20 new file mode 100644 index 0000000000..b7b204a8f9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext20 @@ -0,0 +1,3 @@ +APkk3zqRJEzbXeIJ1d7RgzkRJzgTUZwwpTDSVvSGgkMLs/vKSBnWHQk4sVGbU5lTNbgltF6sBC+1 +J2XgsiQ/xqLbAG/Bu4mbGTmWs1kaNDiDFg/BUr+au2QQSx8HbBTHZcXLmsLxNzItCS8oAlRA2Rjv +Nq9oZNaz3rebPdt9xHXFh6bw \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext3 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext3 new file mode 100644 index 0000000000..67bf5604d8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext3 @@ -0,0 +1 @@ +4KKGd2/fEIClyuhRwrehW6BKH0/+OQgsirRfzIcrOZvFzAfKi5khbVYxHK37tL9P5PomDbXN4Dp0AeruvBLAiA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext4 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext4 new file mode 100644 index 0000000000..9c5aa11d60 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext4 @@ -0,0 +1 @@ +pnjNl+SQmTBayW5VQ+CkmKP0xnB7UTBY4RsZtkSbCeTHWSbv3i6bZPR105a0uMLG5nS/gQjyl4eH/zE+MgETpA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext5 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext5 new file mode 100644 index 0000000000..68e026b6a5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext5 @@ -0,0 +1 @@ +U9uDPGgYelgtc3AfIMnUtUUbAy0r+Gfu4Ig2RnrtlEZyEBE4VFKqwT55ScQqD5FUwjCqhjtnrKohq+FbrRejjA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext6 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext6 new file mode 100644 index 0000000000..809f1c326c --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext6 @@ -0,0 +1 @@ +7ED/IZr06H2cFwgTZ3iOtg59SCsSIa4+t1DW9cwd2u1oMgkkFvPHMgQboH8aULC6lRE8aGMJZTZ6WnTYJR3hBw== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext7 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext7 new file mode 100644 index 0000000000..5dd55e5d46 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext7 @@ -0,0 +1 @@ +b37O7Ui12JgVhBxhPsr6SVBu9WAfYgNj0VE5j8sIq7S2KH2UkLMsV87cAn0LAj58clN0lmBJXJViLyU9zptz5A/IodDm/mAY92yVr2V/SdOGdrubjqQ74giLceDaWK5G \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext8 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext8 new file mode 100644 index 0000000000..ab3a66dfec --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext8 @@ -0,0 +1 @@ +5wrpYRET0Om1gAeZOQrqeDkWLC11pKLF2ECxWwaUD4lqDbJYKF6mfYPXz8hrrbFvfq1TQywm+Wvb9fkAofHg99tdlv5HOE0vrhIdZHyXACtJ9hAjlYYZhmp0wSjP02ZH \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/ciphertext9 b/security/nss/cmd/bltest/tests/ecdsa/ciphertext9 new file mode 100644 index 0000000000..6f7f767520 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/ciphertext9 @@ -0,0 +1 @@ +Ehmee5KL3MVy+ulw/4sw22HbIqY2pPp3V29Q7MTTSmA9xxhyLe4tuzWvio3rRFFaSiTDJUs9FJ/qN5uRrU59VtyU27jv+jXmRZGF14eW/+bI7pJ46u2I4oC/PKWrJUlg \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key0 b/security/nss/cmd/bltest/tests/ecdsa/key0 new file mode 100644 index 0000000000..491fdba1b8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key0 @@ -0,0 +1,3 @@ +AAAACgYIKoZIzj0DAQcAAABBBNGB7n4kH15tKA/SMpetaQVqg6WxIuuUuMQT2tDX +NN5jKZfaxD47NsTjTr3x3D5t1qRBYuL6VtdgIuxBIHGG9dcAAAAgaGjyZBL+LN3a +7NkGiHJBfqh7XKNH0AnPF3vFWpostIQ= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key1 b/security/nss/cmd/bltest/tests/ecdsa/key1 new file mode 100644 index 0000000000..f64e2de0d4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key1 @@ -0,0 +1 @@ +AAAACgYIKoZIzj0DAQcAAABBBP8XY2jN9iSwGmgjiKiEJ13traQZAfQjp9gm/s1ued3vKcAUoCya7wVzoOtE+1e318eseAmUCFTmSue3oRQ4iNAAAAAgUoPXpYUpyVq3AM/eQ8krtoa+IvndvJSu2d0Wfmw4G3k= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key10 b/security/nss/cmd/bltest/tests/ecdsa/key10 new file mode 100644 index 0000000000..d37d95ce7b --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key10 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBGNmUY5lDAhCxgugJReD7Q9NWibKxv4mPCeXk90hyZKquY0U1Z6WUOEY +PbpMei6MDGdjOUnMAfTLKa10WajMqIFgR7rInBQqZqOtpKqtFUb3ilJbiOZUnUpn4zuWoDUCFQAA +ADD/dS8s2Bui8eTEmURjxj0bzlPVfhbPErX/BETy11xb63U48OK2obH+N5b1mJlck3w= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key11 b/security/nss/cmd/bltest/tests/ecdsa/key11 new file mode 100644 index 0000000000..af2013affe --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key11 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBI+fZwvjDD9sX9mh9nLTOiy6npcJ2nzGGeDLkcSlFhsnwigQLvyMNBvP +d7afj9P09hHRozYAf2Z0UWhCHAiFccw9GChq2eTgCvTl6jxNKsdPIHqa1+eoukMB2mLchEKk8gAA +ADAVhVW7PB4G4UBgfYgSDrbKZ4MJaED8XCvlKjjvPHaiYlr7+le4A54annNInynW3DY= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key12 b/security/nss/cmd/bltest/tests/ecdsa/key12 new file mode 100644 index 0000000000..32cede8d28 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key12 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBPF9n9O34oRxht9krXuHEQFusdW2Q7XrgWTMX4w4YXasi3OXSzOHywxa +JQ8jIXu7AcUVQTLfhSwQvswwvzvJUD1vPiJH/AZFPhQOrg8fYzsuSVs0NLQ/PW0nDqdcz9BVxAAA +ADBfPgxyWf18Zn/ftiQfrpU/+Td0WD3QhAVYbNmRGGzP73YSLgmD8rafs1fW6NjZEOg= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key13 b/security/nss/cmd/bltest/tests/ecdsa/key13 new file mode 100644 index 0000000000..3743f1c41c --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key13 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBN9riLgrpq184TDaWpgqnU4pYyqyTXreZQ69O2sU4GENCGN9tmsgyGi3 +lt0r4wRwchlU4cxJeO5f6XrX0dqF46s57Pw6+tFf2OCU1X0jCPn7NrYz8X9Gjw9ZrKnqESLNyQAA +ADBIzoBK0nAaFkL9z0H/6dmakHfrRZtrZE556sN0bHbN6uo+YGv8JK4xYJ+okqorCV4= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key14 b/security/nss/cmd/bltest/tests/ecdsa/key14 new file mode 100644 index 0000000000..2740bbb8fd --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key14 @@ -0,0 +1,5 @@ +AAAABwYFK4EEACMAAACFBAHLMSpMFVyG6mXE7SZ5O5Bwv4d8/QiAB3BzpXkyrU1W +jJ9O9uOYTXM+cFtF5v56+LsI4yGkaAl9+RF6lFPjrhpIswCmBmEqMBgZpjoz38my +nLHBI9MaFF8AHkRQwD3LJLo4eSZHOVkdIvDYLwicdlgr0zD3Nf76/HB1+0DkBGqE +MyG22gAAAEIAFah7z179UbqqdH68pzdZsP1ChXjtYZ11rBM0+HP7yLirxH3ahKTt +DjsY19GEjz4gKsaLfLiQ1/Dp+VKVLcBKpk0= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key15 b/security/nss/cmd/bltest/tests/ecdsa/key15 new file mode 100644 index 0000000000..c0e241b259 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key15 @@ -0,0 +1,4 @@ +AAAABwYFK4EEACMAAACFBAHNraBOZWsOfiIfcjggO2UgdVT/hWKgnuPNxeiBUN0y7hhWdeJDJEQw +h8CKaKe34NwLHkI9v3srwrjjgrZhSE1C0wEqnTHutNYvzgdim0/1ez1AltxjpE2EELzUqnsrXl+V +IbvO/SMGiUb4SPz3ddc3BDQ6uCCWkawr6CryY6fbQHSZgQAAAEIBVb3HzBg8uneljgGlyFD+6hQs +nyNyOwYeMZTgd7pPCY43K4TGDGFtKzpDWPWjf5/TvLgxFhvzwPGLPMK5TLPtTPs= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key16 b/security/nss/cmd/bltest/tests/ecdsa/key16 new file mode 100644 index 0000000000..93858e7d99 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key16 @@ -0,0 +1,4 @@ +AAAABwYFK4EEACMAAACFBAELM1S0u6wWCy7/Alg1B/a3VSSnO42mKq/7Eydq+ae+nqhLUa7tX7Vv +e6N1uWdJOX4t1ZwdHKyQUrrcR2ZhXCymmABTwSVTmcqRRIALlehX+Z24mE1hMyxJwlJAGOmDNpXg +aWhBXQXu10vqQVfWqOER5OdvZlSMDlsHVmldgTxFi/tw8wAAAEIBc6g47xXFFvgOcqgikHnuMm+4 +F4YmKLbIXuCAlVqeMtlGG4utC4jeX2BKgsVoifsL1amJM4NNP9PJmeXHjtJKpRo= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key17 b/security/nss/cmd/bltest/tests/ecdsa/key17 new file mode 100644 index 0000000000..b7be949397 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key17 @@ -0,0 +1,4 @@ +AAAABwYFK4EEACMAAACFBADPXFUBwFhZPy1f6FaZu6IWEDpPRh0UmxGsbBYyXGXme/zgR9masrLY +Q9SmgR9I+qfl2tpBjmwB8ltoNjcxyJGg+QFAdH/rM+0TRJo6qDm7uJNzY5mloOsKVgefekfMEPdX +A2Sn2FVafJLZW7A6R6GvxRX5btTgjM6/XfnJaHr47DFBMwAAAEIAwzmBaAc3LPeoyPzcX70vAo6T +jfI7tvA+N3DXvynLTcKWYZjIilMIqsNn7u+eMQ0xDM45im6j3yPcATmgGzUDam4= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key18 b/security/nss/cmd/bltest/tests/ecdsa/key18 new file mode 100644 index 0000000000..f58b965ade --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key18 @@ -0,0 +1,4 @@ +AAAABwYFK4EEACMAAACFBAFieatjCQKes5RNySyOxoR3TvNJ9tDAHwsR9RZJM4S3At6tU3fe8Pql +yPt1eibbLvh7wgELngpPmoIRVWGG4LbCiQGHsWFJtpZQ2bs7BHGHT7L/t+vGqOUtvubTLq+xfTgW +pUj0epQp+M8ZD0Fd622S4hODtlmPae695+yzNfUub4AjrAAAAEIBDMKWdudLb+7AriZjMEir6Qr+ +JUw6SG5KjiAi3nYymFRqr7tRGwUTkvX1Q64lMV7BgJ1Ch9qW6J11g4H6vtbGxLc= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key19 b/security/nss/cmd/bltest/tests/ecdsa/key19 new file mode 100644 index 0000000000..866ac08967 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key19 @@ -0,0 +1,4 @@ +AAAABwYFK4EEACMAAACFBAFRn1tqa8+H8gsEY6SDyUIg7L0ssJAePQcx1ADEbqorSXraND7BecWW +fdzB/l3KbHXcFWAySIEhHJsxiaZEkoiOlQHKvTgw4WVzThQ09xcPBxP01R2Z29jRvoR6dh0vwCt6 +/Yw8Bt5DkafIV3fhrGSQcAPHNomub9yKoSrntNzgPBPZKQAAAEIBBeO8oosJMamU5b7R5LVAkl+J +WEpiwFKGyK9svHBF5xbBy5HSFxt0tKXCzkhaJhu/tXGyeSedFATSTznrUR71tYU= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key2 b/security/nss/cmd/bltest/tests/ecdsa/key2 new file mode 100644 index 0000000000..f364b2377b --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key2 @@ -0,0 +1 @@ +AAAACgYIKoZIzj0DAQcAAABBBGVG3cGzcX5hDchx/w8PZLuMMc2P6qlhzbfzWvtxVTkEd7MQ9deN7hIlyVUYk198Q2PQIRTiWtRVYA7bRwIlRCIAAAAggL+HbIocY2czS/UJE8y5lYKptWxLz7l2nkDCicqb3BM= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key20 b/security/nss/cmd/bltest/tests/ecdsa/key20 new file mode 100644 index 0000000000..db094b89b2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key20 @@ -0,0 +1,4 @@ +AAAABwYFK4EEACMAAACFBAAO18BJbSwNGxuZotCaEE2ZRutYNruikxsjqbXE5WtbyED65bllWUzD +iCi9kn+r7avAL/ld+qDoTme1Pmzt+BSreQBBird/RGH5XIDuge8UQjnNMUPu6Iu4/j4DcoDuewtG +O2y44isoGdRvOc3Iw9jQULJ5VtJtuCMmsIleglJ9gjAO9QAAAEIBPQClifuzZvzcrw4Hahu1UH3o +A1m6xnJUK9JL8B/tZmUCdUwBevXHQ1xIajGxVka1DnYC7KzfgoqTJQhZnmejCOY= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key3 b/security/nss/cmd/bltest/tests/ecdsa/key3 new file mode 100644 index 0000000000..2d0e5de338 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key3 @@ -0,0 +1 @@ +AAAACgYIKoZIzj0DAQcAAABBBNgKE5o33CAcWXYgyE967xgyVCx/Ny3T+46oDsNoGguKssq2oVqlhpDwJeuwcSWjFUADuZKdpfGsfsCZwoG2oTsAAAAgc1T8iAilEQPJwL3QLVoSYH+gj9WyaMIzlEXb/BdDXHA= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key4 b/security/nss/cmd/bltest/tests/ecdsa/key4 new file mode 100644 index 0000000000..0b566446c9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key4 @@ -0,0 +1 @@ +AAAACgYIKoZIzj0DAQcAAABBBF5bq/2D0xa1ImD8HKoGiWLNU2p7HOegQcYVROWRQQyzFl3UOtrjQVHsef4oKfo8G3eHWAJRVc+iuLyvGOPQXl8AAAAgjzwuwj9STrQmn1vaUjll1jDQe6K/cH0F2IbIuFImXgQ= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key5 b/security/nss/cmd/bltest/tests/ecdsa/key5 new file mode 100644 index 0000000000..9102602941 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key5 @@ -0,0 +1 @@ +AAAACgYIKoZIzj0DAQcAAABBBFB50pPWkcrENLddIYxsb/1DyEEFqk+k3NODT7NfrgDPmP+rgdYQS8dpSTDMLio+lS9BWAHEXPLJpY9RuSkjlD8AAAAgP9tI3QDXD5JFPCNfxYRSiQCsvwH+rKefnaKPUOBqIcM= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key6 b/security/nss/cmd/bltest/tests/ecdsa/key6 new file mode 100644 index 0000000000..17b151edcf --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key6 @@ -0,0 +1 @@ +AAAACgYIKoZIzj0DAQcAAABBBMaKRuPseagu0jdyGJMGK/v/R3hGN2Jgsx0nLOKxDQTjD96BClG7fFOf4KlWY5+SVvIa+ySmH95oOEvlvFw/O7QAAAAg9pRcgToGhu2rwCf97g7rWxMv8ZM+nn7KhN1ChI25xuU= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key7 b/security/nss/cmd/bltest/tests/ecdsa/key7 new file mode 100644 index 0000000000..58ad8e0873 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key7 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBLWMJG3t4khPYcsl3H492rAqukJ1RqJm27pqpN54rFGGr2VDwOfqb9tM +ninq8IyOh42eaaVOEPXXu4Q/ATWBEfrbTRBjTpzAE2SSPuQma0lMq0RSVECCgdBOKIhB0H6VxAAA +ADA3WPjUaMWCS9E5KbVDrEcf5CV5tCNNWJQkwjsAyALMCiXJqRVXwbq42WMuaELMW+g= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/key8 b/security/nss/cmd/bltest/tests/ecdsa/key8 new file mode 100644 index 0000000000..5a8eec2df0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key8 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBFAOD4kkHmLG2ASSN8n3K/R/ZNOKl8egsJUv+l2KNicOjOJqwTnhi1gN +0gFX6tV0ZN9IEzj48bvMG3T9goEptgk5GWVMZv4tbsctnWzO6xEOD3szB0rWc+0Gdc9ZNxVuWQAA +ADBMZ8FYtBjL0iyvCuK3sv7SKqjPBlRap0IhzlhGq8yROlBNj9O9T+SbVPqSGg4dca0= diff --git a/security/nss/cmd/bltest/tests/ecdsa/key9 b/security/nss/cmd/bltest/tests/ecdsa/key9 new file mode 100644 index 0000000000..c794c44c80 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/key9 @@ -0,0 +1,3 @@ +AAAABwYFK4EEACIAAABhBHwN4O5s8oMHEZRW9Cw25pBY1wN3aEA1FhY+YB6pGuRWW2gyR8gER0LJ +iaL678GU9dRO6M3vqtxUXtmS/f3RkvsV/kcQa5tod5G7EPGzcnnhxB4jQ7s+eVtDEE3LQRm54AAA +ADA4ahA2Ems2zcznoW2Ogdv9XOTfuVU5cx7RvcygOqljsXs7kMIiK0g7ChP9AgRcmmM= diff --git a/security/nss/cmd/bltest/tests/ecdsa/numtests b/security/nss/cmd/bltest/tests/ecdsa/numtests new file mode 100644 index 0000000000..aabe6ec390 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/numtests @@ -0,0 +1 @@ +21 diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext0 b/security/nss/cmd/bltest/tests/ecdsa/plaintext0 new file mode 100644 index 0000000000..48fbdb6fde --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext0 @@ -0,0 +1 @@ +qZk+NkcGgWq6PiVxeFDCbJzQ2J0= diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext1 b/security/nss/cmd/bltest/tests/ecdsa/plaintext1 new file mode 100644 index 0000000000..f393cca4ad --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext1 @@ -0,0 +1 @@ +70+lqMS2yiBPPask+j3Iru0I+CBps0dkxKYv9wkKN/0= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext10 b/security/nss/cmd/bltest/tests/ecdsa/plaintext10 new file mode 100644 index 0000000000..2c85a2b929 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext10 @@ -0,0 +1 @@ +O7xOr9dtXLrVOUwnoZuOamJoksOCu/AJQl7vnM5nKBrG+MiyB6tT0QinvJf/V/Dg diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext11 b/security/nss/cmd/bltest/tests/ecdsa/plaintext11 new file mode 100644 index 0000000000..bfcb0c7199 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext11 @@ -0,0 +1 @@ +2Ea3W3p+4T9F8jQ3u1sB08h45Icn0g0XZdAkqkZAl8C+bNRt7HFD2yelVjO1n2++ diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext12 b/security/nss/cmd/bltest/tests/ecdsa/plaintext12 new file mode 100644 index 0000000000..a088eefc86 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext12 @@ -0,0 +1 @@ +7tI6LK4h3omU9JIsy3YQ5D35Q6bvA7SSHC5dfr7HRHVBO0aHG8LvB/MmUeSKC1Lx diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext13 b/security/nss/cmd/bltest/tests/ecdsa/plaintext13 new file mode 100644 index 0000000000..b25b1b58f8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext13 @@ -0,0 +1 @@ +V3J3ZsDxwglKTddpj0cZb+iDqOyJ6GeQqJAkPW9bFwAmsD2UVBntvKR4kQsk7CQR diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext14 b/security/nss/cmd/bltest/tests/ecdsa/plaintext14 new file mode 100644 index 0000000000..48fbdb6fde --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext14 @@ -0,0 +1 @@ +qZk+NkcGgWq6PiVxeFDCbJzQ2J0= diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext15 b/security/nss/cmd/bltest/tests/ecdsa/plaintext15 new file mode 100644 index 0000000000..12108ddcc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext15 @@ -0,0 +1,2 @@ +ASGhzaNwWzEVNsr0G7vLgzHLmwanZp/58qj/yrcC711bn6cAzVnm0yD7klFyypW55PmE07T0b45D +0hMzO3URX8kY \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext16 b/security/nss/cmd/bltest/tests/ecdsa/plaintext16 new file mode 100644 index 0000000000..66e3b7b275 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext16 @@ -0,0 +1,2 @@ +ACU0to4fsw+gcz5fwzPuRGxbnh1wk0kNPbk09Bg7zarJb/0SnZf0RL/JciIZXS0mfZwBprfYcLss +g5E09EiLyYPE diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext17 b/security/nss/cmd/bltest/tests/ecdsa/plaintext17 new file mode 100644 index 0000000000..f5df9aeb6d --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext17 @@ -0,0 +1,2 @@ +AHFZ+2hr7LE73SrITnxBdRIAQuIhe9sJv2IjH6mZ63hz7B0lUZBRq1L1UZYCMiJcySQE72fm58qD +HBTp4TZFT4i6 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext18 b/security/nss/cmd/bltest/tests/ecdsa/plaintext18 new file mode 100644 index 0000000000..f1c641f08d --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext18 @@ -0,0 +1,2 @@ +ASwIYky567pL6O3quwElPDfKVZO/7mDgYfyTfDXPdgzshZy5m0m9QeBHyt+nR0tHHEQGGm+fyhD2 +j3ymdPPQ7vhO \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext19 b/security/nss/cmd/bltest/tests/ecdsa/plaintext19 new file mode 100644 index 0000000000..a7586d77c1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext19 @@ -0,0 +1,2 @@ +AeL/vCfQJqo6G0cKf4JP85zORGd2wDp47NI8jilqs3hPzN0DRV322Kgwpn1Wm819FP6zOiMgtw+p +lKiA2AoX9vA1 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext2 b/security/nss/cmd/bltest/tests/ecdsa/plaintext2 new file mode 100644 index 0000000000..65a772dd0f --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext2 @@ -0,0 +1 @@ +SfpXl5Llf4iquhkXy4lshoIqoSbnaBB+PxGW17x99sU= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext20 b/security/nss/cmd/bltest/tests/ecdsa/plaintext20 new file mode 100644 index 0000000000..c41bffa25c --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext20 @@ -0,0 +1,2 @@ +ANDejmBr18vwOj5bRuaVvsbCJsJUnsY0h7meGKBmehWiaSzEy+Uk3frUxD+jFwB3QJ+y00mfjJHk +gcQTb1dNKtk7 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext3 b/security/nss/cmd/bltest/tests/ecdsa/plaintext3 new file mode 100644 index 0000000000..aff2e23609 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext3 @@ -0,0 +1 @@ +5zRhgEl3WocyPf53pVA08iC9rhwsXNu6esNgfNOd09A= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext4 b/security/nss/cmd/bltest/tests/ecdsa/plaintext4 new file mode 100644 index 0000000000..ac7fcfec9d --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext4 @@ -0,0 +1 @@ +CbvtewBEVhbGdugFywOCh7YyM/99PoGsqgmM100hFok= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext5 b/security/nss/cmd/bltest/tests/ecdsa/plaintext5 new file mode 100644 index 0000000000..ecba6e38bd --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext5 @@ -0,0 +1 @@ +cROiGlKZaGbm1nfrM2L8YXXX9l+h4IkQtI5ovo66Vm0= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext6 b/security/nss/cmd/bltest/tests/ecdsa/plaintext6 new file mode 100644 index 0000000000..c834e9c34d --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext6 @@ -0,0 +1 @@ +nBtD5rFYJ+4NmPw6qfeAxfcjl+UtcHJ6AtXgnC04Kck= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext7 b/security/nss/cmd/bltest/tests/ecdsa/plaintext7 new file mode 100644 index 0000000000..48fbdb6fde --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext7 @@ -0,0 +1 @@ +qZk+NkcGgWq6PiVxeFDCbJzQ2J0= diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext8 b/security/nss/cmd/bltest/tests/ecdsa/plaintext8 new file mode 100644 index 0000000000..064bd690cb --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext8 @@ -0,0 +1,2 @@ +Mxl2AoAoODkjI3BRRJhERyaYl3mGdClyckJTOYg3ApBlAXdQY2mQJmOXQDiUiXhyGEIyEWWRcJJI +GQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/plaintext9 b/security/nss/cmd/bltest/tests/ecdsa/plaintext9 new file mode 100644 index 0000000000..53199176dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/plaintext9 @@ -0,0 +1 @@ +cxSK1gNt4qh6Q/YMYTPGb06yvMmOA8CdF2Fe+TA3KWu9Sma4Uw60bsNiUXVfGJaG diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed0 b/security/nss/cmd/bltest/tests/ecdsa/sigseed0 new file mode 100644 index 0000000000..05d7fd2d65 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed0 @@ -0,0 +1 @@ +aHpm2QZI+ZOGfhIfTd+d2wEgVYQ= diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed1 b/security/nss/cmd/bltest/tests/ecdsa/sigseed1 new file mode 100644 index 0000000000..1a8f41a8bc --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed1 @@ -0,0 +1 @@ ++uIjgHPQK45HEoD6scaacINDhCSlavy/LOQstFOjA9I= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed10 b/security/nss/cmd/bltest/tests/ecdsa/sigseed10 new file mode 100644 index 0000000000..a2adf8a40f --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed10 @@ -0,0 +1 @@ +Ee3Cm8MeIculRkFplZnPEv7gBCPRTq+C9g55xgfw6XlEDgwQ2O4sW0QBpSbV1bkE diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed11 b/security/nss/cmd/bltest/tests/ecdsa/sigseed11 new file mode 100644 index 0000000000..5dbd37dbb7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed11 @@ -0,0 +1 @@ +eacQrgxAKTRE67OWEAIn1PiBGMjr1MHrAvugBZGvWLWj0qpJK7ysGrP5AUU5knA6 diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed12 b/security/nss/cmd/bltest/tests/ecdsa/sigseed12 new file mode 100644 index 0000000000..8d85f4c971 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed12 @@ -0,0 +1 @@ +OZyWwfeQNAwuldqcxrvG6D1U53pto7nNeBtFOxWApMAsfy8znVlNJ392yPOYFXR1 diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed13 b/security/nss/cmd/bltest/tests/ecdsa/sigseed13 new file mode 100644 index 0000000000..05ad2f58d1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed13 @@ -0,0 +1 @@ +E5M7txkzv3/JJzgkWgYkjSb+auo3diREUK6QtEe5tUovRinB9D62rwsUnYO4Zh9h diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed14 b/security/nss/cmd/bltest/tests/ecdsa/sigseed14 new file mode 100644 index 0000000000..4ac0765848 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed14 @@ -0,0 +1 @@ +ATI4MWJpdHNPZlRleHQwMTAyMDMwNDA1MDYwNzA4MDkwYTBi diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed15 b/security/nss/cmd/bltest/tests/ecdsa/sigseed15 new file mode 100644 index 0000000000..647e49207e --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed15 @@ -0,0 +1,2 @@ +AWTDEcA39i86TZu4RjBbkDE4Bo0PcPsy3Vs7uSpfEpzG1za21tk7778bg0zjh+Cn40uqfG0F47do +hMKNtshEivBN \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed16 b/security/nss/cmd/bltest/tests/ecdsa/sigseed16 new file mode 100644 index 0000000000..603e1d8b28 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed16 @@ -0,0 +1,2 @@ +ASnw0hIQ2FzntL2vHcZrIFWeJHVhlPlIBQformN6nv8vzp7a9/hqIudPY/uHv001e9ryEuczmG36 +cgjmxOTEca2X \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed17 b/security/nss/cmd/bltest/tests/ecdsa/sigseed17 new file mode 100644 index 0000000000..34b0ad79c1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed17 @@ -0,0 +1,2 @@ +AKdGyvpvfzX4pI3TBFsTbVyLLlOoVQXpvz8xYLGB6n/bMEe3pLpsb8lRCbVuS/9agXzY3XZN27PX +tf3CclGx4rbW \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed18 b/security/nss/cmd/bltest/tests/ecdsa/sigseed18 new file mode 100644 index 0000000000..de76ac8a4d --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed18 @@ -0,0 +1,2 @@ +AUr+RxF9oCVYkIwufo/WMRy6x4ftZlTojmEwUIQ3XS/tEtsqOJmvSKB304R1P6hpdghAYUVQ5Lf0 +P8BheUDuOLE5 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed19 b/security/nss/cmd/bltest/tests/ecdsa/sigseed19 new file mode 100644 index 0000000000..f5803e2eff --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed19 @@ -0,0 +1,2 @@ +AJWl5lI4w6SWNnOAIM5JG2/zJlLmG8KtuVy0LALG0geNHjNuh6WOjmBMOB0Ru14m/nvVp/AOXOaD +NXbhZaCuuwoX \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed2 b/security/nss/cmd/bltest/tests/ecdsa/sigseed2 new file mode 100644 index 0000000000..cc79571786 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed2 @@ -0,0 +1 @@ +a5F2DtjzM797shbFrp7g4O/tBT9jdtljEWKhnldZOak= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed20 b/security/nss/cmd/bltest/tests/ecdsa/sigseed20 new file mode 100644 index 0000000000..aacfb9f5f4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed20 @@ -0,0 +1,2 @@ +ABJ+5ak5x4Npkzxcq1hRKJjhKjIy4jVkVDhgZ9+3p+1ItpbJxsWMlVD835yQyeW/lFOENrcLo2Qw +RyNEPndnPG5D \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed3 b/security/nss/cmd/bltest/tests/ecdsa/sigseed3 new file mode 100644 index 0000000000..49473d7f8e --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed3 @@ -0,0 +1 @@ +IV8M637yzsL+KYLyALkf92O+euGBw9PrMopiHcb/SJU= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed4 b/security/nss/cmd/bltest/tests/ecdsa/sigseed4 new file mode 100644 index 0000000000..254aa94a40 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed4 @@ -0,0 +1 @@ +ZxclhYSFGNGLM7tZ1Z5k39ZVXiWCnd/PnsVUza3O/WQ= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed5 b/security/nss/cmd/bltest/tests/ecdsa/sigseed5 new file mode 100644 index 0000000000..6ddd59d81a --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed5 @@ -0,0 +1 @@ +gbPop+RXoXIuYeNAb+IGgLwdTE1AnhG7LsPkfETvayQ= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed6 b/security/nss/cmd/bltest/tests/ecdsa/sigseed6 new file mode 100644 index 0000000000..3f9c9808fb --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed6 @@ -0,0 +1 @@ +WAHT3XYcVbT0ZB5MxfUo9636BVA4JkEKcYBFhQvIWkQ= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed7 b/security/nss/cmd/bltest/tests/ecdsa/sigseed7 new file mode 100644 index 0000000000..a0687196c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed7 @@ -0,0 +1 @@ +/jE5MmJpdHNPZlRleHQwMDAwMDAwMDAw diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed8 b/security/nss/cmd/bltest/tests/ecdsa/sigseed8 new file mode 100644 index 0000000000..ad47b64b79 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed8 @@ -0,0 +1 @@ +LLGTvUo3kUNR3qdAVcvKCDEFPT/ialozxy0RY3aJJxkJJ3NpuXl3l7v6dUo51/qg diff --git a/security/nss/cmd/bltest/tests/ecdsa/sigseed9 b/security/nss/cmd/bltest/tests/ecdsa/sigseed9 new file mode 100644 index 0000000000..080fceb649 --- /dev/null +++ b/security/nss/cmd/bltest/tests/ecdsa/sigseed9 @@ -0,0 +1 @@ +3pch8aH8+9zNR8+8P8gS0ftX0dqTkzExF1x4TkKfnYUfttwtkU0D1ge62Hg0tiVr diff --git a/security/nss/cmd/bltest/tests/md2/ciphertext0 b/security/nss/cmd/bltest/tests/md2/ciphertext0 new file mode 100644 index 0000000000..22e1fc496c --- /dev/null +++ b/security/nss/cmd/bltest/tests/md2/ciphertext0 @@ -0,0 +1 @@ +CS/UNcrWhB5Knt7Gf8Tz3Q== diff --git a/security/nss/cmd/bltest/tests/md2/numtests b/security/nss/cmd/bltest/tests/md2/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/md2/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/md2/plaintext0 b/security/nss/cmd/bltest/tests/md2/plaintext0 new file mode 100644 index 0000000000..dce2994ba5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/md2/plaintext0 @@ -0,0 +1 @@ +16-bytes to MD2. diff --git a/security/nss/cmd/bltest/tests/md5/ciphertext0 b/security/nss/cmd/bltest/tests/md5/ciphertext0 new file mode 100644 index 0000000000..ea11ee523b --- /dev/null +++ b/security/nss/cmd/bltest/tests/md5/ciphertext0 @@ -0,0 +1 @@ +XN8lnQuWAiMqmSGfvd8Hdw== diff --git a/security/nss/cmd/bltest/tests/md5/numtests b/security/nss/cmd/bltest/tests/md5/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/md5/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/md5/plaintext0 b/security/nss/cmd/bltest/tests/md5/plaintext0 new file mode 100644 index 0000000000..5ae3875e2a --- /dev/null +++ b/security/nss/cmd/bltest/tests/md5/plaintext0 @@ -0,0 +1 @@ +63-byte input to MD5 can be a bit tricky, but no problems here. diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0 new file mode 100644 index 0000000000..d964ef8644 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_cbc/ciphertext0 @@ -0,0 +1 @@ +3ki6eVsWpY8= diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/iv0 b/security/nss/cmd/bltest/tests/rc2_cbc/iv0 new file mode 100644 index 0000000000..97b5955f78 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_cbc/iv0 @@ -0,0 +1 @@ +12345678 diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/key0 b/security/nss/cmd/bltest/tests/rc2_cbc/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_cbc/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/numtests b/security/nss/cmd/bltest/tests/rc2_cbc/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_cbc/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/rc2_cbc/plaintext0 b/security/nss/cmd/bltest/tests/rc2_cbc/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_cbc/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0 new file mode 100644 index 0000000000..337d307655 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_ecb/ciphertext0 @@ -0,0 +1 @@ +WT+tc4fANhQ= diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/key0 b/security/nss/cmd/bltest/tests/rc2_ecb/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_ecb/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/numtests b/security/nss/cmd/bltest/tests/rc2_ecb/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_ecb/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/rc2_ecb/plaintext0 b/security/nss/cmd/bltest/tests/rc2_ecb/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc2_ecb/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/rc4/ciphertext0 b/security/nss/cmd/bltest/tests/rc4/ciphertext0 new file mode 100644 index 0000000000..004f13472a --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/ciphertext0 @@ -0,0 +1 @@ +34sTZJtr20k= diff --git a/security/nss/cmd/bltest/tests/rc4/ciphertext1 b/security/nss/cmd/bltest/tests/rc4/ciphertext1 new file mode 100644 index 0000000000..6050da4c68 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/ciphertext1 @@ -0,0 +1 @@ +34sTZJtr20nGP6VxS3BIBxxIYm6QGIa1rehFHn51z9M= diff --git a/security/nss/cmd/bltest/tests/rc4/key0 b/security/nss/cmd/bltest/tests/rc4/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/rc4/key1 b/security/nss/cmd/bltest/tests/rc4/key1 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/key1 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/rc4/numtests b/security/nss/cmd/bltest/tests/rc4/numtests new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/numtests @@ -0,0 +1 @@ +2 diff --git a/security/nss/cmd/bltest/tests/rc4/plaintext0 b/security/nss/cmd/bltest/tests/rc4/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/rc4/plaintext1 b/security/nss/cmd/bltest/tests/rc4/plaintext1 new file mode 100644 index 0000000000..d41abc7b84 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc4/plaintext1 @@ -0,0 +1 @@ +Mozilla!Mozilla!Mozilla!Mozilla! diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0 new file mode 100644 index 0000000000..544713b339 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_cbc/ciphertext0 @@ -0,0 +1 @@ +qsv4Fn2J6d0= diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/iv0 b/security/nss/cmd/bltest/tests/rc5_cbc/iv0 new file mode 100644 index 0000000000..97b5955f78 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_cbc/iv0 @@ -0,0 +1 @@ +12345678 diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/key0 b/security/nss/cmd/bltest/tests/rc5_cbc/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_cbc/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/numtests b/security/nss/cmd/bltest/tests/rc5_cbc/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_cbc/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/params0 b/security/nss/cmd/bltest/tests/rc5_cbc/params0 new file mode 100644 index 0000000000..d68e0362d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_cbc/params0 @@ -0,0 +1,2 @@ +rounds=10 +wordsize=4 diff --git a/security/nss/cmd/bltest/tests/rc5_cbc/plaintext0 b/security/nss/cmd/bltest/tests/rc5_cbc/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_cbc/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0 new file mode 100644 index 0000000000..133777dd08 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_ecb/ciphertext0 @@ -0,0 +1 @@ +4ZKK/1v5Ohc= diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/key0 b/security/nss/cmd/bltest/tests/rc5_ecb/key0 new file mode 100644 index 0000000000..65513c116c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_ecb/key0 @@ -0,0 +1 @@ +zyxwvuts diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/numtests b/security/nss/cmd/bltest/tests/rc5_ecb/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_ecb/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/params0 b/security/nss/cmd/bltest/tests/rc5_ecb/params0 new file mode 100644 index 0000000000..d68e0362d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_ecb/params0 @@ -0,0 +1,2 @@ +rounds=10 +wordsize=4 diff --git a/security/nss/cmd/bltest/tests/rc5_ecb/plaintext0 b/security/nss/cmd/bltest/tests/rc5_ecb/plaintext0 new file mode 100644 index 0000000000..5513e438c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rc5_ecb/plaintext0 @@ -0,0 +1 @@ +Mozilla! diff --git a/security/nss/cmd/bltest/tests/rsa/ciphertext0 b/security/nss/cmd/bltest/tests/rsa/ciphertext0 new file mode 100644 index 0000000000..943ea599ae --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa/ciphertext0 @@ -0,0 +1 @@ +qPVrXv0y3SC5rY44bIi6GE4Aec8uDpHH7/cCg0FU5as= diff --git a/security/nss/cmd/bltest/tests/rsa/key0 b/security/nss/cmd/bltest/tests/rsa/key0 new file mode 100644 index 0000000000..1352fe9866 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa/key0 @@ -0,0 +1,4 @@ +AAAAAAAAACC5lyu2K2ro8YGnvOCKaL1sFX1HEIblIVbuMXsa8oeFSwAAAAERAAAA +IBXVjKwFG6LvPG4WOIjBBzmxGNpkQwDs3W5qZcXVzqahAAAAEOEOH/WnhZCJyM39 +oNfhf18AAAAQ0xvmxqXXs3L62xxogUl9lQAAABAaeiHgqkvy4wiQtG1Gkv/tAAAA +EMaw2TNu6SFdKFXAYluQdjEAAAAQi0u+IlgKCt/hatGAsTrfzQ== diff --git a/security/nss/cmd/bltest/tests/rsa/numtests b/security/nss/cmd/bltest/tests/rsa/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/rsa/plaintext0 b/security/nss/cmd/bltest/tests/rsa/plaintext0 new file mode 100644 index 0000000000..d915bc88c4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa/plaintext0 @@ -0,0 +1 @@ +512bitsforRSAPublicKeyEncryption diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext0 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext0 new file mode 100644 index 0000000000..7037fa2e10 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext0 @@ -0,0 +1,3 @@ +NU/me0oSbV01/jbHd3kaP3uhPe9ITi05CK/3IvrUaPshaW3pXQvpEcLTF0+K/MIBA197bY5pQC3l +RRYYwhpTX6nXv8W43Z/CQ/jPkn2zEyLW6IHqqRqZYXDmV6BaJmQm2YyIAD+Ed8EicJSg2foejEAk +MJzh7My1IQA11HrHLoo= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext1 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext1 new file mode 100644 index 0000000000..4cece4832f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext1 @@ -0,0 +1,3 @@ +ZA2xrMWOBWj+VAfl+bcB3/jDyR5xbFNvx/zsbLW3HBFlmI1KJ54Vd9cw/Hopky4/AMgVFSNtjY4x +AXp6Cd9DUtkEzet5qlg63MMeppikwFKD2rqQib5UkfZ8Gk7kjcdLu+ZkOu+EZnm0yzlaNS1e0RWR +LfaW/+BwKTKUbXFJK0Q= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext10 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext10 new file mode 100644 index 0000000000..6007b8d655 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext10 @@ -0,0 +1,4 @@ +Iyr7ySf6CML2onuH1KXLCcB9wm+uc9c6kFWIOfT9ZtKBuH7HNLziN7oWZpjtgpEGp95pQs1s3OeP +7Y0uTYFCjmZJDQNiZM75KvlB0+NQVf45geFNKcu5pPZ0cwY7rseaEXn1oXycGDLyg4/X1eWbuWWd +VtzooBnt7xuzrMxpfMbMenePYKBkx/b11SnGIQJi4APeWD6B4xZ7iZcfuMDhXUT//vibU9jWTdeX +0Vm1bSsI6lMH6hLCQb1Y1O4nih8u diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext11 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext11 new file mode 100644 index 0000000000..43b65a6706 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext11 @@ -0,0 +1,4 @@ +Q4zH3AimjaJJ5CUF+Fc7pg4sJ3PVspD0z53/cY6EIIHDg+ZwJKDylZTqmHudJeS3OPKFlw0ZWrs6 +jIBU49eda5yagye6WW8SWeJxJmdHZpB9jVgv86hHYVSSmtsebRI1ssy07I9mO6nMZwqSvr2FPI2/ +acZDbQFvYa3YNulHMkUENCB/n9TEPewqEqlY76Ae/iZpiZteYEwlXFX7cWbeVYnjaVl7sJFowG3V +2xd+BqF0DrLVyC+uym2S/O6ZMbqf diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext12 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext12 new file mode 100644 index 0000000000..9d0da8a074 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext12 @@ -0,0 +1,5 @@ +U+pdwIzSYPs7hYVnKH+pFVLDCy/r+6IT8K6HcC0GjRm6sH/ldFI9+0ITnWjDxa/u4L/ky3lpy/OC +uATW5hOWFE4tDmB0H4mTwwFLWLmxlXqLq80jr4VPTDVvsWYqpyv8x+WGVZ3EKA0WDBJnhacj6+6+ +/3HxFZRECq74fRB5Ood0ojnUoEyH/hRnudr4UgjsbHJVeUqWzCkUL5qL1Bjjwf1nNEsM0IKd87K+ +xgJTGWKTxrNNP3XTLyE91Fxic9UFrfTM7RBXy3WPwmru+kQSVe1OZMGZ7gdefxZkYYL9tGRzm2ir +Xa/w5j6VUgFoJPBUv008jJCpe7a2VTKE60KfzA== diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext13 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext13 new file mode 100644 index 0000000000..3ecd857681 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext13 @@ -0,0 +1,5 @@ +orGkMKnWV+L6HCu17UP/slwFowj+kJPAEDF5X1h0QAEQgorlj7m1gc6d3dPlSa4EoJhUWb3mxiZZ +TnsF3EJ4sqFGXBNoQIgjyF6W3GbDowmDxjlmT8RWmjf+IeWhlbV3bu0t+NjTYa9obnUCKbvWY/Fh +hopQYV4MM3vsDKNf7AuxnDbrLgu8wFgvodk6rNsGEGP1nyzh7kNgXl2J7KGD0qzf6fgQEQIq07Q6 +PdQX2slLThHqgbGSlm6WaxgggucZZGB7T4AC82KZhEoR8q4PrqwurnD49PmAiKzc0KxVbp/MxRFS +GQj60m8ExkIBRQMFd4dYsFOL+LW7FEqCjmKXlQ== diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext14 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext14 new file mode 100644 index 0000000000..09d8a8582f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext14 @@ -0,0 +1,5 @@ +mIbD5nZKi5qE6EFI69jDsaqAUDgaePZocUwW2c/Spu3FaXnFNdne47RLhcGL6JKJkjcXEUciFtld +2pjS7oNHybFN/9/4SqSNJawG99fmU5islnsc6Qkl9n3OBJt/gS2wdCmXp01E/oHb4Oej/q8uXECv +iI1VDdu+O8IGV6KVQ/j8KRO5vRphsqsiVuxAm719wNF3F+olxD9C7Sffhzi/SvxnZv96/whZVV7i +g5IPTIpjxKc0DLr93DOezbSwUVAC+WyTK1t5Fnr2mcCtP8z98PROhacCYr8uGP40uFBYmXXoZ/+W +nUjqvyEicVRs3AWmnstSblKHDINvMHvXmHgO3g== diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext15 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext15 new file mode 100644 index 0000000000..bae2acb56e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext15 @@ -0,0 +1,5 @@ +Yxjp+1wNBeUwfhaDQ26QMpOsRkI1iqoiPXFjATq6h+Lf2o5gxoYOKaHpJoYWPqC5F18ynKOxMaHt +06d3Wai5e61qT49DlvKM9vOcpYES5IFg1uID2qWFbzrKX/7Vd69JlAjj39Iz4+YE2+NKnEyQgt5l +UnysYzHSncgOBQig+nEi5/Mp9sylz6NNTR2kF4BUV+AIvsVJ5Hj/nhKnY8R30Vu7ePW2m9V4MPws +TtaG15vHKpXYX4gTTGsK/laozPvIVYKLszm9F5Cc8dcN4zNa4HA5CT5gbWVTZd5lULhyzW3h1EDu +AxthlF9imtijU7DUCTnpajxFDSqNXu6fZ4CTyA== diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext16 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext16 new file mode 100644 index 0000000000..6226b0e7f6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext16 @@ -0,0 +1,5 @@ +dSkIcsz9SkUFZg1lH1babaoJyhMB2JBjL2qZLz1WXO5GSv3tQO07W+k1ZxTqWqdlX0oTZsLxfHKP +byxaXR+OKEKbxOb48s/42o3A4KmAjkX9CeovpAyyts5v//XA4VnRG2jZCoX3uE4QOwnmgmZkgMZX +UFwJKSWUaKMUeG106rExVzzyNL9X232eZsxnSBkuAC3A3uqTBYXwgx/c2bwz1R957S/8Frz01ZgS +/OvKo/kGmw5EVobWRMJcz2O0Vu5fpv/pbxnN91H+2erzWVd1Tb9L/qUhaqGETcUHyy0IDnIuuhUD +CMK1/xGTYg8XZuz0SBuvuUO9KSh38hNspJSroA== diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext17 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext17 new file mode 100644 index 0000000000..9095393e01 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext17 @@ -0,0 +1,5 @@ +LSB6c0Mqj7TAMFGz9zsophdkCY36NMR6IJlfgRWqaBZnm1V+gtvuWEkIxuaXgtfes029Za8GPVf8 +p2pf0GlJL9YGjZmE0gk1BWWmLlx38jA4wSyxDGY0cJtUfEb2tKcJvYXKEi10Rl75d2LCl2Pgbbx6 +nnOMeL/KAQLcXnnWW5c/KCQMqrLhYaeLV9JiRX7YGV1T48eunaAhiDxtt8JK/dIyLqyXKtPDVMX8 +7x4UbDoCkPtnrfAHBm4AQo0s7BjOWPkyhpje/vSy617HaRj94cGYy7OLevxnYmqa7+xDIr/ZDSVj +SByaIh94yCcsgtG2KrkU4cafavbvMMpSYNtKRg== diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext2 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext2 new file mode 100644 index 0000000000..8eb40cd8c0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext2 @@ -0,0 +1,3 @@ +Qjc27QNfYCavJ2w1wLN0GzZeX3bKCRtOjCni8L7+5gNZWqgyLWAtLmJeleuBsvHJck6CLsp224YY +zwnFNDUDpDYINbWQO8Y344efsF4O8yaF1a7FBnzXzJb+SyZwturDBmsfz1aGtoWJqvt9YpsC2Phi +XKODNiTUgA+wgbHPlOs= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext3 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext3 new file mode 100644 index 0000000000..1e86bb071b --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext3 @@ -0,0 +1,3 @@ +RerUylUeZiyYAPGsqCg7BSXmq64wvktKunYvpA/T044iq+/Gl5T267vAXduxEhYkfS9BL9D7qHxu +Os2IiBNkb9DkjnhSBPnD9z1tgjlWJyLd3Ydx/sSLg6Me5vWSxM/UvIgXTzsToRKq47n3uA4Pxvcl +W6iA3H2AIeIq1qhfB1U= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext4 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext4 new file mode 100644 index 0000000000..3f87612fc8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext4 @@ -0,0 +1,3 @@ +NvbjTZSo002qy6M6ITnQCthak0WoYFHnMHFiAFa5IOIZAFhVohOg8jiXzc1zG0UlfHd/6QggK+/d +C1g4axJE6gz1OaBdXRAynaROEwMP12Dc1kTP7yCU0ZENP0M+HHxt0YvB8t9/ZD1mL7ndN+rZBZGQ +9PpmyjnoacTrRJy9xDk= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext5 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext5 new file mode 100644 index 0000000000..64a5f4fe72 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext5 @@ -0,0 +1,3 @@ +Qs7iYXsezqTbP0gpOG+9Ydr78DjhgNg3yWNm3yTAl7SrD6xr31kNghyfEGQuaBrQW414s3jA9Gzi ++tY/dOCtPfBrB11+tfVjb41AO5BZynYbXGK7UqpFAC6nC6rOCN7SQ7nYy9YqaK3iZYMrVlZOQ6b6 +Qu0ZmgmXaXQt8VOeglU= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext6 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext6 new file mode 100644 index 0000000000..9af9805c60 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext6 @@ -0,0 +1,4 @@ +JnvNEYrKsfyLqByF1zADy4YQ+lXB2X2o1Ip8fwaJak23UaooQlW502rWXzdlPYKfGzf5e4ABlCVF +svwsVac3bKehvksXYMjgWjPlqiUmuNmOMXCI54NMdVsqWbEmMaGCwF1dQ6sXeSZPhFb1Fc5X399R +LVST2re3M43Et9eNucCRrDuvU3pp/H9UnZefDv+alP2kFpvU0dGaacmeM8O1VJDVAbObHtrhGP9n +k6FTJhWE06Xzn25oLj0XyM0SYfpy diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext7 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext7 new file mode 100644 index 0000000000..4396ffbafd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext7 @@ -0,0 +1,4 @@ +k6yfBnHsKay7RE7/waV0E1HWD9sOOT+/dUrPDeSXYaFIQd93cum8gnc5ZqFYTE1yuuoAEY+D81zK +blN8vU2BH1WDspeD2KbZTNMb5w1vUmwQ/wnG+nzgaXlaP80FEf1fy1ZLzIDqnHjzi4ABJTnYpN32 +/oHpzdt/UNu7vMfl2GCXzPTsSRifuL8xi+bVoHFdUWtJrxkSWM0y3IM85utGc8A6Gbus6IzFSJX2 +NswMHsiQltEc4jWiZcoXZCMqaJro diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext8 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext8 new file mode 100644 index 0000000000..5d53ef0b0c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext8 @@ -0,0 +1,4 @@ +gevdlQVLDIIu+a12k/Woet+0tMTOcN8t+E7UnATaWLpfwgoZ4abot6OQCyJ5bcToae5rQnktFajs +61bAnGmRToE86o9pMeS47W9CGvKY1ZXJf0eJx8qmEsfvNgmEwhuT7cVAEGi1r0x4qHcbmE1TuOqK +3y9qfUoLp2x14d2fZY8g3tSkYHHUbXeRtWgD2P6n8LD45Brj8JODpvlYX+d1Pqr/0r+UVjEIvuzC +B7u1NfX8xwXw3en3CMYvSanJA3HT diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext9 b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext9 new file mode 100644 index 0000000000..6e865ff4bc --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/ciphertext9 @@ -0,0 +1,4 @@ +vMNflM3mbLETZiXWJblEMqNbIvPS+hGmE/8PylvVf4e5AszcHNCuvLBxXuhp0dH+OV9nkwA/XspG +UFnIhmDURv9fCBhVICJVfjjAimfq2ZEmIlTxBoKXXsVjl3aFN/SXevbV9qrOt/sl3sWTcjAjH9iX +ivSRGaKfKeQkq4JytHVieS1clPd0uIKdCw2fGoye3fN1dNX6JI7vqcUnH8XsJXnIG91htBD6Yf42 +5CQiHBE63bJ1ZkyAHTTKjGNR5KhY diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash0 b/security/nss/cmd/bltest/tests/rsa_oaep/hash0 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash0 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash1 b/security/nss/cmd/bltest/tests/rsa_oaep/hash1 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash1 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash10 b/security/nss/cmd/bltest/tests/rsa_oaep/hash10 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash10 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash11 b/security/nss/cmd/bltest/tests/rsa_oaep/hash11 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash11 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash12 b/security/nss/cmd/bltest/tests/rsa_oaep/hash12 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash12 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash13 b/security/nss/cmd/bltest/tests/rsa_oaep/hash13 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash13 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash14 b/security/nss/cmd/bltest/tests/rsa_oaep/hash14 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash14 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash15 b/security/nss/cmd/bltest/tests/rsa_oaep/hash15 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash15 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash16 b/security/nss/cmd/bltest/tests/rsa_oaep/hash16 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash16 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash17 b/security/nss/cmd/bltest/tests/rsa_oaep/hash17 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash17 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash2 b/security/nss/cmd/bltest/tests/rsa_oaep/hash2 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash2 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash3 b/security/nss/cmd/bltest/tests/rsa_oaep/hash3 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash3 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash4 b/security/nss/cmd/bltest/tests/rsa_oaep/hash4 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash4 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash5 b/security/nss/cmd/bltest/tests/rsa_oaep/hash5 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash5 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash6 b/security/nss/cmd/bltest/tests/rsa_oaep/hash6 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash6 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash7 b/security/nss/cmd/bltest/tests/rsa_oaep/hash7 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash7 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash8 b/security/nss/cmd/bltest/tests/rsa_oaep/hash8 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash8 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/hash9 b/security/nss/cmd/bltest/tests/rsa_oaep/hash9 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/hash9 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key0 b/security/nss/cmd/bltest/tests/rsa_oaep/key0 new file mode 100644 index 0000000000..61684becc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key0 @@ -0,0 +1 @@ +AAAAAQAAAACAqLOyhK+OtQs4cDSoYPFGxJGfMYdjzWxVmMiuSBGh4KvEx+CwgtaTpef87Wdc9GaFEncsDLxkp0LGxjD1M8jMcvYq6DPEC/JYQumEu3i9v5fAEH1VvbZi9cTg+rmEXLUUjvc5LdOq/5OuHmtme7PUJHYW1PW6ENTP0ibeiNOfFvsAAAADAQABAAAAgFMznP23n8hGamVccxasqFxV/Y9t2Jj9rxGVF+9PUuj9jiWN+T/uGA+g5KspaTzYOxUqVT1KxNGBK4ufpa8Of1X+cwTfQVcJJvMxHxXE1lpzLEgxFu49PS0K81Sa2b98v7eK2IT4TVvrBHJNxzabMd7zfQz1OenPzdPeZTcp6tXRAAAAQNMnN+cmf/4TQbLVwNFQqBtYb7MTK+0vjVJihkqcufMK84vkSFmNQToXLvuALCGs8cEcUgwvJqRx3K0hLqx8o50AAABAzIhT0dVNpjD6wAT0cfKBx7iYLYIkpJDtvrM9Pj1cyTxHZXA9HdeRZC8fEWoN2FK+JBmyr3K/6aAw6GCwKItddwAAAEAOEr8XGOnO9VmbocOIL+gEapCHTu/OjyzMIOTydB+wozo4SK7JyTBfvsvS12gZln1GcazGQx5AN5aNs3h45pXBAAAAQJUpew+Vovpn0AcH1gnf1PwFyJ2vwu9tbqVb7HceozNzTZJR55CC7NqGbv7xPEWeGmMThrfjVMiZ9fESyoXXFYMAAABAT0VsUCSTvcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mNXb79cyY+NygUJ0OBgWbtfdY2h90qjKHS9PvY4Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key1 b/security/nss/cmd/bltest/tests/rsa_oaep/key1 new file mode 100644 index 0000000000..61684becc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key1 @@ -0,0 +1 @@ +AAAAAQAAAACAqLOyhK+OtQs4cDSoYPFGxJGfMYdjzWxVmMiuSBGh4KvEx+CwgtaTpef87Wdc9GaFEncsDLxkp0LGxjD1M8jMcvYq6DPEC/JYQumEu3i9v5fAEH1VvbZi9cTg+rmEXLUUjvc5LdOq/5OuHmtme7PUJHYW1PW6ENTP0ibeiNOfFvsAAAADAQABAAAAgFMznP23n8hGamVccxasqFxV/Y9t2Jj9rxGVF+9PUuj9jiWN+T/uGA+g5KspaTzYOxUqVT1KxNGBK4ufpa8Of1X+cwTfQVcJJvMxHxXE1lpzLEgxFu49PS0K81Sa2b98v7eK2IT4TVvrBHJNxzabMd7zfQz1OenPzdPeZTcp6tXRAAAAQNMnN+cmf/4TQbLVwNFQqBtYb7MTK+0vjVJihkqcufMK84vkSFmNQToXLvuALCGs8cEcUgwvJqRx3K0hLqx8o50AAABAzIhT0dVNpjD6wAT0cfKBx7iYLYIkpJDtvrM9Pj1cyTxHZXA9HdeRZC8fEWoN2FK+JBmyr3K/6aAw6GCwKItddwAAAEAOEr8XGOnO9VmbocOIL+gEapCHTu/OjyzMIOTydB+wozo4SK7JyTBfvsvS12gZln1GcazGQx5AN5aNs3h45pXBAAAAQJUpew+Vovpn0AcH1gnf1PwFyJ2vwu9tbqVb7HceozNzTZJR55CC7NqGbv7xPEWeGmMThrfjVMiZ9fESyoXXFYMAAABAT0VsUCSTvcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mNXb79cyY+NygUJ0OBgWbtfdY2h90qjKHS9PvY4Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key10 b/security/nss/cmd/bltest/tests/rsa_oaep/key10 new file mode 100644 index 0000000000..3c9f8742f1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key10 @@ -0,0 +1 @@ +AAAAAQAAAADAzyzUHjTKOnKOpcuK/2TDbSe971Nk4zb9aNMSPFoZaowocBPoU9UVbVjRUZVFIPtPbXsXq7aBd2WQnFdhGWWdkCsZBu2KKxDBVcJNEkUo2rnurjeb6sZuSkEXhty4/QBi68Aw3hIZoEwqjBt90xMeTWtsruLjGl7UGsFQmy7x7iqxg2S+VoypQcJezIT/nWQ7XsGqrhAqINc/R5t4D9bakQdSEtnqwDoGdNiZ66LkMfTES2Fba6IjK9SzO67XPWJdAAAAAwEAAQAAAMAZjBQeI3FakrzPahGaW8ETiUaNKBH1SNcn4XtKsOuYbW8hHvtTtx98y+qH7mnHXuYVAIxTMt61K/OQq9+/431yBTaBWbJjjB3jJuIdIiUfD7WEizvxUAXSp0Mw8K/pFu5izME0TR2DpwnmBnYnOED383dCSl4KTadfAbMf92gZz5y/3SFSQ8ORfAPvOBmTEuVns7967Tq0V/Nx74oUI/RbaMbiguwRG7ooM7mH/Wn62DvBuMYTxeHqFsEe0SXqfsEAAABg/I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8bzZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79AAAAYNIA1F54iqzqYGpAHQRg+H3VwQJ+EtwaDXWG6JOdnPeJtA9RrARClh3n0hzCHgXIMVXB8qqRkzh8/flWy0jRU7onBAb5u7pTfUmH2eL5lC16FMv//qdP7N2pKNI+JZ9e4QAAAGDbFoAveaLw1F81jWn9M+RLgfroKGIuk6VCU+mX0BsHQ3WdoOgStKpObIvqsjKNVDGVWkGKZ/8mqMXIB6XaNU4F7zHMjPdY9GNzKVCwPiZXJvuU451qVyomJEqwjbdXUq0AAABgoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZblo5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iYpHnoCuKU/tKhAAAAYAsh8zXDUzQutEw6okRFeAwtZVuUAXTK44x8ik5kk8C6n9MDdIJnsIO5p6bLYeQts2K4yYlttwZOAq1a5hWH2hW0ZJyQWUkJ/rN9vLZUvrcmjsgB5ai0qjkRvr2IVC8Fvg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key11 b/security/nss/cmd/bltest/tests/rsa_oaep/key11 new file mode 100644 index 0000000000..3c9f8742f1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key11 @@ -0,0 +1 @@ +AAAAAQAAAADAzyzUHjTKOnKOpcuK/2TDbSe971Nk4zb9aNMSPFoZaowocBPoU9UVbVjRUZVFIPtPbXsXq7aBd2WQnFdhGWWdkCsZBu2KKxDBVcJNEkUo2rnurjeb6sZuSkEXhty4/QBi68Aw3hIZoEwqjBt90xMeTWtsruLjGl7UGsFQmy7x7iqxg2S+VoypQcJezIT/nWQ7XsGqrhAqINc/R5t4D9bakQdSEtnqwDoGdNiZ66LkMfTES2Fba6IjK9SzO67XPWJdAAAAAwEAAQAAAMAZjBQeI3FakrzPahGaW8ETiUaNKBH1SNcn4XtKsOuYbW8hHvtTtx98y+qH7mnHXuYVAIxTMt61K/OQq9+/431yBTaBWbJjjB3jJuIdIiUfD7WEizvxUAXSp0Mw8K/pFu5izME0TR2DpwnmBnYnOED383dCSl4KTadfAbMf92gZz5y/3SFSQ8ORfAPvOBmTEuVns7967Tq0V/Nx74oUI/RbaMbiguwRG7ooM7mH/Wn62DvBuMYTxeHqFsEe0SXqfsEAAABg/I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8bzZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79AAAAYNIA1F54iqzqYGpAHQRg+H3VwQJ+EtwaDXWG6JOdnPeJtA9RrARClh3n0hzCHgXIMVXB8qqRkzh8/flWy0jRU7onBAb5u7pTfUmH2eL5lC16FMv//qdP7N2pKNI+JZ9e4QAAAGDbFoAveaLw1F81jWn9M+RLgfroKGIuk6VCU+mX0BsHQ3WdoOgStKpObIvqsjKNVDGVWkGKZ/8mqMXIB6XaNU4F7zHMjPdY9GNzKVCwPiZXJvuU451qVyomJEqwjbdXUq0AAABgoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZblo5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iYpHnoCuKU/tKhAAAAYAsh8zXDUzQutEw6okRFeAwtZVuUAXTK44x8ik5kk8C6n9MDdIJnsIO5p6bLYeQts2K4yYlttwZOAq1a5hWH2hW0ZJyQWUkJ/rN9vLZUvrcmjsgB5ai0qjkRvr2IVC8Fvg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key12 b/security/nss/cmd/bltest/tests/rsa_oaep/key12 new file mode 100644 index 0000000000..a2ad3ff8d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key12 @@ -0,0 +1 @@ +AAAAAQAAAAEArkXtVgHOxrjMBfgDk1xnTdvg11xMCf15UfxrDK7DE6jfOZcMUYv/ul7Wjz8NfyKkAp1BPxrgfk6+nkF3ziPn9UBLVp5O4b3PPB+wPvETgC1PhV65tRNLWnyAha3K5vovoUF+w3Y74XGwxit2Dt4jwSrZK5gIhMZB9aj6wmva1KAzgaIv4bdUiFCUyCUG1AGaU1ooav6ycbubpZLeGNz2AMKu6uVuAvfPefwUzzvcfNhP67v5UMqQMEsiGaeqBjrvosPBmA5WDNZK/neVhbYQdle5V4V+/eYBCYirfeQX/IjY84TE5ucsP5Q+DDHAxKXMNvh52KOsnX1Zhg6q2muDuwAAAAMBAAEAAAEABWsEIW/l81SsdyUKS2sMhSWoXFmwvYDFZFCiLV9DjllqMzqodeKR3UP0jLiLnV/A1Jn5/NHDl/mvwHDNnjmMjRnmHbfHQQprJnXfv100W4BNIBrdUC1c4t/LCRzpmXu+vlcwbzg+TViBA/A29+hdGTTRUqMj5KjbRR1vSlsbDxAswVDgL+7iuI3qStTBusyyTYQHLRTh0kpncfdAjuMFZPuG1Dk6NLzwt4hQHRkzA/E6IoSwAfD2Ser3kyjUrFxDCrRBSSCpRg7Rt7xA7GU+h20Jq8UJrkW1JRkBFqDCYQGEgphQnBw786SD5ydAVOFelwdQNumJ9gkygHtSV3UeeQAAAIDs9a7NHlUV//rL11ooFsbr9JAYzftGOOGF1mpzlrb4CQ+AGMf9lcw0uFfcF/DMZRa7E0arTVgsra17QQM1I4e3AzjQhAR8nZU5tkliBLPdbqRCSZIHvsAflkKH/2M2w5hGWDNoRvVuRoYYgcECM9IXa/FaXpbdx4C8hoqnfTznaQAAAIC8RsRk/GrEyng7DrCKPIQbdy9+my8our1YiuiF4aDGHkhYoPslrCmZkPNb6FFkwlm6EXXN1xknBxNRhJkrbCm3Rt0NLKvhQoNffRSMwWFSS0oJlG1IuChHPxzna2y2iGw0XAPgX0HVG1w6kKPyQHPH10pP4l2c8hx1lg8/w4YxgwAAAIDHNWRXHQD7FdCKPemVelCRXXEm6UQtrPQryC6GLlZz/2oAjtTS43RhffifF6FgtDt/2py2trdCGGCYFffUXKJjwVmqMtJy0Sf69LyMotdzeOiusZsK19o8s94K5zFJgPYrbUsKh10d8DwbrjnM2DPvbNfi2VKL8ITR+WnnlOn2wQAAAIAmWLN/bfnBAwvh22gRf6nYfjnqK2k7fm06L3CUdBPuxhQuGPuN/LasVF18hqCtSPhFcXDw77JrxIEmxT79HRaSAZjcKhEH3CgttqgM0wYjYLo/oT9w5DEv8abNa4/EzZxcPbF8bWpXIS9zrin2GTJ7rVmxU4WFhbpOKLYKYqReSQAAAIBvOFJrOSUIVTTvPkFag27ei4YViix8v+zLC9g0ME/saDuo1PR5xDPUNBbmMmliPOoQB3bYWv9AHT//YQ7mVBHOOxNj1jqXCe7eQmR86lYUk9VFcKh5wYaCzZdxC5YgXsMRF9c7XzYiP63W6LqQ3XwO5h1E4WMlHiDH9m6zBRF8uA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key13 b/security/nss/cmd/bltest/tests/rsa_oaep/key13 new file mode 100644 index 0000000000..a2ad3ff8d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key13 @@ -0,0 +1 @@ +AAAAAQAAAAEArkXtVgHOxrjMBfgDk1xnTdvg11xMCf15UfxrDK7DE6jfOZcMUYv/ul7Wjz8NfyKkAp1BPxrgfk6+nkF3ziPn9UBLVp5O4b3PPB+wPvETgC1PhV65tRNLWnyAha3K5vovoUF+w3Y74XGwxit2Dt4jwSrZK5gIhMZB9aj6wmva1KAzgaIv4bdUiFCUyCUG1AGaU1ooav6ycbubpZLeGNz2AMKu6uVuAvfPefwUzzvcfNhP67v5UMqQMEsiGaeqBjrvosPBmA5WDNZK/neVhbYQdle5V4V+/eYBCYirfeQX/IjY84TE5ucsP5Q+DDHAxKXMNvh52KOsnX1Zhg6q2muDuwAAAAMBAAEAAAEABWsEIW/l81SsdyUKS2sMhSWoXFmwvYDFZFCiLV9DjllqMzqodeKR3UP0jLiLnV/A1Jn5/NHDl/mvwHDNnjmMjRnmHbfHQQprJnXfv100W4BNIBrdUC1c4t/LCRzpmXu+vlcwbzg+TViBA/A29+hdGTTRUqMj5KjbRR1vSlsbDxAswVDgL+7iuI3qStTBusyyTYQHLRTh0kpncfdAjuMFZPuG1Dk6NLzwt4hQHRkzA/E6IoSwAfD2Ser3kyjUrFxDCrRBSSCpRg7Rt7xA7GU+h20Jq8UJrkW1JRkBFqDCYQGEgphQnBw786SD5ydAVOFelwdQNumJ9gkygHtSV3UeeQAAAIDs9a7NHlUV//rL11ooFsbr9JAYzftGOOGF1mpzlrb4CQ+AGMf9lcw0uFfcF/DMZRa7E0arTVgsra17QQM1I4e3AzjQhAR8nZU5tkliBLPdbqRCSZIHvsAflkKH/2M2w5hGWDNoRvVuRoYYgcECM9IXa/FaXpbdx4C8hoqnfTznaQAAAIC8RsRk/GrEyng7DrCKPIQbdy9+my8our1YiuiF4aDGHkhYoPslrCmZkPNb6FFkwlm6EXXN1xknBxNRhJkrbCm3Rt0NLKvhQoNffRSMwWFSS0oJlG1IuChHPxzna2y2iGw0XAPgX0HVG1w6kKPyQHPH10pP4l2c8hx1lg8/w4YxgwAAAIDHNWRXHQD7FdCKPemVelCRXXEm6UQtrPQryC6GLlZz/2oAjtTS43RhffifF6FgtDt/2py2trdCGGCYFffUXKJjwVmqMtJy0Sf69LyMotdzeOiusZsK19o8s94K5zFJgPYrbUsKh10d8DwbrjnM2DPvbNfi2VKL8ITR+WnnlOn2wQAAAIAmWLN/bfnBAwvh22gRf6nYfjnqK2k7fm06L3CUdBPuxhQuGPuN/LasVF18hqCtSPhFcXDw77JrxIEmxT79HRaSAZjcKhEH3CgttqgM0wYjYLo/oT9w5DEv8abNa4/EzZxcPbF8bWpXIS9zrin2GTJ7rVmxU4WFhbpOKLYKYqReSQAAAIBvOFJrOSUIVTTvPkFag27ei4YViix8v+zLC9g0ME/saDuo1PR5xDPUNBbmMmliPOoQB3bYWv9AHT//YQ7mVBHOOxNj1jqXCe7eQmR86lYUk9VFcKh5wYaCzZdxC5YgXsMRF9c7XzYiP63W6LqQ3XwO5h1E4WMlHiDH9m6zBRF8uA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key14 b/security/nss/cmd/bltest/tests/rsa_oaep/key14 new file mode 100644 index 0000000000..a2ad3ff8d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key14 @@ -0,0 +1 @@ +AAAAAQAAAAEArkXtVgHOxrjMBfgDk1xnTdvg11xMCf15UfxrDK7DE6jfOZcMUYv/ul7Wjz8NfyKkAp1BPxrgfk6+nkF3ziPn9UBLVp5O4b3PPB+wPvETgC1PhV65tRNLWnyAha3K5vovoUF+w3Y74XGwxit2Dt4jwSrZK5gIhMZB9aj6wmva1KAzgaIv4bdUiFCUyCUG1AGaU1ooav6ycbubpZLeGNz2AMKu6uVuAvfPefwUzzvcfNhP67v5UMqQMEsiGaeqBjrvosPBmA5WDNZK/neVhbYQdle5V4V+/eYBCYirfeQX/IjY84TE5ucsP5Q+DDHAxKXMNvh52KOsnX1Zhg6q2muDuwAAAAMBAAEAAAEABWsEIW/l81SsdyUKS2sMhSWoXFmwvYDFZFCiLV9DjllqMzqodeKR3UP0jLiLnV/A1Jn5/NHDl/mvwHDNnjmMjRnmHbfHQQprJnXfv100W4BNIBrdUC1c4t/LCRzpmXu+vlcwbzg+TViBA/A29+hdGTTRUqMj5KjbRR1vSlsbDxAswVDgL+7iuI3qStTBusyyTYQHLRTh0kpncfdAjuMFZPuG1Dk6NLzwt4hQHRkzA/E6IoSwAfD2Ser3kyjUrFxDCrRBSSCpRg7Rt7xA7GU+h20Jq8UJrkW1JRkBFqDCYQGEgphQnBw786SD5ydAVOFelwdQNumJ9gkygHtSV3UeeQAAAIDs9a7NHlUV//rL11ooFsbr9JAYzftGOOGF1mpzlrb4CQ+AGMf9lcw0uFfcF/DMZRa7E0arTVgsra17QQM1I4e3AzjQhAR8nZU5tkliBLPdbqRCSZIHvsAflkKH/2M2w5hGWDNoRvVuRoYYgcECM9IXa/FaXpbdx4C8hoqnfTznaQAAAIC8RsRk/GrEyng7DrCKPIQbdy9+my8our1YiuiF4aDGHkhYoPslrCmZkPNb6FFkwlm6EXXN1xknBxNRhJkrbCm3Rt0NLKvhQoNffRSMwWFSS0oJlG1IuChHPxzna2y2iGw0XAPgX0HVG1w6kKPyQHPH10pP4l2c8hx1lg8/w4YxgwAAAIDHNWRXHQD7FdCKPemVelCRXXEm6UQtrPQryC6GLlZz/2oAjtTS43RhffifF6FgtDt/2py2trdCGGCYFffUXKJjwVmqMtJy0Sf69LyMotdzeOiusZsK19o8s94K5zFJgPYrbUsKh10d8DwbrjnM2DPvbNfi2VKL8ITR+WnnlOn2wQAAAIAmWLN/bfnBAwvh22gRf6nYfjnqK2k7fm06L3CUdBPuxhQuGPuN/LasVF18hqCtSPhFcXDw77JrxIEmxT79HRaSAZjcKhEH3CgttqgM0wYjYLo/oT9w5DEv8abNa4/EzZxcPbF8bWpXIS9zrin2GTJ7rVmxU4WFhbpOKLYKYqReSQAAAIBvOFJrOSUIVTTvPkFag27ei4YViix8v+zLC9g0ME/saDuo1PR5xDPUNBbmMmliPOoQB3bYWv9AHT//YQ7mVBHOOxNj1jqXCe7eQmR86lYUk9VFcKh5wYaCzZdxC5YgXsMRF9c7XzYiP63W6LqQ3XwO5h1E4WMlHiDH9m6zBRF8uA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key15 b/security/nss/cmd/bltest/tests/rsa_oaep/key15 new file mode 100644 index 0000000000..a2ad3ff8d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key15 @@ -0,0 +1 @@ +AAAAAQAAAAEArkXtVgHOxrjMBfgDk1xnTdvg11xMCf15UfxrDK7DE6jfOZcMUYv/ul7Wjz8NfyKkAp1BPxrgfk6+nkF3ziPn9UBLVp5O4b3PPB+wPvETgC1PhV65tRNLWnyAha3K5vovoUF+w3Y74XGwxit2Dt4jwSrZK5gIhMZB9aj6wmva1KAzgaIv4bdUiFCUyCUG1AGaU1ooav6ycbubpZLeGNz2AMKu6uVuAvfPefwUzzvcfNhP67v5UMqQMEsiGaeqBjrvosPBmA5WDNZK/neVhbYQdle5V4V+/eYBCYirfeQX/IjY84TE5ucsP5Q+DDHAxKXMNvh52KOsnX1Zhg6q2muDuwAAAAMBAAEAAAEABWsEIW/l81SsdyUKS2sMhSWoXFmwvYDFZFCiLV9DjllqMzqodeKR3UP0jLiLnV/A1Jn5/NHDl/mvwHDNnjmMjRnmHbfHQQprJnXfv100W4BNIBrdUC1c4t/LCRzpmXu+vlcwbzg+TViBA/A29+hdGTTRUqMj5KjbRR1vSlsbDxAswVDgL+7iuI3qStTBusyyTYQHLRTh0kpncfdAjuMFZPuG1Dk6NLzwt4hQHRkzA/E6IoSwAfD2Ser3kyjUrFxDCrRBSSCpRg7Rt7xA7GU+h20Jq8UJrkW1JRkBFqDCYQGEgphQnBw786SD5ydAVOFelwdQNumJ9gkygHtSV3UeeQAAAIDs9a7NHlUV//rL11ooFsbr9JAYzftGOOGF1mpzlrb4CQ+AGMf9lcw0uFfcF/DMZRa7E0arTVgsra17QQM1I4e3AzjQhAR8nZU5tkliBLPdbqRCSZIHvsAflkKH/2M2w5hGWDNoRvVuRoYYgcECM9IXa/FaXpbdx4C8hoqnfTznaQAAAIC8RsRk/GrEyng7DrCKPIQbdy9+my8our1YiuiF4aDGHkhYoPslrCmZkPNb6FFkwlm6EXXN1xknBxNRhJkrbCm3Rt0NLKvhQoNffRSMwWFSS0oJlG1IuChHPxzna2y2iGw0XAPgX0HVG1w6kKPyQHPH10pP4l2c8hx1lg8/w4YxgwAAAIDHNWRXHQD7FdCKPemVelCRXXEm6UQtrPQryC6GLlZz/2oAjtTS43RhffifF6FgtDt/2py2trdCGGCYFffUXKJjwVmqMtJy0Sf69LyMotdzeOiusZsK19o8s94K5zFJgPYrbUsKh10d8DwbrjnM2DPvbNfi2VKL8ITR+WnnlOn2wQAAAIAmWLN/bfnBAwvh22gRf6nYfjnqK2k7fm06L3CUdBPuxhQuGPuN/LasVF18hqCtSPhFcXDw77JrxIEmxT79HRaSAZjcKhEH3CgttqgM0wYjYLo/oT9w5DEv8abNa4/EzZxcPbF8bWpXIS9zrin2GTJ7rVmxU4WFhbpOKLYKYqReSQAAAIBvOFJrOSUIVTTvPkFag27ei4YViix8v+zLC9g0ME/saDuo1PR5xDPUNBbmMmliPOoQB3bYWv9AHT//YQ7mVBHOOxNj1jqXCe7eQmR86lYUk9VFcKh5wYaCzZdxC5YgXsMRF9c7XzYiP63W6LqQ3XwO5h1E4WMlHiDH9m6zBRF8uA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key16 b/security/nss/cmd/bltest/tests/rsa_oaep/key16 new file mode 100644 index 0000000000..a2ad3ff8d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key16 @@ -0,0 +1 @@ +AAAAAQAAAAEArkXtVgHOxrjMBfgDk1xnTdvg11xMCf15UfxrDK7DE6jfOZcMUYv/ul7Wjz8NfyKkAp1BPxrgfk6+nkF3ziPn9UBLVp5O4b3PPB+wPvETgC1PhV65tRNLWnyAha3K5vovoUF+w3Y74XGwxit2Dt4jwSrZK5gIhMZB9aj6wmva1KAzgaIv4bdUiFCUyCUG1AGaU1ooav6ycbubpZLeGNz2AMKu6uVuAvfPefwUzzvcfNhP67v5UMqQMEsiGaeqBjrvosPBmA5WDNZK/neVhbYQdle5V4V+/eYBCYirfeQX/IjY84TE5ucsP5Q+DDHAxKXMNvh52KOsnX1Zhg6q2muDuwAAAAMBAAEAAAEABWsEIW/l81SsdyUKS2sMhSWoXFmwvYDFZFCiLV9DjllqMzqodeKR3UP0jLiLnV/A1Jn5/NHDl/mvwHDNnjmMjRnmHbfHQQprJnXfv100W4BNIBrdUC1c4t/LCRzpmXu+vlcwbzg+TViBA/A29+hdGTTRUqMj5KjbRR1vSlsbDxAswVDgL+7iuI3qStTBusyyTYQHLRTh0kpncfdAjuMFZPuG1Dk6NLzwt4hQHRkzA/E6IoSwAfD2Ser3kyjUrFxDCrRBSSCpRg7Rt7xA7GU+h20Jq8UJrkW1JRkBFqDCYQGEgphQnBw786SD5ydAVOFelwdQNumJ9gkygHtSV3UeeQAAAIDs9a7NHlUV//rL11ooFsbr9JAYzftGOOGF1mpzlrb4CQ+AGMf9lcw0uFfcF/DMZRa7E0arTVgsra17QQM1I4e3AzjQhAR8nZU5tkliBLPdbqRCSZIHvsAflkKH/2M2w5hGWDNoRvVuRoYYgcECM9IXa/FaXpbdx4C8hoqnfTznaQAAAIC8RsRk/GrEyng7DrCKPIQbdy9+my8our1YiuiF4aDGHkhYoPslrCmZkPNb6FFkwlm6EXXN1xknBxNRhJkrbCm3Rt0NLKvhQoNffRSMwWFSS0oJlG1IuChHPxzna2y2iGw0XAPgX0HVG1w6kKPyQHPH10pP4l2c8hx1lg8/w4YxgwAAAIDHNWRXHQD7FdCKPemVelCRXXEm6UQtrPQryC6GLlZz/2oAjtTS43RhffifF6FgtDt/2py2trdCGGCYFffUXKJjwVmqMtJy0Sf69LyMotdzeOiusZsK19o8s94K5zFJgPYrbUsKh10d8DwbrjnM2DPvbNfi2VKL8ITR+WnnlOn2wQAAAIAmWLN/bfnBAwvh22gRf6nYfjnqK2k7fm06L3CUdBPuxhQuGPuN/LasVF18hqCtSPhFcXDw77JrxIEmxT79HRaSAZjcKhEH3CgttqgM0wYjYLo/oT9w5DEv8abNa4/EzZxcPbF8bWpXIS9zrin2GTJ7rVmxU4WFhbpOKLYKYqReSQAAAIBvOFJrOSUIVTTvPkFag27ei4YViix8v+zLC9g0ME/saDuo1PR5xDPUNBbmMmliPOoQB3bYWv9AHT//YQ7mVBHOOxNj1jqXCe7eQmR86lYUk9VFcKh5wYaCzZdxC5YgXsMRF9c7XzYiP63W6LqQ3XwO5h1E4WMlHiDH9m6zBRF8uA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key17 b/security/nss/cmd/bltest/tests/rsa_oaep/key17 new file mode 100644 index 0000000000..a2ad3ff8d5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key17 @@ -0,0 +1 @@ +AAAAAQAAAAEArkXtVgHOxrjMBfgDk1xnTdvg11xMCf15UfxrDK7DE6jfOZcMUYv/ul7Wjz8NfyKkAp1BPxrgfk6+nkF3ziPn9UBLVp5O4b3PPB+wPvETgC1PhV65tRNLWnyAha3K5vovoUF+w3Y74XGwxit2Dt4jwSrZK5gIhMZB9aj6wmva1KAzgaIv4bdUiFCUyCUG1AGaU1ooav6ycbubpZLeGNz2AMKu6uVuAvfPefwUzzvcfNhP67v5UMqQMEsiGaeqBjrvosPBmA5WDNZK/neVhbYQdle5V4V+/eYBCYirfeQX/IjY84TE5ucsP5Q+DDHAxKXMNvh52KOsnX1Zhg6q2muDuwAAAAMBAAEAAAEABWsEIW/l81SsdyUKS2sMhSWoXFmwvYDFZFCiLV9DjllqMzqodeKR3UP0jLiLnV/A1Jn5/NHDl/mvwHDNnjmMjRnmHbfHQQprJnXfv100W4BNIBrdUC1c4t/LCRzpmXu+vlcwbzg+TViBA/A29+hdGTTRUqMj5KjbRR1vSlsbDxAswVDgL+7iuI3qStTBusyyTYQHLRTh0kpncfdAjuMFZPuG1Dk6NLzwt4hQHRkzA/E6IoSwAfD2Ser3kyjUrFxDCrRBSSCpRg7Rt7xA7GU+h20Jq8UJrkW1JRkBFqDCYQGEgphQnBw786SD5ydAVOFelwdQNumJ9gkygHtSV3UeeQAAAIDs9a7NHlUV//rL11ooFsbr9JAYzftGOOGF1mpzlrb4CQ+AGMf9lcw0uFfcF/DMZRa7E0arTVgsra17QQM1I4e3AzjQhAR8nZU5tkliBLPdbqRCSZIHvsAflkKH/2M2w5hGWDNoRvVuRoYYgcECM9IXa/FaXpbdx4C8hoqnfTznaQAAAIC8RsRk/GrEyng7DrCKPIQbdy9+my8our1YiuiF4aDGHkhYoPslrCmZkPNb6FFkwlm6EXXN1xknBxNRhJkrbCm3Rt0NLKvhQoNffRSMwWFSS0oJlG1IuChHPxzna2y2iGw0XAPgX0HVG1w6kKPyQHPH10pP4l2c8hx1lg8/w4YxgwAAAIDHNWRXHQD7FdCKPemVelCRXXEm6UQtrPQryC6GLlZz/2oAjtTS43RhffifF6FgtDt/2py2trdCGGCYFffUXKJjwVmqMtJy0Sf69LyMotdzeOiusZsK19o8s94K5zFJgPYrbUsKh10d8DwbrjnM2DPvbNfi2VKL8ITR+WnnlOn2wQAAAIAmWLN/bfnBAwvh22gRf6nYfjnqK2k7fm06L3CUdBPuxhQuGPuN/LasVF18hqCtSPhFcXDw77JrxIEmxT79HRaSAZjcKhEH3CgttqgM0wYjYLo/oT9w5DEv8abNa4/EzZxcPbF8bWpXIS9zrin2GTJ7rVmxU4WFhbpOKLYKYqReSQAAAIBvOFJrOSUIVTTvPkFag27ei4YViix8v+zLC9g0ME/saDuo1PR5xDPUNBbmMmliPOoQB3bYWv9AHT//YQ7mVBHOOxNj1jqXCe7eQmR86lYUk9VFcKh5wYaCzZdxC5YgXsMRF9c7XzYiP63W6LqQ3XwO5h1E4WMlHiDH9m6zBRF8uA== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key2 b/security/nss/cmd/bltest/tests/rsa_oaep/key2 new file mode 100644 index 0000000000..61684becc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key2 @@ -0,0 +1 @@ +AAAAAQAAAACAqLOyhK+OtQs4cDSoYPFGxJGfMYdjzWxVmMiuSBGh4KvEx+CwgtaTpef87Wdc9GaFEncsDLxkp0LGxjD1M8jMcvYq6DPEC/JYQumEu3i9v5fAEH1VvbZi9cTg+rmEXLUUjvc5LdOq/5OuHmtme7PUJHYW1PW6ENTP0ibeiNOfFvsAAAADAQABAAAAgFMznP23n8hGamVccxasqFxV/Y9t2Jj9rxGVF+9PUuj9jiWN+T/uGA+g5KspaTzYOxUqVT1KxNGBK4ufpa8Of1X+cwTfQVcJJvMxHxXE1lpzLEgxFu49PS0K81Sa2b98v7eK2IT4TVvrBHJNxzabMd7zfQz1OenPzdPeZTcp6tXRAAAAQNMnN+cmf/4TQbLVwNFQqBtYb7MTK+0vjVJihkqcufMK84vkSFmNQToXLvuALCGs8cEcUgwvJqRx3K0hLqx8o50AAABAzIhT0dVNpjD6wAT0cfKBx7iYLYIkpJDtvrM9Pj1cyTxHZXA9HdeRZC8fEWoN2FK+JBmyr3K/6aAw6GCwKItddwAAAEAOEr8XGOnO9VmbocOIL+gEapCHTu/OjyzMIOTydB+wozo4SK7JyTBfvsvS12gZln1GcazGQx5AN5aNs3h45pXBAAAAQJUpew+Vovpn0AcH1gnf1PwFyJ2vwu9tbqVb7HceozNzTZJR55CC7NqGbv7xPEWeGmMThrfjVMiZ9fESyoXXFYMAAABAT0VsUCSTvcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mNXb79cyY+NygUJ0OBgWbtfdY2h90qjKHS9PvY4Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key3 b/security/nss/cmd/bltest/tests/rsa_oaep/key3 new file mode 100644 index 0000000000..61684becc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key3 @@ -0,0 +1 @@ +AAAAAQAAAACAqLOyhK+OtQs4cDSoYPFGxJGfMYdjzWxVmMiuSBGh4KvEx+CwgtaTpef87Wdc9GaFEncsDLxkp0LGxjD1M8jMcvYq6DPEC/JYQumEu3i9v5fAEH1VvbZi9cTg+rmEXLUUjvc5LdOq/5OuHmtme7PUJHYW1PW6ENTP0ibeiNOfFvsAAAADAQABAAAAgFMznP23n8hGamVccxasqFxV/Y9t2Jj9rxGVF+9PUuj9jiWN+T/uGA+g5KspaTzYOxUqVT1KxNGBK4ufpa8Of1X+cwTfQVcJJvMxHxXE1lpzLEgxFu49PS0K81Sa2b98v7eK2IT4TVvrBHJNxzabMd7zfQz1OenPzdPeZTcp6tXRAAAAQNMnN+cmf/4TQbLVwNFQqBtYb7MTK+0vjVJihkqcufMK84vkSFmNQToXLvuALCGs8cEcUgwvJqRx3K0hLqx8o50AAABAzIhT0dVNpjD6wAT0cfKBx7iYLYIkpJDtvrM9Pj1cyTxHZXA9HdeRZC8fEWoN2FK+JBmyr3K/6aAw6GCwKItddwAAAEAOEr8XGOnO9VmbocOIL+gEapCHTu/OjyzMIOTydB+wozo4SK7JyTBfvsvS12gZln1GcazGQx5AN5aNs3h45pXBAAAAQJUpew+Vovpn0AcH1gnf1PwFyJ2vwu9tbqVb7HceozNzTZJR55CC7NqGbv7xPEWeGmMThrfjVMiZ9fESyoXXFYMAAABAT0VsUCSTvcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mNXb79cyY+NygUJ0OBgWbtfdY2h90qjKHS9PvY4Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key4 b/security/nss/cmd/bltest/tests/rsa_oaep/key4 new file mode 100644 index 0000000000..61684becc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key4 @@ -0,0 +1 @@ +AAAAAQAAAACAqLOyhK+OtQs4cDSoYPFGxJGfMYdjzWxVmMiuSBGh4KvEx+CwgtaTpef87Wdc9GaFEncsDLxkp0LGxjD1M8jMcvYq6DPEC/JYQumEu3i9v5fAEH1VvbZi9cTg+rmEXLUUjvc5LdOq/5OuHmtme7PUJHYW1PW6ENTP0ibeiNOfFvsAAAADAQABAAAAgFMznP23n8hGamVccxasqFxV/Y9t2Jj9rxGVF+9PUuj9jiWN+T/uGA+g5KspaTzYOxUqVT1KxNGBK4ufpa8Of1X+cwTfQVcJJvMxHxXE1lpzLEgxFu49PS0K81Sa2b98v7eK2IT4TVvrBHJNxzabMd7zfQz1OenPzdPeZTcp6tXRAAAAQNMnN+cmf/4TQbLVwNFQqBtYb7MTK+0vjVJihkqcufMK84vkSFmNQToXLvuALCGs8cEcUgwvJqRx3K0hLqx8o50AAABAzIhT0dVNpjD6wAT0cfKBx7iYLYIkpJDtvrM9Pj1cyTxHZXA9HdeRZC8fEWoN2FK+JBmyr3K/6aAw6GCwKItddwAAAEAOEr8XGOnO9VmbocOIL+gEapCHTu/OjyzMIOTydB+wozo4SK7JyTBfvsvS12gZln1GcazGQx5AN5aNs3h45pXBAAAAQJUpew+Vovpn0AcH1gnf1PwFyJ2vwu9tbqVb7HceozNzTZJR55CC7NqGbv7xPEWeGmMThrfjVMiZ9fESyoXXFYMAAABAT0VsUCSTvcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mNXb79cyY+NygUJ0OBgWbtfdY2h90qjKHS9PvY4Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key5 b/security/nss/cmd/bltest/tests/rsa_oaep/key5 new file mode 100644 index 0000000000..61684becc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key5 @@ -0,0 +1 @@ +AAAAAQAAAACAqLOyhK+OtQs4cDSoYPFGxJGfMYdjzWxVmMiuSBGh4KvEx+CwgtaTpef87Wdc9GaFEncsDLxkp0LGxjD1M8jMcvYq6DPEC/JYQumEu3i9v5fAEH1VvbZi9cTg+rmEXLUUjvc5LdOq/5OuHmtme7PUJHYW1PW6ENTP0ibeiNOfFvsAAAADAQABAAAAgFMznP23n8hGamVccxasqFxV/Y9t2Jj9rxGVF+9PUuj9jiWN+T/uGA+g5KspaTzYOxUqVT1KxNGBK4ufpa8Of1X+cwTfQVcJJvMxHxXE1lpzLEgxFu49PS0K81Sa2b98v7eK2IT4TVvrBHJNxzabMd7zfQz1OenPzdPeZTcp6tXRAAAAQNMnN+cmf/4TQbLVwNFQqBtYb7MTK+0vjVJihkqcufMK84vkSFmNQToXLvuALCGs8cEcUgwvJqRx3K0hLqx8o50AAABAzIhT0dVNpjD6wAT0cfKBx7iYLYIkpJDtvrM9Pj1cyTxHZXA9HdeRZC8fEWoN2FK+JBmyr3K/6aAw6GCwKItddwAAAEAOEr8XGOnO9VmbocOIL+gEapCHTu/OjyzMIOTydB+wozo4SK7JyTBfvsvS12gZln1GcazGQx5AN5aNs3h45pXBAAAAQJUpew+Vovpn0AcH1gnf1PwFyJ2vwu9tbqVb7HceozNzTZJR55CC7NqGbv7xPEWeGmMThrfjVMiZ9fESyoXXFYMAAABAT0VsUCSTvcDtKrdWo6btTWc1Kml9QhbpMhKxJ6Y9VBHOb6mNXb79cyY+NygUJ0OBgWbtfdY2h90qjKHS9PvY4Q== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key6 b/security/nss/cmd/bltest/tests/rsa_oaep/key6 new file mode 100644 index 0000000000..3c9f8742f1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key6 @@ -0,0 +1 @@ +AAAAAQAAAADAzyzUHjTKOnKOpcuK/2TDbSe971Nk4zb9aNMSPFoZaowocBPoU9UVbVjRUZVFIPtPbXsXq7aBd2WQnFdhGWWdkCsZBu2KKxDBVcJNEkUo2rnurjeb6sZuSkEXhty4/QBi68Aw3hIZoEwqjBt90xMeTWtsruLjGl7UGsFQmy7x7iqxg2S+VoypQcJezIT/nWQ7XsGqrhAqINc/R5t4D9bakQdSEtnqwDoGdNiZ66LkMfTES2Fba6IjK9SzO67XPWJdAAAAAwEAAQAAAMAZjBQeI3FakrzPahGaW8ETiUaNKBH1SNcn4XtKsOuYbW8hHvtTtx98y+qH7mnHXuYVAIxTMt61K/OQq9+/431yBTaBWbJjjB3jJuIdIiUfD7WEizvxUAXSp0Mw8K/pFu5izME0TR2DpwnmBnYnOED383dCSl4KTadfAbMf92gZz5y/3SFSQ8ORfAPvOBmTEuVns7967Tq0V/Nx74oUI/RbaMbiguwRG7ooM7mH/Wn62DvBuMYTxeHqFsEe0SXqfsEAAABg/I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8bzZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79AAAAYNIA1F54iqzqYGpAHQRg+H3VwQJ+EtwaDXWG6JOdnPeJtA9RrARClh3n0hzCHgXIMVXB8qqRkzh8/flWy0jRU7onBAb5u7pTfUmH2eL5lC16FMv//qdP7N2pKNI+JZ9e4QAAAGDbFoAveaLw1F81jWn9M+RLgfroKGIuk6VCU+mX0BsHQ3WdoOgStKpObIvqsjKNVDGVWkGKZ/8mqMXIB6XaNU4F7zHMjPdY9GNzKVCwPiZXJvuU451qVyomJEqwjbdXUq0AAABgoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZblo5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iYpHnoCuKU/tKhAAAAYAsh8zXDUzQutEw6okRFeAwtZVuUAXTK44x8ik5kk8C6n9MDdIJnsIO5p6bLYeQts2K4yYlttwZOAq1a5hWH2hW0ZJyQWUkJ/rN9vLZUvrcmjsgB5ai0qjkRvr2IVC8Fvg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key7 b/security/nss/cmd/bltest/tests/rsa_oaep/key7 new file mode 100644 index 0000000000..3c9f8742f1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key7 @@ -0,0 +1 @@ +AAAAAQAAAADAzyzUHjTKOnKOpcuK/2TDbSe971Nk4zb9aNMSPFoZaowocBPoU9UVbVjRUZVFIPtPbXsXq7aBd2WQnFdhGWWdkCsZBu2KKxDBVcJNEkUo2rnurjeb6sZuSkEXhty4/QBi68Aw3hIZoEwqjBt90xMeTWtsruLjGl7UGsFQmy7x7iqxg2S+VoypQcJezIT/nWQ7XsGqrhAqINc/R5t4D9bakQdSEtnqwDoGdNiZ66LkMfTES2Fba6IjK9SzO67XPWJdAAAAAwEAAQAAAMAZjBQeI3FakrzPahGaW8ETiUaNKBH1SNcn4XtKsOuYbW8hHvtTtx98y+qH7mnHXuYVAIxTMt61K/OQq9+/431yBTaBWbJjjB3jJuIdIiUfD7WEizvxUAXSp0Mw8K/pFu5izME0TR2DpwnmBnYnOED383dCSl4KTadfAbMf92gZz5y/3SFSQ8ORfAPvOBmTEuVns7967Tq0V/Nx74oUI/RbaMbiguwRG7ooM7mH/Wn62DvBuMYTxeHqFsEe0SXqfsEAAABg/I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8bzZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79AAAAYNIA1F54iqzqYGpAHQRg+H3VwQJ+EtwaDXWG6JOdnPeJtA9RrARClh3n0hzCHgXIMVXB8qqRkzh8/flWy0jRU7onBAb5u7pTfUmH2eL5lC16FMv//qdP7N2pKNI+JZ9e4QAAAGDbFoAveaLw1F81jWn9M+RLgfroKGIuk6VCU+mX0BsHQ3WdoOgStKpObIvqsjKNVDGVWkGKZ/8mqMXIB6XaNU4F7zHMjPdY9GNzKVCwPiZXJvuU451qVyomJEqwjbdXUq0AAABgoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZblo5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iYpHnoCuKU/tKhAAAAYAsh8zXDUzQutEw6okRFeAwtZVuUAXTK44x8ik5kk8C6n9MDdIJnsIO5p6bLYeQts2K4yYlttwZOAq1a5hWH2hW0ZJyQWUkJ/rN9vLZUvrcmjsgB5ai0qjkRvr2IVC8Fvg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key8 b/security/nss/cmd/bltest/tests/rsa_oaep/key8 new file mode 100644 index 0000000000..3c9f8742f1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key8 @@ -0,0 +1 @@ +AAAAAQAAAADAzyzUHjTKOnKOpcuK/2TDbSe971Nk4zb9aNMSPFoZaowocBPoU9UVbVjRUZVFIPtPbXsXq7aBd2WQnFdhGWWdkCsZBu2KKxDBVcJNEkUo2rnurjeb6sZuSkEXhty4/QBi68Aw3hIZoEwqjBt90xMeTWtsruLjGl7UGsFQmy7x7iqxg2S+VoypQcJezIT/nWQ7XsGqrhAqINc/R5t4D9bakQdSEtnqwDoGdNiZ66LkMfTES2Fba6IjK9SzO67XPWJdAAAAAwEAAQAAAMAZjBQeI3FakrzPahGaW8ETiUaNKBH1SNcn4XtKsOuYbW8hHvtTtx98y+qH7mnHXuYVAIxTMt61K/OQq9+/431yBTaBWbJjjB3jJuIdIiUfD7WEizvxUAXSp0Mw8K/pFu5izME0TR2DpwnmBnYnOED383dCSl4KTadfAbMf92gZz5y/3SFSQ8ORfAPvOBmTEuVns7967Tq0V/Nx74oUI/RbaMbiguwRG7ooM7mH/Wn62DvBuMYTxeHqFsEe0SXqfsEAAABg/I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8bzZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79AAAAYNIA1F54iqzqYGpAHQRg+H3VwQJ+EtwaDXWG6JOdnPeJtA9RrARClh3n0hzCHgXIMVXB8qqRkzh8/flWy0jRU7onBAb5u7pTfUmH2eL5lC16FMv//qdP7N2pKNI+JZ9e4QAAAGDbFoAveaLw1F81jWn9M+RLgfroKGIuk6VCU+mX0BsHQ3WdoOgStKpObIvqsjKNVDGVWkGKZ/8mqMXIB6XaNU4F7zHMjPdY9GNzKVCwPiZXJvuU451qVyomJEqwjbdXUq0AAABgoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZblo5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iYpHnoCuKU/tKhAAAAYAsh8zXDUzQutEw6okRFeAwtZVuUAXTK44x8ik5kk8C6n9MDdIJnsIO5p6bLYeQts2K4yYlttwZOAq1a5hWH2hW0ZJyQWUkJ/rN9vLZUvrcmjsgB5ai0qjkRvr2IVC8Fvg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/key9 b/security/nss/cmd/bltest/tests/rsa_oaep/key9 new file mode 100644 index 0000000000..3c9f8742f1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/key9 @@ -0,0 +1 @@ +AAAAAQAAAADAzyzUHjTKOnKOpcuK/2TDbSe971Nk4zb9aNMSPFoZaowocBPoU9UVbVjRUZVFIPtPbXsXq7aBd2WQnFdhGWWdkCsZBu2KKxDBVcJNEkUo2rnurjeb6sZuSkEXhty4/QBi68Aw3hIZoEwqjBt90xMeTWtsruLjGl7UGsFQmy7x7iqxg2S+VoypQcJezIT/nWQ7XsGqrhAqINc/R5t4D9bakQdSEtnqwDoGdNiZ66LkMfTES2Fba6IjK9SzO67XPWJdAAAAAwEAAQAAAMAZjBQeI3FakrzPahGaW8ETiUaNKBH1SNcn4XtKsOuYbW8hHvtTtx98y+qH7mnHXuYVAIxTMt61K/OQq9+/431yBTaBWbJjjB3jJuIdIiUfD7WEizvxUAXSp0Mw8K/pFu5izME0TR2DpwnmBnYnOED383dCSl4KTadfAbMf92gZz5y/3SFSQ8ORfAPvOBmTEuVns7967Tq0V/Nx74oUI/RbaMbiguwRG7ooM7mH/Wn62DvBuMYTxeHqFsEe0SXqfsEAAABg/I1sBL7E65qBksp5AMvlNuLotRnezzOyRZeYxpCd9PF2230jGQ/HK4hlpxiviV8bzZFFKYAnQjtgXnCkfPWDkKjD6I/IxI6LMuPaIQ374+iB6lZ0tqNIwh6T+eVepl79AAAAYNIA1F54iqzqYGpAHQRg+H3VwQJ+EtwaDXWG6JOdnPeJtA9RrARClh3n0hzCHgXIMVXB8qqRkzh8/flWy0jRU7onBAb5u7pTfUmH2eL5lC16FMv//qdP7N2pKNI+JZ9e4QAAAGDbFoAveaLw1F81jWn9M+RLgfroKGIuk6VCU+mX0BsHQ3WdoOgStKpObIvqsjKNVDGVWkGKZ/8mqMXIB6XaNU4F7zHMjPdY9GNzKVCwPiZXJvuU451qVyomJEqwjbdXUq0AAABgoKMXz+ffFCP4em3uhFH04rSmflSX8ptPHk6DC5+t2UARZwJvVZblo5yXgX4PXxbifhnsmQLgHX6m+5qjx2Cv7h44G2neasnAdYWgatnEugC/dcitL6iYpHnoCuKU/tKhAAAAYAsh8zXDUzQutEw6okRFeAwtZVuUAXTK44x8ik5kk8C6n9MDdIJnsIO5p6bLYeQts2K4yYlttwZOAq1a5hWH2hW0ZJyQWUkJ/rN9vLZUvrcmjsgB5ai0qjkRvr2IVC8Fvg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash0 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash0 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash0 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash1 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash1 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash1 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash10 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash10 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash10 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash11 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash11 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash11 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash12 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash12 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash12 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash13 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash13 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash13 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash14 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash14 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash14 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash15 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash15 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash15 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash16 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash16 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash16 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash17 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash17 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash17 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash2 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash2 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash2 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash3 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash3 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash3 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash4 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash4 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash4 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash5 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash5 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash5 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash6 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash6 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash6 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash7 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash7 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash7 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash8 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash8 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash8 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/maskhash9 b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash9 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/maskhash9 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/numtests b/security/nss/cmd/bltest/tests/rsa_oaep/numtests new file mode 100644 index 0000000000..3c032078a4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/numtests @@ -0,0 +1 @@ +18 diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext0 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext0 new file mode 100644 index 0000000000..5961feea3d Binary files /dev/null and b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext0 differ diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext1 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext1 new file mode 100644 index 0000000000..bd17cf9e93 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext1 @@ -0,0 +1 @@ +u @GõGèä…e#)ŠÉºâEﯗûåoÕ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext10 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext10 new file mode 100644 index 0000000000..d07c85b367 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext10 @@ -0,0 +1 @@ +SæèÇ)ÖùÃÝ1~t°ÛŽLÌ¢_<ƒtnzÆ:cï79絕«¹nUåO{Ô´37û‘ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext11 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext11 new file mode 100644 index 0000000000..fcd6baa03d --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext11 @@ -0,0 +1 @@ +¶²Ž¢ ¼d \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext12 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext12 new file mode 100644 index 0000000000..a154e41321 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext12 @@ -0,0 +1 @@ +‹ºkø*l†Õñun—•hp°‰S°kN²¼”î \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext13 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext13 new file mode 100644 index 0000000000..8af8ac61d7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext13 @@ -0,0 +1 @@ +æ­;X©òEu7>W \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext14 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext14 new file mode 100644 index 0000000000..b302369ad6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext14 @@ -0,0 +1,2 @@ +Q +,ö†o¢4SÉN£Ÿ¼%cè>”EKA$ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext15 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext15 new file mode 100644 index 0000000000..36812091de Binary files /dev/null and b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext15 differ diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext16 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext16 new file mode 100644 index 0000000000..7449ac6779 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext16 @@ -0,0 +1 @@ +§Ýl}ÂKFùÝ_‘­¤Ã³ß”~‡r2© \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext17 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext17 new file mode 100644 index 0000000000..f3945c85f8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext17 @@ -0,0 +1 @@ +êñ§: F S}æœÙ"‹¼ûšŒ¨ÆÃï¯oä§ôcNÐ |9ìi"׸ê,ë¬ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext2 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext2 new file mode 100644 index 0000000000..6c08a2a23f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext2 @@ -0,0 +1 @@ +ÙJàƒ.dEÎB3°mS‚±ÛKªÓtmÉß$ÔãÂEÿY¦B>°áÐ-OæFÏiýŒn—°Q \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext3 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext3 new file mode 100644 index 0000000000..efd84ad707 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext3 @@ -0,0 +1 @@ +RæPÙŽ*‹O†…!S¹~Ý1o4jöz… \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext4 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext4 new file mode 100644 index 0000000000..17963365b6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext4 @@ -0,0 +1 @@ +¨ŸÙåùt¢ŸïûF+Ilùè \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext5 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext5 new file mode 100644 index 0000000000..38913e9c7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext5 @@ -0,0 +1 @@ +&RP„Bq \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext6 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext6 new file mode 100644 index 0000000000..5d4bf7cb23 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext6 @@ -0,0 +1 @@ +÷5ýUº’Y,;R¸ùÄöšª¾øþˆ­Ð•YTFœôì ‰lYí¡bçTœŠ»ͼ!¡.ɶµ¸ý/9ž¶ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext7 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext7 new file mode 100644 index 0000000000..d1bf800968 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext7 @@ -0,0 +1 @@ +¹`P¦:«ä-ßá—‰õ@Ltt²mÎ>Ô‚¿–Ì‹ô ÅFY \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext8 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext8 new file mode 100644 index 0000000000..bb96c956f0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext8 @@ -0,0 +1 @@ +ý2d)ß›‰ µK¸óO$ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/plaintext9 b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext9 new file mode 100644 index 0000000000..8a71ad8e7b --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/plaintext9 @@ -0,0 +1,3 @@ +ñE›_ ’ðr:.VbHMŒ + ü)ÚÖ¬Ô;µóïýôá¶>ýþf(Ð×L¡›òÖžJ +¿†Ò“’ZygrøŽ \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed0 b/security/nss/cmd/bltest/tests/rsa_oaep/seed0 new file mode 100644 index 0000000000..8b990a2f31 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed0 @@ -0,0 +1 @@ +GLd26iEGnWl3ajPpa61I4d2gpe8= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed1 b/security/nss/cmd/bltest/tests/rsa_oaep/seed1 new file mode 100644 index 0000000000..afb497d5b1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed1 @@ -0,0 +1 @@ +DMdCzkqbfzL5UbyyUe/ZJf5P418= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed10 b/security/nss/cmd/bltest/tests/rsa_oaep/seed10 new file mode 100644 index 0000000000..762ceaf5ad --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed10 @@ -0,0 +1 @@ +/LxCFALp7KvGCCr6QLpfJlIshA4= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed11 b/security/nss/cmd/bltest/tests/rsa_oaep/seed11 new file mode 100644 index 0000000000..5cfd292ad5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed11 @@ -0,0 +1 @@ +I6reDh4Iu5uaeNIwKlL5whsuG6I= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed12 b/security/nss/cmd/bltest/tests/rsa_oaep/seed12 new file mode 100644 index 0000000000..516e13d9a6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed12 @@ -0,0 +1 @@ +R+GrcRn+5WyV7l6q2G9A0KpjvTM= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed13 b/security/nss/cmd/bltest/tests/rsa_oaep/seed13 new file mode 100644 index 0000000000..680ddbd4ae --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed13 @@ -0,0 +1 @@ +bRf1tMH/rDUdGVv3sJ0J8JpAec8= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed14 b/security/nss/cmd/bltest/tests/rsa_oaep/seed14 new file mode 100644 index 0000000000..f41e51c600 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed14 @@ -0,0 +1 @@ +OFOHUU3szHx0DdjN+druSaHL/VQ= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed15 b/security/nss/cmd/bltest/tests/rsa_oaep/seed15 new file mode 100644 index 0000000000..9a825c93cf --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed15 @@ -0,0 +1 @@ +XKymoPdkFhqWhPhdkrbg7zfKi2U= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed16 b/security/nss/cmd/bltest/tests/rsa_oaep/seed16 new file mode 100644 index 0000000000..dcf464dc4b --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed16 @@ -0,0 +1 @@ +lbyp44WYlLPdhp+n7NW7xkAb8+Q= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed17 b/security/nss/cmd/bltest/tests/rsa_oaep/seed17 new file mode 100644 index 0000000000..90133c73e6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed17 @@ -0,0 +1 @@ +n0fd9C6X7qhWqb28cU6zrCL26zI= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed2 b/security/nss/cmd/bltest/tests/rsa_oaep/seed2 new file mode 100644 index 0000000000..0c82aab49c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed2 @@ -0,0 +1 @@ +JRTfRpV1WmeyiOr0kFw27sZv0v0= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed3 b/security/nss/cmd/bltest/tests/rsa_oaep/seed3 new file mode 100644 index 0000000000..4cd022ec9f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed3 @@ -0,0 +1 @@ +xENaPhoYpotoIENikKN877hds/s= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed4 b/security/nss/cmd/bltest/tests/rsa_oaep/seed4 new file mode 100644 index 0000000000..275f908022 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed4 @@ -0,0 +1 @@ +sxjELfO+D4P+qCP1p7R+1eQlo7U= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed5 b/security/nss/cmd/bltest/tests/rsa_oaep/seed5 new file mode 100644 index 0000000000..3406494e6c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed5 @@ -0,0 +1 @@ +5OwJgsIzbzpnf2o1YXTrDOiHq8I= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed6 b/security/nss/cmd/bltest/tests/rsa_oaep/seed6 new file mode 100644 index 0000000000..c7316f9dfe --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed6 @@ -0,0 +1 @@ +jsll8TSj7Jkx6SocoNyBadXqcFw= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed7 b/security/nss/cmd/bltest/tests/rsa_oaep/seed7 new file mode 100644 index 0000000000..a4cbd16407 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed7 @@ -0,0 +1 @@ +7LG4sl+lDNqwjlYEKGf0r1gm0Ww= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed8 b/security/nss/cmd/bltest/tests/rsa_oaep/seed8 new file mode 100644 index 0000000000..d4a76a0526 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed8 @@ -0,0 +1 @@ +6JuwMsbOYiy9tTvJRmAU6nf3d8A= diff --git a/security/nss/cmd/bltest/tests/rsa_oaep/seed9 b/security/nss/cmd/bltest/tests/rsa_oaep/seed9 new file mode 100644 index 0000000000..8cd39a9c68 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_oaep/seed9 @@ -0,0 +1 @@ +YG87mcC5zNdx6qKeoOTIhPMYnMw= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/README b/security/nss/cmd/bltest/tests/rsa_pss/README new file mode 100644 index 0000000000..6b2ebf0bda --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/README @@ -0,0 +1 @@ +The test vectors in this folder are used to test the RSA-PSS code. The tests 0-17 use the SHA-1 hash function, the tests 18-19 use the SHA-256 hash function, the tests 20-21 use the SHA-384 hash function. \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext0 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext0 new file mode 100644 index 0000000000..0ed7e8c103 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext0 @@ -0,0 +1,3 @@ +kHQwj7WY6XAbIpQ4jlL5cfqsK2ClFFrxhd9Sh7XtKIflfOf9RNyGNOQHyODkNgvCJvPsIn+dnlRj +jo0x9QUSFd9uu5wvlXmqd1mKOPkUtbnBvYPE4vnzgqDQqjVC/+5lmEpgG8aeso3rJ9yhLILC1MP2 +bNUA8f8rmU2KTjDLszw= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext1 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext1 new file mode 100644 index 0000000000..01aa061c9c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext1 @@ -0,0 +1,3 @@ +Pvf0boMb+SsyJ0FCpYX/zvvcp7Mq6Q0Q+w8McpmE8E7ymp3weAd1zkNzm5eDg5DbClUF5j3pJwKN +nSmyGcosRReDJVilXWlKbSW52rZgA8TMzZB4Ahk75RcNJhR9N7k1kCQb5RwlBV9H72J1LPviFBj6 +/pjCLE1NR3JP21Zp6EM= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext10 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext10 new file mode 100644 index 0000000000..f31ec8eef6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext10 @@ -0,0 +1,4 @@ +ghAt+MuR5xeZGaBNJtM11k+8L4csRIM5QyQd6EVIECdM3z219C1CPbFSr3E19wFCDjm0lKZ8v9Gf +kRnaIzoj2lxkObW6DSvDc+7jUHABN41KQHOFa3/iq6C17pOyf0r+x9TRIJIcg/YGdlsCwZ5Naho7 +lfpMQilRvk9SExB37xcXlynN3721aVDbrO7+eMsWZAoJnqVtJDie7xD4/ssxuj6jsifAqGaYu4nj +6TY5Bb8id3sqOqUhtltM73bYO95M diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext11 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext11 new file mode 100644 index 0000000000..2e67c03762 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext11 @@ -0,0 +1,4 @@ +p/2w0lkWXKLIjQC78QKKhn0zdpnQYRk7F6lkjhTMu6rerKrN7IFedXEpTruKEXryBfoHi0ewcSwZ +njrQUTXFBMJLgXBRFXQIAkh5kv/VEdSvxrhUSR6z8N1SMTlUL/FcMQHuhVQ1F8ajx5QXxn4t2ap0 +HpopsG3LWTwjNrNnCuOvusfD524hVHPoZuM4yiRN4AtiYk1rlCaCLOrp+MxGCJX0ElAHP9RcWh57 +QlwgSkI6aZFZ9pA+cQs3p7sryASf diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext12 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext12 new file mode 100644 index 0000000000..7f3530c213 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext12 @@ -0,0 +1,5 @@ +gsKxYAk7iqPA91IrGfhzVAZsd4R6vyqfzlQtDoTpIMWvtJ/9/azhZWDulKE2lgEUjrrXoOFRzxYz +F5Glcn0F8h505+uBFEAgaTXXRHZaFeefAVy2bFMsh6agWWHIv610GppmVwIolDk+ciNzl5bAKndF +XQ9VWw7AHd8lm2IH/Q/VdhTO8aVXO6r/TsAAaZUWWbhfJDAKJRYMqFItxuZyflfQGdfmNim4/l6J +4lzBW+s6ZHV3VZKZKAubKPebBAkAC+JbvZZAi6O0PMSGGE3RyOYlU/oa9AQPYGY95/XknAQ4jiV/ +HOicldq0ijFdm2axt2KCM4dv8jhSMNBw0H4WZg== diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext13 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext13 new file mode 100644 index 0000000000..2d8791535e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext13 @@ -0,0 +1,5 @@ +FK412d0GupL387iXl4rtfNS/X/C1haQL1GzhtCzScDBTu5BE1k6BPY+W2y3XAH0QEY9vj4SWCXrX +Xh/2kjQbKJKtVaYzocVefwoK1ZoOIDpbgniuxU3YYi4oMdhxdPjK/0PubEZEU0XYSlllm/uS7NTI +GGaGlfNHBvZoKKiZWWN/K/PjJRwkvbpNS3ZJ2gAiIYsRnITnmmUn7FuKX4YcFZlS4j7AXh5xc0b6 +7+ixaGglvSsmL7JTEGbA3gms3i5CMWkHKLXYXhFaL2uSt5wlq8m9k5n/i8+CWlLqH1bqdt0m9Duq ++hi/qSpQTL01aZ4m0dzFoohzhfPGMjLwbzJEww== diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext14 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext14 new file mode 100644 index 0000000000..eaa167e352 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext14 @@ -0,0 +1,5 @@ +bj5Ne2sV0vtGATuJAKpbuzk5zywJVxeYcEICbuYsdMVM/9XX1X77v5UKD1xXT6CdP8HJ9ROwW0/1 +Ddjfft+iAQKFTDXlkhgBGacM5bCFGCqgLZ6iqpDR3wPy2q6IW6L10Fr9rJdHbwa5O1vJShqAqpEW +xNYV8zOwmIkrJf+s4mb121paO8wQqCTtVarTW3J4NPuMB9oo/PQWpdmyIk8fi0QrNvkeRW/eotfP +4zZyaN4DB6THTpJBWe0zOT1eBlVTHHcye4mCG97fiAFhx4zUGWtUGfesw/E+Xr8WG258ZyRxbKM7 +hcLiVkAZKsKFllHVC95+uXblHOyCi5i2VjuGuw== diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext15 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext15 new file mode 100644 index 0000000000..a7bff41b96 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext15 @@ -0,0 +1,5 @@ +NAR/+WxNwNyQstT/WaGjYaR1SyVdLuCvfYv4fJvJ593u3jOTTGPKHA49JiyxRe+TKh8sCpl6pqNP +jq7nR32CzPCQlaa4rK041O7J+36retAtodEdjlTBgl5Vv1jCojI0uQK+Ek+ekDio9o+kXaty9m4J +Rb8di6zJBExvBwmMn87FijqrEAyAUXgVXwMKEkxFDlrL2kfQ5PELgKI/gD53TQI7ABXCC5+bvnyR +KWM41ey0ccr7AyAHtnpgvl9pUEqfAauzy0Z7Jg4rzoYL6Nlb+SwMjhSW7R5ShZOkq7bfRi3eiglo +3/5GgxFoV6Iy9ev2yFviOHRa0POPdnpf2/SG+w== diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext16 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext16 new file mode 100644 index 0000000000..79e7afb613 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext16 @@ -0,0 +1,5 @@ +fgk16hj01sHRfOgusrODbFWzhFic4Z3+dDNjrJlI0fNGt7/d/pLv14rbIfrvyJreQrEPN0AD/hIu +Z0KaHLjL0fjZAUVkxE0SARb0mQ8abjh3TBlL0bghMoawd7BJnS57P0NKsSKJxVZoTe7XgTGTS7Pd +ZTcjb3xvPcsJ1Ha+B3IeN+HO7Zsve0Boh71TFXMF4ci0+E1zO8Hhhv4GzFm27bj0vX/+/fT3upz7 +nVcGibWhpBCadGppCJPbN5klWgy5IV0tHNSQWQ6VLoyHhqoAESZSUkcMBB37w+7Hw8v3HCSGnRFc +DLSpVvVtUwuAq1iaz+/GkHUd3zbo04P4PO3SzA== diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext17 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext17 new file mode 100644 index 0000000000..86b2cfd3b4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext17 @@ -0,0 +1,5 @@ +bTtbh/Z+plevIfdUQZd9IYD5GyxfaS3oKVVpamhnMNm5d42XB1jMsmBxwiCf+9YSW+LpbqgbZ8ub +kwgjn9oX97K2Ts2glra5NWQKWhy0KpFVscnvemM6AsWfDW7lm4UsQ7NQKec8lA/wQQ6PEU7tRrvQ ++uFl5CviUopAHDso/YGO8yMtyp9NKg9RZuxZxCOW1sEdvBIVpW+hcWnblXU0PvNPneMqSc3DF0ki +8inCPhjkXfk1MRnsQxnO3OehfGQIjB9vUr4pY0EAs5GdOPPR7ZTmiR5mpzuPuEn1h031lFnimMe7 +zi7ueCoZWqZv4tBzKyXllfV9PgYbH8PkBjv5jw== diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext18 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext18 new file mode 100644 index 0000000000..30ba6cb031 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext18 @@ -0,0 +1 @@ +lIqC19k21FCCvK9St7rh1YBrWugJI76xgKSh7XuuV0/AH6lIukcqCkODU5zIza9sRz6VluOKEvNOkscaqkCjbPVVQeNa/II0iwjcRG/XNgj1J9vNi9Lt+UiKRcO/YMoAz+UmqJTL9nbKVJEbAX3ckjDnMZZ/XzQJS87WyUFw7Ak= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext19 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext19 new file mode 100644 index 0000000000..50d693d35d --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext19 @@ -0,0 +1 @@ +oNSdYElIrvVdpPuXWr+eDKcy2DaBoRPdCitzmoorhd2e3nc0V1VSjun5/x/UxUojVe11tcVzDhXXmZFDLT1DEF1ZIq4BUBg9Og0bHXsd93BAC8P1M15I3O1Tsw8fs711XfRy2ONarnyUF+yI2pMSvI95eKB/tPaOVyWVgkgwpm5LssAoRjxP0zE/OIVMH+jIvVeg+gf1uVh7QncCv7VuCgEOViH4mjd05Zydc6YMwbjeH5AZM778l38eZtz6Vg50x1yB/0r09KKDc9D7awIbPSU3GiDy2fbmfPIyBqwNvtZbVd1rEdCUEJiSvXOhW7Fle9FSYekTyH3Rfr/R0GKiTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext2 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext2 new file mode 100644 index 0000000000..47f9922489 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext2 @@ -0,0 +1,3 @@ +ZmAm+6cb0+fPExV8wsUajkqmhK+XePkYSfNDNdFBwAFUxBl2IfliSmdbWrwi7n1bqv+q4cm6yizD +c7PzPnjmFDw5WpGqf6ymZOtzOv0U2IJyWdmadVD6ylAe8rBOM8I6pR9LnoKC79tyjMCrCUBakWB8 +Y2mWG8gnDS1POfzmErE= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext20 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext20 new file mode 100644 index 0000000000..2a16959ac8 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext20 @@ -0,0 +1 @@ +L3Ad3lcyjzUFWRLBB6V8LvizEEbKA9+gBKarSAG8LViCtuoJJ5jrXTv8BMdV121JJIFNMF6YsHPa+o7n1tMwVasRCiLirvP9yORL/2THHhcNxX+AO1kpvz6IdgTueior3zRjutR3wzrwxYaJSo8WlCYSlSoDLJt4wt5aw1eOh1U= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext21 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext21 new file mode 100644 index 0000000000..97abe8fe57 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext21 @@ -0,0 +1 @@ +l3HCE9I9e21NAXYVhsvJySQVu2+pfHP+0e82Vr7ke7htBg21AsG/jWd+JpEhpVwNyA2cqDBLDQZn4YigM6HX+AqhEXxcMeFccGleb3NF5qXwtmuaFQBJyuU9/gXFEip3mldECMuLdZono0zdDgiCpz/Ep3x43aD/RzVK/tLKSbSyUROw3bKifpaSIAMYPeJ1iA2AMv2c1ON1oaKjb0GUH5bv/ZHF0uCbuShoxJHu8aYrYkeL3y1b8RQRO/e/mjpGNNZTGZTCEa6UFv7GdBO5bYZBFsfgAMkCyut74aDSNTpyr68gfGY4XXglKwpXUFw6/pkOWOG6GB+m5g0ULSrBqg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext3 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext3 new file mode 100644 index 0000000000..28306f23a1 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext3 @@ -0,0 +1,3 @@ +Rgl5OyPp0JNi3CG7R9oLTzp2ImSaR9RkAZua6v5TNZwXjJHNWLpry3i+A0anvGN/S4c9S6s47mYf +GZY0xUehrYRC4D2gFbE25UP3qwfAwT5CJbjejM4l1PbrhAD4H34YM7fubjNNNwlkynn9uHK011Ij +te6wgQFZH7Uy0VWm3oc= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext4 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext4 new file mode 100644 index 0000000000..a83e4f591d --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext4 @@ -0,0 +1,3 @@ +HSqtIhyk0x3fE1CSOQGTmOPRSzLcNNxa9K6uo8CVr3NHnPCkXlYpY1pToBg3dhWxbLmxOz4J1nHr +ceOHuFRcWWDaWmR3bnaOgrLJNYO/EEw/2yNRK3tOifYz3QBjpTDbRSSwHD84TAkxDjFaedzT1oQC +Kn8xyGWmZOMWl4t1n60= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext5 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext5 new file mode 100644 index 0000000000..b4a3e3c41d --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext5 @@ -0,0 +1,3 @@ +KjT2El4fawv5cehPvUHGMr6PLCrOfei2km4x/5Ppr5h/vAblHpvhT1GY+R8/lTvWfaYKnfWXZMPc +D+COHL7wt1+GjRCtP7p0n+9Z+22sRqDW5QQ2kzFYb1jkYo85qieJglQ7wO61N9xhlYAZs5T7Jz8h +WFigoBrE1lC5VcZ/TFg= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext6 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext6 new file mode 100644 index 0000000000..92a284cac9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext6 @@ -0,0 +1,4 @@ +WGEHImw84BOnyPBNGmopWbtLjiBbpDontQ8SQRG8Ne9YmwOfWTIYfLaW19mjLAw4MApc3aSDS2LS +6yQK8z950T378JW/WZ4NloaUjBlkdHtn6JyaulzYUBYjb1ZsxYAssT6tUbx8pr7zuU3L27HVcEaX +cd8OALGooGd3Ry0jFiee2uhkdGaNTh7/+V8d5hxgINoyrpK78WUg/vPPTYj2ESHyS72f6RtZyvEj +WyqT/4H8QDrd9OveqEk0qc2vjhqe diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext7 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext7 new file mode 100644 index 0000000000..55bed19a46 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext7 @@ -0,0 +1,4 @@ +gLbWQyVSCfCkVnY4l6ye0lnUWbScKIfliC7LRDTP1m3X4WmTdTgeUc1/VU8sJxcEs5nUK0viVAoO +ymGVH1Umf3woeMEihC2tsosBvV+MAl9+IoQYpnPAPWvAxzbQopVGvWf3htnWkszqd41x2YwgY7en +EJIYek01rxCBEdg+g+rkbEaqNCd+BgRFiZA3iPHV587iX7SF6SlJEYgU1vLD7jYUiQFvMn+1vFF+ +tQRwv/oa+l9M6aoM5bjuGb9VAblY diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext8 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext8 new file mode 100644 index 0000000000..b6a3018a33 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext8 @@ -0,0 +1,4 @@ +SEQI84mM1fU0g/gIGe+/JwjDTSeosqb66LMi+SQCN/mBgXrKGEbxCE2qbXwHlfblvxr1nDjhhYQ3 +zh9+xBm5jIc2rfbdmgCxgG0r060Kc3deBfUt/vOlmrSwgUPw3wXNGtnQS+zsptqkohKYA+IAy8d3 +h8r0wdBmOmxZh7YFlSAZeCyvLsFCbWj7lO0dS+gWp+0IG3fmqzMLP/wHOCD+zeNyf8vile5hoFCj +Q2WGN8P9ZZz7Y3Nt4y2fkNPC9j7K diff --git a/security/nss/cmd/bltest/tests/rsa_pss/ciphertext9 b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext9 new file mode 100644 index 0000000000..0da2bcba07 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/ciphertext9 @@ -0,0 +1,4 @@ +hOvrSBvlmEW0ZGi6+0ccARLgKyNdhLXZEcvRkm7lB0rgQkSVyyDoIwi467ZfQZoD+0DnK3iYHYiq +0UMFNoUXLJeynIt78K5ztbImPEA9oO0vgP90UK94KOuLhvACi9KosXak0ijMzqGDlPI4sJ/3WMwA +vAQwEVI1V0LygrVOZjqRnnCdjaJK3lUAp7mqUCJuDKUpI+bC2GDsUP9ID6V0d+grBWX0N595x3LV +wtqAr5+/Ml7Ob8ILAJYWFL7omhg+ diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash0 b/security/nss/cmd/bltest/tests/rsa_pss/hash0 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash0 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash1 b/security/nss/cmd/bltest/tests/rsa_pss/hash1 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash1 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash10 b/security/nss/cmd/bltest/tests/rsa_pss/hash10 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash10 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash11 b/security/nss/cmd/bltest/tests/rsa_pss/hash11 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash11 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash12 b/security/nss/cmd/bltest/tests/rsa_pss/hash12 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash12 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash13 b/security/nss/cmd/bltest/tests/rsa_pss/hash13 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash13 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash14 b/security/nss/cmd/bltest/tests/rsa_pss/hash14 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash14 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash15 b/security/nss/cmd/bltest/tests/rsa_pss/hash15 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash15 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash16 b/security/nss/cmd/bltest/tests/rsa_pss/hash16 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash16 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash17 b/security/nss/cmd/bltest/tests/rsa_pss/hash17 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash17 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash18 b/security/nss/cmd/bltest/tests/rsa_pss/hash18 new file mode 100644 index 0000000000..64262c2eac --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash18 @@ -0,0 +1 @@ +sha256 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash19 b/security/nss/cmd/bltest/tests/rsa_pss/hash19 new file mode 100644 index 0000000000..64262c2eac --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash19 @@ -0,0 +1 @@ +sha256 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash2 b/security/nss/cmd/bltest/tests/rsa_pss/hash2 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash2 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash20 b/security/nss/cmd/bltest/tests/rsa_pss/hash20 new file mode 100644 index 0000000000..197e4aa310 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash20 @@ -0,0 +1 @@ +sha384 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash21 b/security/nss/cmd/bltest/tests/rsa_pss/hash21 new file mode 100644 index 0000000000..60f458cde7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash21 @@ -0,0 +1 @@ +sha384 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash3 b/security/nss/cmd/bltest/tests/rsa_pss/hash3 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash3 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash4 b/security/nss/cmd/bltest/tests/rsa_pss/hash4 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash4 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash5 b/security/nss/cmd/bltest/tests/rsa_pss/hash5 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash5 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash6 b/security/nss/cmd/bltest/tests/rsa_pss/hash6 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash6 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash7 b/security/nss/cmd/bltest/tests/rsa_pss/hash7 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash7 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash8 b/security/nss/cmd/bltest/tests/rsa_pss/hash8 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash8 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/hash9 b/security/nss/cmd/bltest/tests/rsa_pss/hash9 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/hash9 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key0 b/security/nss/cmd/bltest/tests/rsa_pss/key0 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key0 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key1 b/security/nss/cmd/bltest/tests/rsa_pss/key1 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key1 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key10 b/security/nss/cmd/bltest/tests/rsa_pss/key10 new file mode 100644 index 0000000000..ef62249f14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key10 @@ -0,0 +1 @@ +AAAAAQAAAADA5r1pKslmRXkEA/3Q9b64ub+S7RAAf8NlBGQZ3QbAXFtbL0js+YnkziaRCZecu0C0oK0k0iSD0e4xWtTMsVNCaDUmkcUk9t2ObCnSJM8kaXOuyGxb9rFAGoUNG5rRu4y87Eewbw+Mf0XT/I8xkpnFQz3bwrMFO0fe0uzUpMrv1hSDPci7Yi8xftB2uAV/6N4/hEgK1eg+SmGQSk8kj7OXAnNX4dMORjE5gVxv1P1axbgXKkUjDstjGKBPFFXYTlqLAAAAAwEAAQAAAMBqf9hPuF+tBzs0QG23T41hpqvBIZapYd15Vl6dpuUYe84tmAJQ9zWVdTWScNkVkLsOQnxxRgtV1RQQsZG88wn+oTGpLI5wJzj6cZ8eAEH1LkDpHyKfTZah5vFy4VWWtFEKba7CYQXyvrxTMWuHvfITEWZgcOjf7mnVLHGpdsqueccraNKFgNxobZ9RKdIl+Cs9YVUTqIKz25FBa0jOCIiCE+N+65r4ANgcqzKM5CBomQPADHtf0xt1UDptQZaE1ikAAABg+OuX6Y3xJmTu/bdhWWpp3c0Odtrs5u1L9aG1CsCG95KKTS+HJqd+UVt02kGYjyILHMh6ofyBDOmagvLRzoIe3O15TGlB9Cx6GguMTSjHXsYLZSJ59hVKdirtFl1H3uNnAAAAYO1NcdCm4kuTwuX2tLvgX1+wr6BC0gT+M3jTZcLyiLao2tfv5F0VPu9Aysx7gf+TQALRCJlLlKXkcozZyWM3WuSZZb2lXL8O/tjWVTtAJ/LYYgim5rSJwXYSgJLWKeSdPQAAAGArtovd+wxPVshVi/+viS2AQwN4Qef6gc+mGjjF45uQHI7nESKl2iInvWze60gUUsEq09YdXk93agq1Vlkb7+Plnlp/3bg0Xh8vNbn0zuV8MkFMCGrsmT6TU+SA2e7GKJ8AAABgT/iXcJ+tB5dGSUV45w/YVGEw7qtWJ8SbCA8F7krZ8+S3y6nWpd/xE6QcNAkzaDPxkIFtimvELpvsVrdWfQ88nGltthmyRdkB3YVtt8gJLnfpoczNVu5NukLF/bYa7CZpAAAAYHe50RN7UEBKmCcpMW76/H3+ZtNOWhgmANXzCgqFEgUcVg0IHU0KGDXsPSWmD05NaqlIsr89u1sSTLvDSJJVo6lINy9peElnRflD4dtPGDgs6qUF38ZXV7s/hXpY3OUhVg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key11 b/security/nss/cmd/bltest/tests/rsa_pss/key11 new file mode 100644 index 0000000000..ef62249f14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key11 @@ -0,0 +1 @@ +AAAAAQAAAADA5r1pKslmRXkEA/3Q9b64ub+S7RAAf8NlBGQZ3QbAXFtbL0js+YnkziaRCZecu0C0oK0k0iSD0e4xWtTMsVNCaDUmkcUk9t2ObCnSJM8kaXOuyGxb9rFAGoUNG5rRu4y87Eewbw+Mf0XT/I8xkpnFQz3bwrMFO0fe0uzUpMrv1hSDPci7Yi8xftB2uAV/6N4/hEgK1eg+SmGQSk8kj7OXAnNX4dMORjE5gVxv1P1axbgXKkUjDstjGKBPFFXYTlqLAAAAAwEAAQAAAMBqf9hPuF+tBzs0QG23T41hpqvBIZapYd15Vl6dpuUYe84tmAJQ9zWVdTWScNkVkLsOQnxxRgtV1RQQsZG88wn+oTGpLI5wJzj6cZ8eAEH1LkDpHyKfTZah5vFy4VWWtFEKba7CYQXyvrxTMWuHvfITEWZgcOjf7mnVLHGpdsqueccraNKFgNxobZ9RKdIl+Cs9YVUTqIKz25FBa0jOCIiCE+N+65r4ANgcqzKM5CBomQPADHtf0xt1UDptQZaE1ikAAABg+OuX6Y3xJmTu/bdhWWpp3c0Odtrs5u1L9aG1CsCG95KKTS+HJqd+UVt02kGYjyILHMh6ofyBDOmagvLRzoIe3O15TGlB9Cx6GguMTSjHXsYLZSJ59hVKdirtFl1H3uNnAAAAYO1NcdCm4kuTwuX2tLvgX1+wr6BC0gT+M3jTZcLyiLao2tfv5F0VPu9Aysx7gf+TQALRCJlLlKXkcozZyWM3WuSZZb2lXL8O/tjWVTtAJ/LYYgim5rSJwXYSgJLWKeSdPQAAAGArtovd+wxPVshVi/+viS2AQwN4Qef6gc+mGjjF45uQHI7nESKl2iInvWze60gUUsEq09YdXk93agq1Vlkb7+Plnlp/3bg0Xh8vNbn0zuV8MkFMCGrsmT6TU+SA2e7GKJ8AAABgT/iXcJ+tB5dGSUV45w/YVGEw7qtWJ8SbCA8F7krZ8+S3y6nWpd/xE6QcNAkzaDPxkIFtimvELpvsVrdWfQ88nGltthmyRdkB3YVtt8gJLnfpoczNVu5NukLF/bYa7CZpAAAAYHe50RN7UEBKmCcpMW76/H3+ZtNOWhgmANXzCgqFEgUcVg0IHU0KGDXsPSWmD05NaqlIsr89u1sSTLvDSJJVo6lINy9peElnRflD4dtPGDgs6qUF38ZXV7s/hXpY3OUhVg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key12 b/security/nss/cmd/bltest/tests/rsa_pss/key12 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key12 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key13 b/security/nss/cmd/bltest/tests/rsa_pss/key13 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key13 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key14 b/security/nss/cmd/bltest/tests/rsa_pss/key14 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key14 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key15 b/security/nss/cmd/bltest/tests/rsa_pss/key15 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key15 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key16 b/security/nss/cmd/bltest/tests/rsa_pss/key16 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key16 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key17 b/security/nss/cmd/bltest/tests/rsa_pss/key17 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key17 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key18 b/security/nss/cmd/bltest/tests/rsa_pss/key18 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key18 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key19 b/security/nss/cmd/bltest/tests/rsa_pss/key19 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key19 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key2 b/security/nss/cmd/bltest/tests/rsa_pss/key2 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key2 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key20 b/security/nss/cmd/bltest/tests/rsa_pss/key20 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key20 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key21 b/security/nss/cmd/bltest/tests/rsa_pss/key21 new file mode 100644 index 0000000000..9f74b3113f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key21 @@ -0,0 +1 @@ +AAAAAQAAAAEApd2GesTLAvkLlFfUjBSncO+ZHFbDnA7GX9Ea+ok3zqV7m+esc7RcABdhW4LWIuMYdTtgJ8D9FXvhL4CQ/uKnrc0O73WfiLpJl8ekLVjJqhLLma4AH+UhwTu1QxRFqNWuT15MfpSKwifTYEBx8g5XfpBfvrFd+vBtHeWuYlPWOmohILMaXaXavJVQYA4g8n03OeJieSX+o8xQnyHf8E5u6kVJxUDWgJ/5MH7t6R//WHM9g4WiN9bTcFoz45GQCZIHDfet8TV89+NwDONmfeg/F7jfF3jbOB3OCctK0FilEQAac4GY7ifPVaE7dUU5kGWC7IsXS9WNXR89dnxhNyGuBQAAAAMBAAEAAAEALS/1Z7P+dOBhkbf97W3hEikMZwaSQw1ZaRhAR9ojTJaT3u0Wc+1ClTnJadNywE1rR+D1uM7ghD5cIoNdvTsFoJl5hK5gWLEbxJB8v2fthPqa4lLfsNDNSeYY4139/lm8o93WbDPOu8d61EGqaV4T4yS1GPAcYPWoXJlK0XnyprX76TQCsRdnvgG/BzRE1rod0rylvQdNSl+uNTGtEwPYSzDYlzGMu7oE4DwuZt5tkfgvluodS7VKWq4QLVlGV/XJeJVTUSspbeop2AIxljV+PjpulY8548I0QDjqYEsx7cbw9/9ucYGlfJKCaiaPhnaOlvh4Vi/HHYXWnkSGEvcEjwAAAIDP1QKD/u65f28I1zy8ezg2+Cu81JlHn15vdv38uLOMT3Hcnoi9am92Nxr9ZdKvGGKzKvs0qV9xuLEyBD/+vjqVK691kkSBSMA/nGmx1o5M5c8yyGuvRv7TAcoatAMGmzL0VrkfcYmKsIHNjEJS71JxkVyXlLjylYUdp1EPmctz6wAAAIDMTpDSobOgZdOy0fWo/OMbVER1Zk6rVh0pcbmft774ROjsHzYLjCrINZaSlx6mo49yP8whH128sXeg/axRZKHU/3+7ToKZhjU8uYNlmhSM3UIMfTG6OCLqkKMr5GwDDowX4foK03hZ4GsKpvo7IW2cvmwOIjOXacCmFZE+XacZzwAAAIAcLR/DL2vEAE/YXf3g+7+aTDj5x8TkHeoaqII0ogHNkvO32lJlg6mK2FuzYPuYO3EeI0SdVh0XeNelFUhry/R7Rsnp4aOh93AA776wmor+R+W4V82pnLFtf/+bcS471gypbZx5c9YW1Gk0qcBQKBwAQ5nO/x233aeHZqipucsIcwAAAIDLOzwEyqWMYL59my3rs+OWQ/T1c5e+CCNqHp6vqnBlNuccOs/gHMZR8jyeBYWP7hO7aor8R99O3JpLowvOy3PQFXhSMn7niQFcLo3ue58FoPMayU62FzFkdAxclRR81fO1riy0qDeH8B2Ksx8nwtDuot2KEauQarogfEPG7hJTMQAAAIAS9rLPE3SnNvrQVhYFD5arS2HRF3x/nVJaKfPRgOd2Z+mdmavwUl0HWGYPN1JlWw8luN+EMdmo/3fBbBKgpRIqnwv3z9WiZqNcFZ+ZEgi5Axb/RE8+C2vQ6TuKeiRI6Vfj3abPzyJmsQYBOsRoCNOziHs7ADRLqslTC0znCPwytg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key3 b/security/nss/cmd/bltest/tests/rsa_pss/key3 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key3 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key4 b/security/nss/cmd/bltest/tests/rsa_pss/key4 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key4 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key5 b/security/nss/cmd/bltest/tests/rsa_pss/key5 new file mode 100644 index 0000000000..46154801ca --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key5 @@ -0,0 +1 @@ +AAAAAQAAAACApW5KDnAQF1iaUYfcfqhB0Vby7A42rVKkTf6x5h962ZHYxRBW/+2xYrTA8oOhKoijlN/1JqtykcuzB86r/OCx39XNlQgJbVsri2311nHvY3fAkhyyPCcKcOJZjm/4nRnxBazC0/DLNfKSgOE4a29kxO8i4eHyDQzoz/siSb2aITcAAAADAQABAAAAgDOlBCqQsn1PVFHKm7vQtEdxoQGviENArvmIXypLvpLolKckrDxWjI+XhTrQfAJmyMajygkp8ejxEjGIRCn8TZrlX+6JahDOcHw+1+c05Ecno5V0UBpTJoMQnCq6yrooPDG0vS9Tw+4341LO40+eUDvYDAYirXnG3O6INUfGo7MlAAAAQOfolCcgqHdRcnOjVgU+oqG8DJSqctVcboYpay38lnlIwKcsvMyn6ss1cG4Jod9VoVNb2bPMNBYLO23NPtqOZEMAAABAtp3KHPfU1+yB51uQ/MqHSrzeEj/ScAGAqpBHm25I3o1n7ST58Z2FuidYdPVCzSDccj5pYzZKH5QlRSsmmmeZ/QAAAEAo+hOThlW+H4oVnLrKWnLqGQwwCJ4ZzSdKVW82xPbhn1VLNMB3eQQnu92N0+3iRIMo84XYGzDo5Dsv/6Anhhl5AAAAQBqLOPOY+nEgSYmNf7ee4Kd2aHkSmc36Ce/A5Qessh7XQwHvW/1IvkVerrbhZ4JVgnWAqOTo4UFR0VEKgqPy5ykAAABAJxVqukEm0kqB86Uoy/sn9WiG+ECp9uhuF6RLlP6TGVhLjiL93h5aLjvYqluo2FhBlOshkKz4MrhH8To9JKefTQ== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key6 b/security/nss/cmd/bltest/tests/rsa_pss/key6 new file mode 100644 index 0000000000..ef62249f14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key6 @@ -0,0 +1 @@ +AAAAAQAAAADA5r1pKslmRXkEA/3Q9b64ub+S7RAAf8NlBGQZ3QbAXFtbL0js+YnkziaRCZecu0C0oK0k0iSD0e4xWtTMsVNCaDUmkcUk9t2ObCnSJM8kaXOuyGxb9rFAGoUNG5rRu4y87Eewbw+Mf0XT/I8xkpnFQz3bwrMFO0fe0uzUpMrv1hSDPci7Yi8xftB2uAV/6N4/hEgK1eg+SmGQSk8kj7OXAnNX4dMORjE5gVxv1P1axbgXKkUjDstjGKBPFFXYTlqLAAAAAwEAAQAAAMBqf9hPuF+tBzs0QG23T41hpqvBIZapYd15Vl6dpuUYe84tmAJQ9zWVdTWScNkVkLsOQnxxRgtV1RQQsZG88wn+oTGpLI5wJzj6cZ8eAEH1LkDpHyKfTZah5vFy4VWWtFEKba7CYQXyvrxTMWuHvfITEWZgcOjf7mnVLHGpdsqueccraNKFgNxobZ9RKdIl+Cs9YVUTqIKz25FBa0jOCIiCE+N+65r4ANgcqzKM5CBomQPADHtf0xt1UDptQZaE1ikAAABg+OuX6Y3xJmTu/bdhWWpp3c0Odtrs5u1L9aG1CsCG95KKTS+HJqd+UVt02kGYjyILHMh6ofyBDOmagvLRzoIe3O15TGlB9Cx6GguMTSjHXsYLZSJ59hVKdirtFl1H3uNnAAAAYO1NcdCm4kuTwuX2tLvgX1+wr6BC0gT+M3jTZcLyiLao2tfv5F0VPu9Aysx7gf+TQALRCJlLlKXkcozZyWM3WuSZZb2lXL8O/tjWVTtAJ/LYYgim5rSJwXYSgJLWKeSdPQAAAGArtovd+wxPVshVi/+viS2AQwN4Qef6gc+mGjjF45uQHI7nESKl2iInvWze60gUUsEq09YdXk93agq1Vlkb7+Plnlp/3bg0Xh8vNbn0zuV8MkFMCGrsmT6TU+SA2e7GKJ8AAABgT/iXcJ+tB5dGSUV45w/YVGEw7qtWJ8SbCA8F7krZ8+S3y6nWpd/xE6QcNAkzaDPxkIFtimvELpvsVrdWfQ88nGltthmyRdkB3YVtt8gJLnfpoczNVu5NukLF/bYa7CZpAAAAYHe50RN7UEBKmCcpMW76/H3+ZtNOWhgmANXzCgqFEgUcVg0IHU0KGDXsPSWmD05NaqlIsr89u1sSTLvDSJJVo6lINy9peElnRflD4dtPGDgs6qUF38ZXV7s/hXpY3OUhVg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key7 b/security/nss/cmd/bltest/tests/rsa_pss/key7 new file mode 100644 index 0000000000..ef62249f14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key7 @@ -0,0 +1 @@ +AAAAAQAAAADA5r1pKslmRXkEA/3Q9b64ub+S7RAAf8NlBGQZ3QbAXFtbL0js+YnkziaRCZecu0C0oK0k0iSD0e4xWtTMsVNCaDUmkcUk9t2ObCnSJM8kaXOuyGxb9rFAGoUNG5rRu4y87Eewbw+Mf0XT/I8xkpnFQz3bwrMFO0fe0uzUpMrv1hSDPci7Yi8xftB2uAV/6N4/hEgK1eg+SmGQSk8kj7OXAnNX4dMORjE5gVxv1P1axbgXKkUjDstjGKBPFFXYTlqLAAAAAwEAAQAAAMBqf9hPuF+tBzs0QG23T41hpqvBIZapYd15Vl6dpuUYe84tmAJQ9zWVdTWScNkVkLsOQnxxRgtV1RQQsZG88wn+oTGpLI5wJzj6cZ8eAEH1LkDpHyKfTZah5vFy4VWWtFEKba7CYQXyvrxTMWuHvfITEWZgcOjf7mnVLHGpdsqueccraNKFgNxobZ9RKdIl+Cs9YVUTqIKz25FBa0jOCIiCE+N+65r4ANgcqzKM5CBomQPADHtf0xt1UDptQZaE1ikAAABg+OuX6Y3xJmTu/bdhWWpp3c0Odtrs5u1L9aG1CsCG95KKTS+HJqd+UVt02kGYjyILHMh6ofyBDOmagvLRzoIe3O15TGlB9Cx6GguMTSjHXsYLZSJ59hVKdirtFl1H3uNnAAAAYO1NcdCm4kuTwuX2tLvgX1+wr6BC0gT+M3jTZcLyiLao2tfv5F0VPu9Aysx7gf+TQALRCJlLlKXkcozZyWM3WuSZZb2lXL8O/tjWVTtAJ/LYYgim5rSJwXYSgJLWKeSdPQAAAGArtovd+wxPVshVi/+viS2AQwN4Qef6gc+mGjjF45uQHI7nESKl2iInvWze60gUUsEq09YdXk93agq1Vlkb7+Plnlp/3bg0Xh8vNbn0zuV8MkFMCGrsmT6TU+SA2e7GKJ8AAABgT/iXcJ+tB5dGSUV45w/YVGEw7qtWJ8SbCA8F7krZ8+S3y6nWpd/xE6QcNAkzaDPxkIFtimvELpvsVrdWfQ88nGltthmyRdkB3YVtt8gJLnfpoczNVu5NukLF/bYa7CZpAAAAYHe50RN7UEBKmCcpMW76/H3+ZtNOWhgmANXzCgqFEgUcVg0IHU0KGDXsPSWmD05NaqlIsr89u1sSTLvDSJJVo6lINy9peElnRflD4dtPGDgs6qUF38ZXV7s/hXpY3OUhVg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key8 b/security/nss/cmd/bltest/tests/rsa_pss/key8 new file mode 100644 index 0000000000..ef62249f14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key8 @@ -0,0 +1 @@ +AAAAAQAAAADA5r1pKslmRXkEA/3Q9b64ub+S7RAAf8NlBGQZ3QbAXFtbL0js+YnkziaRCZecu0C0oK0k0iSD0e4xWtTMsVNCaDUmkcUk9t2ObCnSJM8kaXOuyGxb9rFAGoUNG5rRu4y87Eewbw+Mf0XT/I8xkpnFQz3bwrMFO0fe0uzUpMrv1hSDPci7Yi8xftB2uAV/6N4/hEgK1eg+SmGQSk8kj7OXAnNX4dMORjE5gVxv1P1axbgXKkUjDstjGKBPFFXYTlqLAAAAAwEAAQAAAMBqf9hPuF+tBzs0QG23T41hpqvBIZapYd15Vl6dpuUYe84tmAJQ9zWVdTWScNkVkLsOQnxxRgtV1RQQsZG88wn+oTGpLI5wJzj6cZ8eAEH1LkDpHyKfTZah5vFy4VWWtFEKba7CYQXyvrxTMWuHvfITEWZgcOjf7mnVLHGpdsqueccraNKFgNxobZ9RKdIl+Cs9YVUTqIKz25FBa0jOCIiCE+N+65r4ANgcqzKM5CBomQPADHtf0xt1UDptQZaE1ikAAABg+OuX6Y3xJmTu/bdhWWpp3c0Odtrs5u1L9aG1CsCG95KKTS+HJqd+UVt02kGYjyILHMh6ofyBDOmagvLRzoIe3O15TGlB9Cx6GguMTSjHXsYLZSJ59hVKdirtFl1H3uNnAAAAYO1NcdCm4kuTwuX2tLvgX1+wr6BC0gT+M3jTZcLyiLao2tfv5F0VPu9Aysx7gf+TQALRCJlLlKXkcozZyWM3WuSZZb2lXL8O/tjWVTtAJ/LYYgim5rSJwXYSgJLWKeSdPQAAAGArtovd+wxPVshVi/+viS2AQwN4Qef6gc+mGjjF45uQHI7nESKl2iInvWze60gUUsEq09YdXk93agq1Vlkb7+Plnlp/3bg0Xh8vNbn0zuV8MkFMCGrsmT6TU+SA2e7GKJ8AAABgT/iXcJ+tB5dGSUV45w/YVGEw7qtWJ8SbCA8F7krZ8+S3y6nWpd/xE6QcNAkzaDPxkIFtimvELpvsVrdWfQ88nGltthmyRdkB3YVtt8gJLnfpoczNVu5NukLF/bYa7CZpAAAAYHe50RN7UEBKmCcpMW76/H3+ZtNOWhgmANXzCgqFEgUcVg0IHU0KGDXsPSWmD05NaqlIsr89u1sSTLvDSJJVo6lINy9peElnRflD4dtPGDgs6qUF38ZXV7s/hXpY3OUhVg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/key9 b/security/nss/cmd/bltest/tests/rsa_pss/key9 new file mode 100644 index 0000000000..ef62249f14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/key9 @@ -0,0 +1 @@ +AAAAAQAAAADA5r1pKslmRXkEA/3Q9b64ub+S7RAAf8NlBGQZ3QbAXFtbL0js+YnkziaRCZecu0C0oK0k0iSD0e4xWtTMsVNCaDUmkcUk9t2ObCnSJM8kaXOuyGxb9rFAGoUNG5rRu4y87Eewbw+Mf0XT/I8xkpnFQz3bwrMFO0fe0uzUpMrv1hSDPci7Yi8xftB2uAV/6N4/hEgK1eg+SmGQSk8kj7OXAnNX4dMORjE5gVxv1P1axbgXKkUjDstjGKBPFFXYTlqLAAAAAwEAAQAAAMBqf9hPuF+tBzs0QG23T41hpqvBIZapYd15Vl6dpuUYe84tmAJQ9zWVdTWScNkVkLsOQnxxRgtV1RQQsZG88wn+oTGpLI5wJzj6cZ8eAEH1LkDpHyKfTZah5vFy4VWWtFEKba7CYQXyvrxTMWuHvfITEWZgcOjf7mnVLHGpdsqueccraNKFgNxobZ9RKdIl+Cs9YVUTqIKz25FBa0jOCIiCE+N+65r4ANgcqzKM5CBomQPADHtf0xt1UDptQZaE1ikAAABg+OuX6Y3xJmTu/bdhWWpp3c0Odtrs5u1L9aG1CsCG95KKTS+HJqd+UVt02kGYjyILHMh6ofyBDOmagvLRzoIe3O15TGlB9Cx6GguMTSjHXsYLZSJ59hVKdirtFl1H3uNnAAAAYO1NcdCm4kuTwuX2tLvgX1+wr6BC0gT+M3jTZcLyiLao2tfv5F0VPu9Aysx7gf+TQALRCJlLlKXkcozZyWM3WuSZZb2lXL8O/tjWVTtAJ/LYYgim5rSJwXYSgJLWKeSdPQAAAGArtovd+wxPVshVi/+viS2AQwN4Qef6gc+mGjjF45uQHI7nESKl2iInvWze60gUUsEq09YdXk93agq1Vlkb7+Plnlp/3bg0Xh8vNbn0zuV8MkFMCGrsmT6TU+SA2e7GKJ8AAABgT/iXcJ+tB5dGSUV45w/YVGEw7qtWJ8SbCA8F7krZ8+S3y6nWpd/xE6QcNAkzaDPxkIFtimvELpvsVrdWfQ88nGltthmyRdkB3YVtt8gJLnfpoczNVu5NukLF/bYa7CZpAAAAYHe50RN7UEBKmCcpMW76/H3+ZtNOWhgmANXzCgqFEgUcVg0IHU0KGDXsPSWmD05NaqlIsr89u1sSTLvDSJJVo6lINy9peElnRflD4dtPGDgs6qUF38ZXV7s/hXpY3OUhVg== \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash0 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash0 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash0 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash1 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash1 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash1 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash10 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash10 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash10 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash11 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash11 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash11 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash12 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash12 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash12 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash13 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash13 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash13 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash14 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash14 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash14 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash15 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash15 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash15 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash16 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash16 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash16 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash17 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash17 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash17 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash18 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash18 new file mode 100644 index 0000000000..64262c2eac --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash18 @@ -0,0 +1 @@ +sha256 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash19 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash19 new file mode 100644 index 0000000000..64262c2eac --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash19 @@ -0,0 +1 @@ +sha256 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash2 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash2 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash2 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash20 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash20 new file mode 100644 index 0000000000..60f458cde7 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash20 @@ -0,0 +1 @@ +sha384 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash21 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash21 new file mode 100644 index 0000000000..197e4aa310 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash21 @@ -0,0 +1 @@ +sha384 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash3 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash3 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash3 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash4 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash4 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash4 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash5 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash5 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash5 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash6 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash6 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash6 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash7 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash7 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash7 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash8 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash8 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash8 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/maskhash9 b/security/nss/cmd/bltest/tests/rsa_pss/maskhash9 new file mode 100644 index 0000000000..fcdd09c7dd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/maskhash9 @@ -0,0 +1 @@ +sha1 diff --git a/security/nss/cmd/bltest/tests/rsa_pss/numtests b/security/nss/cmd/bltest/tests/rsa_pss/numtests new file mode 100644 index 0000000000..8fdd954df9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/numtests @@ -0,0 +1 @@ +22 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext0 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext0 new file mode 100644 index 0000000000..6218384634 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext0 @@ -0,0 +1 @@ +zYtlOMuOjeVmtovQZ1advx7icY4= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext1 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext1 new file mode 100644 index 0000000000..e8ce055a64 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext1 @@ -0,0 +1 @@ +41vvwXodFguc41+9jrFufuSR0/0= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext10 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext10 new file mode 100644 index 0000000000..e7c8e71c7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext10 @@ -0,0 +1 @@ +altL5M02zJff3pmV77+PCXpKmRo= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext11 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext11 new file mode 100644 index 0000000000..6af26f1733 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext11 @@ -0,0 +1 @@ +ud/R33akYcUeZXbGyO0Kkj0cUOc= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext12 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext12 new file mode 100644 index 0000000000..d94dd83f42 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext12 @@ -0,0 +1 @@ +lZa7Ywz2qNTqRgBCK566ixNnXdQ= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext13 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext13 new file mode 100644 index 0000000000..a7998a4d14 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext13 @@ -0,0 +1 @@ +tQMxk5knf9bByPEDPL8EGZ6iFxY= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext14 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext14 new file mode 100644 index 0000000000..b18920b745 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext14 @@ -0,0 +1 @@ +UKrt6FNrLDByCLJ1pnri3xlsdig= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext15 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext15 new file mode 100644 index 0000000000..407ec5cc89 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext15 @@ -0,0 +1 @@ +qgtyuLNx3dEMiuR0QlzMz4hCopQ= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext16 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext16 new file mode 100644 index 0000000000..c10bd8dc8e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext16 @@ -0,0 +1 @@ ++tOQLJdQYiorxnJiLEgnDMV9Pqg= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext17 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext17 new file mode 100644 index 0000000000..cf9856cb50 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext17 @@ -0,0 +1 @@ +EiGW3rXRIr2Mb8eB/2kk18aVqt4= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext18 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext18 new file mode 100644 index 0000000000..308d889751 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext18 @@ -0,0 +1 @@ +sHTPDreX8OBy2HI7TTylTgcp23MHZaDCzD2EvH2a2eU= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext19 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext19 new file mode 100644 index 0000000000..69042a098f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext19 @@ -0,0 +1 @@ ++7ollkbnkxPBlmn44TwIqunTc/mhZKZBSEw+8sVi6Do= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext2 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext2 new file mode 100644 index 0000000000..3b390ec8f3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext2 @@ -0,0 +1 @@ +BlLsZ7zuMPnSaZEiuRwZq9uon5E= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext20 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext20 new file mode 100644 index 0000000000..9423c5ca9b --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext20 @@ -0,0 +1 @@ +X5EfOb/yrZEPkVDoFO8tcT+SoSb12FF81pFkh496bjQxOsTR+JB0117SKnMlETrs \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext21 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext21 new file mode 100644 index 0000000000..5717923302 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext21 @@ -0,0 +1 @@ +9c/VD/5YZylCA6IiXXail2FiXvTM0eE0kDpqyGwqBaROdiYWxPXGIKjoueke7jpB \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext3 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext3 new file mode 100644 index 0000000000..36da06a987 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext3 @@ -0,0 +1 @@ +OcIcTM7anBrfg5x0ThISpkN1dew= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext4 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext4 new file mode 100644 index 0000000000..c8d7ff2ba9 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext4 @@ -0,0 +1 @@ +NtrpE7d70XyubnsJRT0kVEzrszw= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext5 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext5 new file mode 100644 index 0000000000..fb0a775cf3 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext5 @@ -0,0 +1 @@ +Re7xkfT3nDH+XS7eflCYmU6SnS0= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext6 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext6 new file mode 100644 index 0000000000..05de2c24b6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext6 @@ -0,0 +1 @@ +JxWkm4sAEs167oTBFkRubf4/rsA= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext7 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext7 new file mode 100644 index 0000000000..b0b066052c --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext7 @@ -0,0 +1 @@ +LayVbVOWR0isNk0GWVgnxrTxQ80= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext8 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext8 new file mode 100644 index 0000000000..dc97a9c554 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext8 @@ -0,0 +1 @@ +KNmMRszK+9O8BOcvlnpUvT6hIpg= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/plaintext9 b/security/nss/cmd/bltest/tests/rsa_pss/plaintext9 new file mode 100644 index 0000000000..cd9c0725a0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/plaintext9 @@ -0,0 +1 @@ +CGbS/1p58l72aM1vMbQt7kIeTA4= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed0 b/security/nss/cmd/bltest/tests/rsa_pss/seed0 new file mode 100644 index 0000000000..2e26315332 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed0 @@ -0,0 +1 @@ +3ulZx+BkETYUIP+AGF7Vfz5ndq8= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed1 b/security/nss/cmd/bltest/tests/rsa_pss/seed1 new file mode 100644 index 0000000000..26e4788dad --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed1 @@ -0,0 +1 @@ +7yhp+kDDRssYPas9e//Jj9Vt9C0= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed10 b/security/nss/cmd/bltest/tests/rsa_pss/seed10 new file mode 100644 index 0000000000..8418bb7cc4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed10 @@ -0,0 +1 @@ +1okleobv+mghLF4MYZ7KKV+5G2c= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed11 b/security/nss/cmd/bltest/tests/rsa_pss/seed11 new file mode 100644 index 0000000000..f582586461 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed11 @@ -0,0 +1 @@ +wl8Tv2fQgWcaBIGh8YINYTu6InY= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed12 b/security/nss/cmd/bltest/tests/rsa_pss/seed12 new file mode 100644 index 0000000000..59469f99fd --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed12 @@ -0,0 +1 @@ +BOIV7m/5NLnacNdzDIc0q/zs3ok= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed13 b/security/nss/cmd/bltest/tests/rsa_pss/seed13 new file mode 100644 index 0000000000..402552fe5e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed13 @@ -0,0 +1 @@ +iyvdS0D69UXHeN35vBpJy1f5txs= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed14 b/security/nss/cmd/bltest/tests/rsa_pss/seed14 new file mode 100644 index 0000000000..d840fd556e --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed14 @@ -0,0 +1 @@ +Tpb8GzmPkrRGcQEMDcPv1uIMLXM= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed15 b/security/nss/cmd/bltest/tests/rsa_pss/seed15 new file mode 100644 index 0000000000..2edca8b903 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed15 @@ -0,0 +1 @@ +x81pjYS2USjYg146ix6w4By1Qew= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed16 b/security/nss/cmd/bltest/tests/rsa_pss/seed16 new file mode 100644 index 0000000000..80e23fbba2 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed16 @@ -0,0 +1 @@ +76i/+WISsvSj83GhDVdBUmVfXfs= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed17 b/security/nss/cmd/bltest/tests/rsa_pss/seed17 new file mode 100644 index 0000000000..2e7a00d429 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed17 @@ -0,0 +1 @@ +rYsVI3A2RiJLZgtVCIWRfKLR3yg= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed18 b/security/nss/cmd/bltest/tests/rsa_pss/seed18 new file mode 100644 index 0000000000..a5cd7b8cb6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed18 @@ -0,0 +1 @@ +GFt1LMXU6mtkIJwKMP+Nm3l2Z9CJ1KUVKpjF9WZ+5WY= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed19 b/security/nss/cmd/bltest/tests/rsa_pss/seed19 new file mode 100644 index 0000000000..59c88aa698 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed19 @@ -0,0 +1 @@ +xa78saDnF7JsnT1IOUVcvZvd1wXaiWMZdQ80MB41H3s= \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed2 b/security/nss/cmd/bltest/tests/rsa_pss/seed2 new file mode 100644 index 0000000000..4df6784b4f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed2 @@ -0,0 +1 @@ +cQucR0fYANTeh/Eq/c5t8YEHzHc= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed20 b/security/nss/cmd/bltest/tests/rsa_pss/seed20 new file mode 100644 index 0000000000..da123f117f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed20 @@ -0,0 +1 @@ +taPFMNUYb279NTjWAWJUeFKsN3c4aRO0B2zcV4VfXlZenae7NRFD1GV+kivVIBk3 \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed21 b/security/nss/cmd/bltest/tests/rsa_pss/seed21 new file mode 100644 index 0000000000..6a392f4def --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed21 @@ -0,0 +1 @@ +kegGyCeVFDJ2DtrL/DKfeTFjodxhcehNAjtluf09+2WS0uD3Lce3V9Knl4I1VlBS \ No newline at end of file diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed3 b/security/nss/cmd/bltest/tests/rsa_pss/seed3 new file mode 100644 index 0000000000..d58108df16 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed3 @@ -0,0 +1 @@ +BW8AmF3hTY71zqnoL4wnvvcgM14= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed4 b/security/nss/cmd/bltest/tests/rsa_pss/seed4 new file mode 100644 index 0000000000..7d366c13eb --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed4 @@ -0,0 +1 @@ +gOcP+GoI3j7GCXKzm0+/3Opnro4= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed5 b/security/nss/cmd/bltest/tests/rsa_pss/seed5 new file mode 100644 index 0000000000..a2da928b0a --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed5 @@ -0,0 +1 @@ +qKtp3YAfAHTCofxgZJg2xhbZloE= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed6 b/security/nss/cmd/bltest/tests/rsa_pss/seed6 new file mode 100644 index 0000000000..6dcd0e5098 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed6 @@ -0,0 +1 @@ +wKQlMT3411ZL0kNNMRUj1SV+7YA= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed7 b/security/nss/cmd/bltest/tests/rsa_pss/seed7 new file mode 100644 index 0000000000..0b6e3f37af --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed7 @@ -0,0 +1 @@ +swfEO0hQqNrC8V8y43g574xcDpE= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed8 b/security/nss/cmd/bltest/tests/rsa_pss/seed8 new file mode 100644 index 0000000000..b1b34b4687 --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed8 @@ -0,0 +1 @@ +misAfoCXi7sZLDVOt9qa7fx02/U= diff --git a/security/nss/cmd/bltest/tests/rsa_pss/seed9 b/security/nss/cmd/bltest/tests/rsa_pss/seed9 new file mode 100644 index 0000000000..d18d81a02f --- /dev/null +++ b/security/nss/cmd/bltest/tests/rsa_pss/seed9 @@ -0,0 +1 @@ +cPOCvd9NXS3YizvHtzCL5jK4QEU= diff --git a/security/nss/cmd/bltest/tests/seed_cbc/ciphertext0 b/security/nss/cmd/bltest/tests/seed_cbc/ciphertext0 new file mode 100644 index 0000000000..97e970e1ba --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_cbc/ciphertext0 @@ -0,0 +1 @@ +JVdzim3if1YIcpGABasoCQ== diff --git a/security/nss/cmd/bltest/tests/seed_cbc/iv0 b/security/nss/cmd/bltest/tests/seed_cbc/iv0 new file mode 100644 index 0000000000..2b3b07661c --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_cbc/iv0 @@ -0,0 +1 @@ +1234567890123456 diff --git a/security/nss/cmd/bltest/tests/seed_cbc/key0 b/security/nss/cmd/bltest/tests/seed_cbc/key0 new file mode 100644 index 0000000000..13911cc29a --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_cbc/key0 @@ -0,0 +1 @@ +fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/seed_cbc/numtests b/security/nss/cmd/bltest/tests/seed_cbc/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_cbc/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/seed_cbc/plaintext0 b/security/nss/cmd/bltest/tests/seed_cbc/plaintext0 new file mode 100644 index 0000000000..8d6a8d555b --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_cbc/plaintext0 @@ -0,0 +1 @@ +0123456789abcdef diff --git a/security/nss/cmd/bltest/tests/seed_ecb/ciphertext0 b/security/nss/cmd/bltest/tests/seed_ecb/ciphertext0 new file mode 100644 index 0000000000..314ffbd8e6 --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_ecb/ciphertext0 @@ -0,0 +1 @@ +GX8KY3uUhAQnL6XbQhXjEw== diff --git a/security/nss/cmd/bltest/tests/seed_ecb/iv0 b/security/nss/cmd/bltest/tests/seed_ecb/iv0 new file mode 100644 index 0000000000..2b3b07661c --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_ecb/iv0 @@ -0,0 +1 @@ +1234567890123456 diff --git a/security/nss/cmd/bltest/tests/seed_ecb/key0 b/security/nss/cmd/bltest/tests/seed_ecb/key0 new file mode 100644 index 0000000000..13911cc29a --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_ecb/key0 @@ -0,0 +1 @@ +fedcba9876543210 diff --git a/security/nss/cmd/bltest/tests/seed_ecb/numtests b/security/nss/cmd/bltest/tests/seed_ecb/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_ecb/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/seed_ecb/plaintext0 b/security/nss/cmd/bltest/tests/seed_ecb/plaintext0 new file mode 100644 index 0000000000..8d6a8d555b --- /dev/null +++ b/security/nss/cmd/bltest/tests/seed_ecb/plaintext0 @@ -0,0 +1 @@ +0123456789abcdef diff --git a/security/nss/cmd/bltest/tests/sha1/ciphertext0 b/security/nss/cmd/bltest/tests/sha1/ciphertext0 new file mode 100644 index 0000000000..1fe4bd2bd4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha1/ciphertext0 @@ -0,0 +1 @@ +cDSMAygXMPIJZC5bntZ4ZhecQ9g= diff --git a/security/nss/cmd/bltest/tests/sha1/numtests b/security/nss/cmd/bltest/tests/sha1/numtests new file mode 100644 index 0000000000..d00491fd7e --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha1/numtests @@ -0,0 +1 @@ +1 diff --git a/security/nss/cmd/bltest/tests/sha1/plaintext0 b/security/nss/cmd/bltest/tests/sha1/plaintext0 new file mode 100644 index 0000000000..863e79c65b --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha1/plaintext0 @@ -0,0 +1 @@ +A cage went in search of a bird. diff --git a/security/nss/cmd/bltest/tests/sha224/ciphertext0 b/security/nss/cmd/bltest/tests/sha224/ciphertext0 new file mode 100644 index 0000000000..dfc3d279c5 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha224/ciphertext0 @@ -0,0 +1,2 @@ +Iwl9IjQF2CKGQqR3vaJVsyqtvOS9oLP342ydpw== + diff --git a/security/nss/cmd/bltest/tests/sha224/ciphertext1 b/security/nss/cmd/bltest/tests/sha224/ciphertext1 new file mode 100644 index 0000000000..bef4714bbe --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha224/ciphertext1 @@ -0,0 +1,2 @@ +dTiLFlEndsxdul2h/YkBULDGRVy09YsZUlIlJQ== + diff --git a/security/nss/cmd/bltest/tests/sha224/numtests b/security/nss/cmd/bltest/tests/sha224/numtests new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha224/numtests @@ -0,0 +1 @@ +2 diff --git a/security/nss/cmd/bltest/tests/sha224/plaintext0 b/security/nss/cmd/bltest/tests/sha224/plaintext0 new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha224/plaintext0 @@ -0,0 +1 @@ +abc diff --git a/security/nss/cmd/bltest/tests/sha224/plaintext1 b/security/nss/cmd/bltest/tests/sha224/plaintext1 new file mode 100644 index 0000000000..afb5dce5d4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha224/plaintext1 @@ -0,0 +1 @@ +abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq diff --git a/security/nss/cmd/bltest/tests/sha256/ciphertext0 b/security/nss/cmd/bltest/tests/sha256/ciphertext0 new file mode 100644 index 0000000000..07e2ff14fa --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha256/ciphertext0 @@ -0,0 +1 @@ +ungWv48Bz+pBQUDeXa4iI7ADYaOWF3qctBD/YfIAFa0= diff --git a/security/nss/cmd/bltest/tests/sha256/ciphertext1 b/security/nss/cmd/bltest/tests/sha256/ciphertext1 new file mode 100644 index 0000000000..2ab6e1da58 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha256/ciphertext1 @@ -0,0 +1 @@ +JI1qYdIGOLjlwCaTDD5gOaM85Flk/yFn9uzt1BnbBsE= diff --git a/security/nss/cmd/bltest/tests/sha256/numtests b/security/nss/cmd/bltest/tests/sha256/numtests new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha256/numtests @@ -0,0 +1 @@ +2 diff --git a/security/nss/cmd/bltest/tests/sha256/plaintext0 b/security/nss/cmd/bltest/tests/sha256/plaintext0 new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha256/plaintext0 @@ -0,0 +1 @@ +abc diff --git a/security/nss/cmd/bltest/tests/sha256/plaintext1 b/security/nss/cmd/bltest/tests/sha256/plaintext1 new file mode 100644 index 0000000000..afb5dce5d4 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha256/plaintext1 @@ -0,0 +1 @@ +abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq diff --git a/security/nss/cmd/bltest/tests/sha384/ciphertext0 b/security/nss/cmd/bltest/tests/sha384/ciphertext0 new file mode 100644 index 0000000000..c94f91e22a --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha384/ciphertext0 @@ -0,0 +1 @@ +ywB1P0WjXou1oD1pmsZQBycsMqsO3tFjGotgWkP/W+2AhgcroefMI1i67KE0yCWn diff --git a/security/nss/cmd/bltest/tests/sha384/ciphertext1 b/security/nss/cmd/bltest/tests/sha384/ciphertext1 new file mode 100644 index 0000000000..833f06d844 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha384/ciphertext1 @@ -0,0 +1 @@ +CTMMM/cRR+g9GS/Hgs0bR1MRGxc7OwXSL6CAhuOw9xL8x8caVX4tuWbD6fqRdGA5 diff --git a/security/nss/cmd/bltest/tests/sha384/numtests b/security/nss/cmd/bltest/tests/sha384/numtests new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha384/numtests @@ -0,0 +1 @@ +2 diff --git a/security/nss/cmd/bltest/tests/sha384/plaintext0 b/security/nss/cmd/bltest/tests/sha384/plaintext0 new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha384/plaintext0 @@ -0,0 +1 @@ +abc diff --git a/security/nss/cmd/bltest/tests/sha384/plaintext1 b/security/nss/cmd/bltest/tests/sha384/plaintext1 new file mode 100644 index 0000000000..94fcc2b297 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha384/plaintext1 @@ -0,0 +1 @@ +abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu diff --git a/security/nss/cmd/bltest/tests/sha512/ciphertext0 b/security/nss/cmd/bltest/tests/sha512/ciphertext0 new file mode 100644 index 0000000000..8b626e2379 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha512/ciphertext0 @@ -0,0 +1,2 @@ +3a81oZNherrMQXNJriBBMRLm+k6JqX6iCp7u5ktV05ohkpkqJ0/BqDa6PCOj/uu9 +RU1EI2Q86A4qmslPpUyknw== diff --git a/security/nss/cmd/bltest/tests/sha512/ciphertext1 b/security/nss/cmd/bltest/tests/sha512/ciphertext1 new file mode 100644 index 0000000000..c02d1752d0 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha512/ciphertext1 @@ -0,0 +1,2 @@ +jpWbddrjE9qM9PcoFPwUP493ecbrn3+hcpmurbaIkBhQHSieSQD35DMbmd7EtUM6 +x9Mp7rbdJlReluVbh0vpCQ== diff --git a/security/nss/cmd/bltest/tests/sha512/numtests b/security/nss/cmd/bltest/tests/sha512/numtests new file mode 100644 index 0000000000..0cfbf08886 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha512/numtests @@ -0,0 +1 @@ +2 diff --git a/security/nss/cmd/bltest/tests/sha512/plaintext0 b/security/nss/cmd/bltest/tests/sha512/plaintext0 new file mode 100644 index 0000000000..8baef1b4ab --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha512/plaintext0 @@ -0,0 +1 @@ +abc diff --git a/security/nss/cmd/bltest/tests/sha512/plaintext1 b/security/nss/cmd/bltest/tests/sha512/plaintext1 new file mode 100644 index 0000000000..94fcc2b297 --- /dev/null +++ b/security/nss/cmd/bltest/tests/sha512/plaintext1 @@ -0,0 +1 @@ +abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu diff --git a/security/nss/cmd/btoa/Makefile b/security/nss/cmd/btoa/Makefile new file mode 100644 index 0000000000..f3b23fdcdc --- /dev/null +++ b/security/nss/cmd/btoa/Makefile @@ -0,0 +1,47 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + +include ../platrules.mk + diff --git a/security/nss/cmd/btoa/btoa.c b/security/nss/cmd/btoa/btoa.c new file mode 100644 index 0000000000..f82341325b --- /dev/null +++ b/security/nss/cmd/btoa/btoa.c @@ -0,0 +1,218 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include "plgetopt.h" +#include "secutil.h" +#include "nssb64.h" +#include + +#if defined(XP_WIN) || (defined(__sun) && !defined(SVR4)) +#if !defined(WIN32) +extern int fread(char *, size_t, size_t, FILE *); +extern int fwrite(char *, size_t, size_t, FILE *); +extern int fprintf(FILE *, char *, ...); +#endif +#endif + +#if defined(WIN32) +#include "fcntl.h" +#include "io.h" +#endif + +static PRInt32 +output_ascii(void *arg, const char *obuf, PRInt32 size) +{ + FILE *outFile = arg; + int nb; + + nb = fwrite(obuf, 1, size, outFile); + if (nb != size) { + PORT_SetError(SEC_ERROR_IO); + return -1; + } + + return nb; +} + +static SECStatus +encode_file(FILE *outFile, FILE *inFile) +{ + NSSBase64Encoder *cx; + int nb; + SECStatus status = SECFailure; + unsigned char ibuf[4096]; + + cx = NSSBase64Encoder_Create(output_ascii, outFile); + if (!cx) { + return -1; + } + + for (;;) { + if (feof(inFile)) + break; + nb = fread(ibuf, 1, sizeof(ibuf), inFile); + if (nb != sizeof(ibuf)) { + if (nb == 0) { + if (ferror(inFile)) { + PORT_SetError(SEC_ERROR_IO); + goto loser; + } + /* eof */ + break; + } + } + + status = NSSBase64Encoder_Update(cx, ibuf, nb); + if (status != SECSuccess) + goto loser; + } + + status = NSSBase64Encoder_Destroy(cx, PR_FALSE); + if (status != SECSuccess) + return status; + + /* + * Add a trailing CRLF. Note this must be done *after* the call + * to Destroy above (because only then are we sure all data has + * been written out). + */ + fwrite("\r\n", 1, 2, outFile); + return SECSuccess; + +loser: + (void)NSSBase64Encoder_Destroy(cx, PR_TRUE); + return status; +} + +static void +Usage(char *progName) +{ + fprintf(stderr, + "Usage: %s [-i input] [-o output]\n", + progName); + fprintf(stderr, "%-20s Define an input file to use (default is stdin)\n", + "-i input"); + fprintf(stderr, "%-20s Define an output file to use (default is stdout)\n", + "-o output"); + fprintf(stderr, "%-20s Wrap output in BEGIN/END lines and the given suffix\n", + "-w suffix"); + fprintf(stderr, "%-20s (use \"c\" as a shortcut for suffix CERTIFICATE)\n", + ""); +} + +int +main(int argc, char **argv) +{ + char *progName; + SECStatus rv; + FILE *inFile = NULL, *outFile = NULL; + PRBool closeIn = PR_TRUE, closeOut = PR_TRUE; + PLOptState *optstate = NULL; + PLOptStatus status; + char *suffix = NULL; + int exitCode = -1; + + progName = strrchr(argv[0], '/'); + if (!progName) + progName = strrchr(argv[0], '\\'); + progName = progName ? progName + 1 : argv[0]; + + /* Parse command line arguments */ + optstate = PL_CreateOptState(argc, argv, "i:o:w:"); + PORT_Assert(optstate); + while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { + switch (optstate->option) { + default: + Usage(progName); + goto loser; + break; + + case 'i': + inFile = fopen(optstate->value, "rb"); + if (!inFile) { + fprintf(stderr, "%s: unable to open \"%s\" for reading\n", + progName, optstate->value); + goto loser; + } + break; + + case 'o': + outFile = fopen(optstate->value, "wb"); + if (!outFile) { + fprintf(stderr, "%s: unable to open \"%s\" for writing\n", + progName, optstate->value); + goto loser; + } + break; + + case 'w': + if (!strcmp(optstate->value, "c")) + suffix = strdup("CERTIFICATE"); + else + suffix = strdup(optstate->value); + break; + } + } + if (status == PL_OPT_BAD) + Usage(progName); + if (!inFile) { +#if defined(WIN32) + /* If we're going to read binary data from stdin, we must put stdin + ** into O_BINARY mode or else incoming \r\n's will become \n's. + */ + + int smrv = _setmode(_fileno(stdin), _O_BINARY); + if (smrv == -1) { + fprintf(stderr, + "%s: Cannot change stdin to binary mode. Use -i option instead.\n", + progName); + goto loser; + } +#endif + inFile = stdin; + closeIn = PR_FALSE; + } + if (!outFile) { +#if defined(WIN32) + /* We're going to write binary data to stdout. We must put stdout + ** into O_BINARY mode or else outgoing \r\n's will become \r\r\n's. + */ + + int smrv = _setmode(_fileno(stdout), _O_BINARY); + if (smrv == -1) { + fprintf(stderr, + "%s: Cannot change stdout to binary mode. Use -o option instead.\n", + progName); + goto loser; + } +#endif + outFile = stdout; + closeOut = PR_FALSE; + } + if (suffix) { + fprintf(outFile, "-----BEGIN %s-----\n", suffix); + } + rv = encode_file(outFile, inFile); + if (rv != SECSuccess) { + fprintf(stderr, "%s: lossage: error=%d errno=%d\n", + progName, PORT_GetError(), errno); + goto loser; + } + if (suffix) { + fprintf(outFile, "-----END %s-----\n", suffix); + } + exitCode = 0; +loser: + PL_DestroyOptState(optstate); + if (inFile && closeIn) { + fclose(inFile); + } + if (outFile && closeOut) { + fclose(outFile); + } + if (suffix) { + PORT_Free(suffix); + } + return exitCode; +} diff --git a/security/nss/cmd/btoa/btoa.gyp b/security/nss/cmd/btoa/btoa.gyp new file mode 100644 index 0000000000..295d5758ed --- /dev/null +++ b/security/nss/cmd/btoa/btoa.gyp @@ -0,0 +1,30 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +{ + 'includes': [ + '../../coreconf/config.gypi', + '../../cmd/platlibs.gypi' + ], + 'targets': [ + { + 'target_name': 'btoa', + 'type': 'executable', + 'sources': [ + 'btoa.c' + ], + 'dependencies': [ + '<(DEPTH)/exports.gyp:dbm_exports', + '<(DEPTH)/exports.gyp:nss_exports' + ] + } + ], + 'target_defaults': { + 'defines': [ + 'NSPR20' + ] + }, + 'variables': { + 'module': 'nss' + } +} \ No newline at end of file diff --git a/security/nss/cmd/btoa/manifest.mn b/security/nss/cmd/btoa/manifest.mn new file mode 100644 index 0000000000..52508a59a6 --- /dev/null +++ b/security/nss/cmd/btoa/manifest.mn @@ -0,0 +1,21 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +CORE_DEPTH = ../.. + +# MODULE public and private header directories are implicitly REQUIRED. +MODULE = nss + +# This next line is used by .mk files +# and gets translated into $LINCS in manifest.mnw +# MODULE is implicitly REQUIRED, doesn't need to be listed below. +REQUIRES = seccmd dbm + +DEFINES = -DNSPR20 + +CSRCS = btoa.c + +PROGRAM = btoa + diff --git a/security/nss/cmd/certutil/Makefile b/security/nss/cmd/certutil/Makefile new file mode 100644 index 0000000000..74ae200208 --- /dev/null +++ b/security/nss/cmd/certutil/Makefile @@ -0,0 +1,48 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + + +include ../platrules.mk + diff --git a/security/nss/cmd/certutil/certext.c b/security/nss/cmd/certutil/certext.c new file mode 100644 index 0000000000..501608c850 --- /dev/null +++ b/security/nss/cmd/certutil/certext.c @@ -0,0 +1,2266 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* +** certext.c +** +** part of certutil for managing certificates extensions +** +*/ +#include +#include +#include + +#if defined(WIN32) +#include "fcntl.h" +#include "io.h" +#endif + +#include "secutil.h" + +#if defined(XP_UNIX) +#include +#endif + +#include "cert.h" +#include "xconst.h" +#include "prprf.h" +#include "certutil.h" +#include "genname.h" +#include "prnetdb.h" + +#define GEN_BREAK(e) \ + rv = e; \ + break; + +static char * +Gets_s(char *buff, size_t size) +{ + char *str; + + if (buff == NULL || size < 1) { + PORT_Assert(0); + return NULL; + } + if ((str = fgets(buff, size, stdin)) != NULL) { + int len = PORT_Strlen(str); + /* + * fgets() automatically converts native text file + * line endings to '\n'. As defensive programming + * (just in case fgets has a bug or we put stdin in + * binary mode by mistake), we handle three native + * text file line endings here: + * '\n' Unix (including Linux and Mac OS X) + * '\r''\n' DOS/Windows & OS/2 + * '\r' Mac OS Classic + * len can not be less then 1, since in case with + * empty string it has at least '\n' in the buffer + */ + if (buff[len - 1] == '\n' || buff[len - 1] == '\r') { + buff[len - 1] = '\0'; + if (len > 1 && buff[len - 2] == '\r') + buff[len - 2] = '\0'; + } + } else { + buff[0] = '\0'; + } + return str; +} + +static SECStatus +PrintChoicesAndGetAnswer(char *str, char *rBuff, int rSize) +{ + fputs(str, stdout); + fputs(" > ", stdout); + fflush(stdout); + if (Gets_s(rBuff, rSize) == NULL) { + PORT_SetError(SEC_ERROR_INPUT_LEN); + return SECFailure; + } + return SECSuccess; +} + +static CERTGeneralName * +GetGeneralName(PLArenaPool *arena, CERTGeneralName *useExistingName, PRBool onlyOne) +{ + CERTGeneralName *namesList = NULL; + CERTGeneralName *current; + CERTGeneralName *tail = NULL; + SECStatus rv = SECSuccess; + int intValue; + char buffer[512]; + void *mark; + + PORT_Assert(arena); + mark = PORT_ArenaMark(arena); + do { + if (PrintChoicesAndGetAnswer( + "\nSelect one of the following general name type: \n" + "\t2 - rfc822Name\n" + "\t3 - dnsName\n" + "\t5 - directoryName\n" + "\t7 - uniformResourceidentifier\n" + "\t8 - ipAddress\n" + "\t9 - registerID\n" + "\tAny other number to finish\n" + "\t\tChoice:", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + intValue = PORT_Atoi(buffer); + /* + * Should use ZAlloc instead of Alloc to avoid problem with garbage + * initialized pointers in CERT_CopyName + */ + switch (intValue) { + case certRFC822Name: + case certDNSName: + case certDirectoryName: + case certURI: + case certIPAddress: + case certRegisterID: + break; + default: + intValue = 0; /* force a break for anything else */ + } + + if (intValue == 0) + break; + + if (namesList == NULL) { + if (useExistingName) { + namesList = current = tail = useExistingName; + } else { + namesList = current = tail = + PORT_ArenaZNew(arena, CERTGeneralName); + } + } else { + current = PORT_ArenaZNew(arena, CERTGeneralName); + } + if (current == NULL) { + GEN_BREAK(SECFailure); + } + + current->type = intValue; + puts("\nEnter data:"); + fflush(stdout); + if (Gets_s(buffer, sizeof(buffer)) == NULL) { + PORT_SetError(SEC_ERROR_INPUT_LEN); + GEN_BREAK(SECFailure); + } + switch (current->type) { + case certURI: + case certDNSName: + case certRFC822Name: + current->name.other.data = + PORT_ArenaAlloc(arena, strlen(buffer)); + if (current->name.other.data == NULL) { + GEN_BREAK(SECFailure); + } + PORT_Memcpy(current->name.other.data, buffer, + current->name.other.len = strlen(buffer)); + break; + + case certEDIPartyName: + case certIPAddress: + case certOtherName: + case certRegisterID: + case certX400Address: { + + current->name.other.data = + PORT_ArenaAlloc(arena, strlen(buffer) + 2); + if (current->name.other.data == NULL) { + GEN_BREAK(SECFailure); + } + + PORT_Memcpy(current->name.other.data + 2, buffer, + strlen(buffer)); + /* This may not be accurate for all cases. For now, + * use this tag type */ + current->name.other.data[0] = + (char)(((current->type - 1) & 0x1f) | 0x80); + current->name.other.data[1] = (char)strlen(buffer); + current->name.other.len = strlen(buffer) + 2; + break; + } + + case certDirectoryName: { + CERTName *directoryName = NULL; + + directoryName = CERT_AsciiToName(buffer); + if (!directoryName) { + fprintf(stderr, "certutil: improperly formatted name: " + "\"%s\"\n", + buffer); + break; + } + + rv = CERT_CopyName(arena, ¤t->name.directoryName, + directoryName); + CERT_DestroyName(directoryName); + + break; + } + } + if (rv != SECSuccess) + break; + current->l.next = &(namesList->l); + current->l.prev = &(tail->l); + tail->l.next = &(current->l); + tail = current; + + } while (!onlyOne); + + if (rv != SECSuccess) { + PORT_ArenaRelease(arena, mark); + namesList = NULL; + } + return (namesList); +} + +static CERTGeneralName * +CreateGeneralName(PLArenaPool *arena) +{ + return GetGeneralName(arena, NULL, PR_FALSE); +} + +static SECStatus +GetString(PLArenaPool *arena, char *prompt, SECItem *value) +{ + char buffer[251]; + char *buffPrt; + + buffer[0] = '\0'; + value->data = NULL; + value->len = 0; + + puts(prompt); + buffPrt = Gets_s(buffer, sizeof(buffer)); + /* returned NULL here treated the same way as empty string */ + if (buffPrt && strlen(buffer) > 0) { + value->data = PORT_ArenaAlloc(arena, strlen(buffer)); + if (value->data == NULL) { + PORT_SetError(SEC_ERROR_NO_MEMORY); + return (SECFailure); + } + PORT_Memcpy(value->data, buffer, value->len = strlen(buffer)); + } + return (SECSuccess); +} + +static PRBool +GetYesNo(char *prompt) +{ + char buf[3]; + char *buffPrt; + + buf[0] = 'n'; + puts(prompt); + buffPrt = Gets_s(buf, sizeof(buf)); + return (buffPrt && (buf[0] == 'y' || buf[0] == 'Y')) ? PR_TRUE : PR_FALSE; +} + +/* Parses comma separated values out of the string pointed by nextPos. + * Parsed value is compared to an array of possible values(valueArray). + * If match is found, a value index is returned, otherwise returns SECFailue. + * nextPos is set to the token after found comma separator or to NULL. + * NULL in nextPos should be used as indication of the last parsed token. + * A special value "critical" can be parsed out from the supplied sting.*/ + +static SECStatus +parseNextCmdInput(const char *const *valueArray, int *value, char **nextPos, + PRBool *critical) +{ + char *thisPos; + int keyLen = 0; + int arrIndex = 0; + + if (!valueArray || !value || !nextPos || !critical) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + thisPos = *nextPos; + while (1) { + if ((*nextPos = strchr(thisPos, ',')) == NULL) { + keyLen = strlen(thisPos); + } else { + keyLen = *nextPos - thisPos; + *nextPos += 1; + } + /* if critical keyword is found, go for another loop, + * but check, if it is the last keyword of + * the string.*/ + if (!strncmp("critical", thisPos, keyLen)) { + *critical = PR_TRUE; + if (*nextPos == NULL) { + return SECSuccess; + } + thisPos = *nextPos; + continue; + } + break; + } + for (arrIndex = 0; valueArray[arrIndex]; arrIndex++) { + if (!strncmp(valueArray[arrIndex], thisPos, keyLen)) { + *value = arrIndex; + return SECSuccess; + } + } + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; +} + +static const char *const + keyUsageKeyWordArray[] = { "digitalSignature", + "nonRepudiation", + "keyEncipherment", + "dataEncipherment", + "keyAgreement", + "certSigning", + "crlSigning", + NULL }; + +static SECStatus +AddKeyUsage(void *extHandle, const char *userSuppliedValue) +{ + SECItem bitStringValue; + unsigned char keyUsage = 0x0; + char buffer[5]; + int value; + char *nextPos = (char *)userSuppliedValue; + PRBool isCriticalExt = PR_FALSE; + + if (!userSuppliedValue) { + while (1) { + if (PrintChoicesAndGetAnswer( + "\t\t0 - Digital Signature\n" + "\t\t1 - Non-repudiation\n" + "\t\t2 - Key encipherment\n" + "\t\t3 - Data encipherment\n" + "\t\t4 - Key agreement\n" + "\t\t5 - Cert signing key\n" + "\t\t6 - CRL signing key\n" + "\t\tOther to finish\n", + buffer, sizeof(buffer)) == SECFailure) { + return SECFailure; + } + value = PORT_Atoi(buffer); + if (value < 0 || value > 6) + break; + if (value == 0) { + /* Checking that zero value of variable 'value' + * corresponds to '0' input made by user */ + char *chPtr = strchr(buffer, '0'); + if (chPtr == NULL) { + continue; + } + } + keyUsage |= (0x80 >> value); + } + isCriticalExt = GetYesNo("Is this a critical extension [y/N]?"); + } else { + while (1) { + if (parseNextCmdInput(keyUsageKeyWordArray, &value, &nextPos, + &isCriticalExt) == SECFailure) { + return SECFailure; + } + keyUsage |= (0x80 >> value); + if (!nextPos) + break; + } + } + + bitStringValue.data = &keyUsage; + bitStringValue.len = 1; + + return (CERT_EncodeAndAddBitStrExtension(extHandle, SEC_OID_X509_KEY_USAGE, &bitStringValue, + isCriticalExt)); +} + +static CERTOidSequence * +CreateOidSequence(void) +{ + CERTOidSequence *rv = (CERTOidSequence *)NULL; + PLArenaPool *arena = (PLArenaPool *)NULL; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if ((PLArenaPool *)NULL == arena) { + goto loser; + } + + rv = (CERTOidSequence *)PORT_ArenaZNew(arena, CERTOidSequence); + if ((CERTOidSequence *)NULL == rv) { + goto loser; + } + + rv->oids = (SECItem **)PORT_ArenaZNew(arena, SECItem *); + if ((SECItem **)NULL == rv->oids) { + goto loser; + } + + rv->arena = arena; + return rv; + +loser: + if ((PLArenaPool *)NULL != arena) { + PORT_FreeArena(arena, PR_FALSE); + } + + return (CERTOidSequence *)NULL; +} + +static void +DestroyOidSequence(CERTOidSequence *os) +{ + if (os->arena) { + PORT_FreeArena(os->arena, PR_FALSE); + } +} + +static SECStatus +AddOidToSequence(CERTOidSequence *os, SECOidTag oidTag) +{ + SECItem **oids; + PRUint32 count = 0; + SECOidData *od; + + od = SECOID_FindOIDByTag(oidTag); + if ((SECOidData *)NULL == od) { + return SECFailure; + } + + for (oids = os->oids; (SECItem *)NULL != *oids; oids++) { + if (*oids == &od->oid) { + /* We already have this oid */ + return SECSuccess; + } + count++; + } + + /* ArenaZRealloc */ + + { + PRUint32 i; + + oids = (SECItem **)PORT_ArenaZNewArray(os->arena, SECItem *, count + 2); + if ((SECItem **)NULL == oids) { + return SECFailure; + } + + for (i = 0; i < count; i++) { + oids[i] = os->oids[i]; + } + + /* ArenaZFree(os->oids); */ + } + + os->oids = oids; + os->oids[count] = &od->oid; + + return SECSuccess; +} + +SEC_ASN1_MKSUB(SEC_ObjectIDTemplate) + +const SEC_ASN1Template CERT_OidSeqTemplate[] = { + { SEC_ASN1_SEQUENCE_OF | SEC_ASN1_XTRN, offsetof(CERTOidSequence, oids), + SEC_ASN1_SUB(SEC_ObjectIDTemplate) } +}; + +static SECItem * +EncodeOidSequence(CERTOidSequence *os) +{ + SECItem *rv; + + rv = (SECItem *)PORT_ArenaZNew(os->arena, SECItem); + if ((SECItem *)NULL == rv) { + goto loser; + } + + if (!SEC_ASN1EncodeItem(os->arena, rv, os, CERT_OidSeqTemplate)) { + goto loser; + } + + return rv; + +loser: + return (SECItem *)NULL; +} + +static const char *const + extKeyUsageKeyWordArray[] = { "serverAuth", + "clientAuth", + "codeSigning", + "emailProtection", + "timeStamp", + "ocspResponder", + "stepUp", + "msTrustListSigning", + "x509Any", + "ipsecIKE", + "ipsecIKEEnd", + "ipsecIKEIntermediate", + "ipsecEnd", + "ipsecTunnel", + "ipsecUser", + NULL }; + +static SECStatus +AddExtKeyUsage(void *extHandle, const char *userSuppliedValue) +{ + char buffer[5]; + int value; + CERTOidSequence *os; + SECStatus rv; + SECItem *item; + PRBool isCriticalExt = PR_FALSE; + char *nextPos = (char *)userSuppliedValue; + + os = CreateOidSequence(); + if ((CERTOidSequence *)NULL == os) { + return SECFailure; + } + + while (1) { + if (!userSuppliedValue) { + /* + * none of the 'new' extended key usage options work with the prompted menu. This is so + * old scripts can continue to work. + */ + if (PrintChoicesAndGetAnswer( + "\t\t0 - Server Auth\n" + "\t\t1 - Client Auth\n" + "\t\t2 - Code Signing\n" + "\t\t3 - Email Protection\n" + "\t\t4 - Timestamp\n" + "\t\t5 - OCSP Responder\n" + "\t\t6 - Step-up\n" + "\t\t7 - Microsoft Trust List Signing\n" + "\t\tOther to finish\n", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + value = PORT_Atoi(buffer); + + if (value == 0) { + /* Checking that zero value of variable 'value' + * corresponds to '0' input made by user */ + char *chPtr = strchr(buffer, '0'); + if (chPtr == NULL) { + continue; + } + } + } else { + if (parseNextCmdInput(extKeyUsageKeyWordArray, &value, &nextPos, + &isCriticalExt) == SECFailure) { + return SECFailure; + } + } + + switch (value) { + case 0: + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_SERVER_AUTH); + break; + case 1: + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_CLIENT_AUTH); + break; + case 2: + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_CODE_SIGN); + break; + case 3: + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_EMAIL_PROTECT); + break; + case 4: + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_TIME_STAMP); + break; + case 5: + rv = AddOidToSequence(os, SEC_OID_OCSP_RESPONDER); + break; + case 6: + rv = AddOidToSequence(os, SEC_OID_NS_KEY_USAGE_GOVT_APPROVED); + break; + case 7: + rv = AddOidToSequence(os, SEC_OID_MS_EXT_KEY_USAGE_CTL_SIGNING); + break; + /* + * These new usages can only be added explicitly by the userSuppliedValues. This allows old + * scripts which used '>7' as an exit value to continue to work. + */ + case 8: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_X509_ANY_EXT_KEY_USAGE); + break; + case 9: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_IPSEC_IKE); + break; + case 10: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_IPSEC_IKE_END); + break; + case 11: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_IPSEC_IKE_INTERMEDIATE); + break; + case 12: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_IPSEC_END); + break; + case 13: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_IPSEC_TUNNEL); + break; + case 14: + if (!userSuppliedValue) + goto endloop; + rv = AddOidToSequence(os, SEC_OID_EXT_KEY_USAGE_IPSEC_USER); + break; + default: + goto endloop; + } + + if (userSuppliedValue && !nextPos) + break; + if (SECSuccess != rv) + goto loser; + } + +endloop: + item = EncodeOidSequence(os); + + if (!userSuppliedValue) { + isCriticalExt = GetYesNo("Is this a critical extension [y/N]?"); + } + + rv = CERT_AddExtension(extHandle, SEC_OID_X509_EXT_KEY_USAGE, item, + isCriticalExt, PR_TRUE); +/*FALLTHROUGH*/ +loser: + DestroyOidSequence(os); + return rv; +} + +static const char *const + nsCertTypeKeyWordArray[] = { "sslClient", + "sslServer", + "smime", + "objectSigning", + "Not!Used", + "sslCA", + "smimeCA", + "objectSigningCA", + NULL }; + +static SECStatus +AddNscpCertType(void *extHandle, const char *userSuppliedValue) +{ + SECItem bitStringValue; + unsigned char keyUsage = 0x0; + char buffer[5]; + int value; + char *nextPos = (char *)userSuppliedValue; + PRBool isCriticalExt = PR_FALSE; + + if (!userSuppliedValue) { + while (1) { + if (PrintChoicesAndGetAnswer( + "\t\t0 - SSL Client\n" + "\t\t1 - SSL Server\n" + "\t\t2 - S/MIME\n" + "\t\t3 - Object Signing\n" + "\t\t4 - Reserved for future use\n" + "\t\t5 - SSL CA\n" + "\t\t6 - S/MIME CA\n" + "\t\t7 - Object Signing CA\n" + "\t\tOther to finish\n", + buffer, sizeof(buffer)) == SECFailure) { + return SECFailure; + } + value = PORT_Atoi(buffer); + if (value < 0 || value > 7) + break; + if (value == 0) { + /* Checking that zero value of variable 'value' + * corresponds to '0' input made by user */ + char *chPtr = strchr(buffer, '0'); + if (chPtr == NULL) { + continue; + } + } + keyUsage |= (0x80 >> value); + } + isCriticalExt = GetYesNo("Is this a critical extension [y/N]?"); + } else { + while (1) { + if (parseNextCmdInput(nsCertTypeKeyWordArray, &value, &nextPos, + &isCriticalExt) == SECFailure) { + return SECFailure; + } + keyUsage |= (0x80 >> value); + if (!nextPos) + break; + } + } + + bitStringValue.data = &keyUsage; + bitStringValue.len = 1; + + return (CERT_EncodeAndAddBitStrExtension(extHandle, SEC_OID_NS_CERT_EXT_CERT_TYPE, &bitStringValue, + isCriticalExt)); +} + +SECStatus +GetOidFromString(PLArenaPool *arena, SECItem *to, + const char *from, size_t fromLen) +{ + SECStatus rv; + SECOidTag tag; + SECOidData *coid; + + /* try dotted form first */ + rv = SEC_StringToOID(arena, to, from, fromLen); + if (rv == SECSuccess) { + return rv; + } + + /* Check to see if it matches a name in our oid table. + * SECOID_FindOIDByTag returns NULL if tag is out of bounds. + */ + tag = SEC_OID_UNKNOWN; + coid = SECOID_FindOIDByTag(tag); + for (; coid; coid = SECOID_FindOIDByTag(++tag)) { + if (PORT_Strncasecmp(from, coid->desc, fromLen) == 0) { + break; + } + } + if (coid == NULL) { + /* none found */ + return SECFailure; + } + return SECITEM_CopyItem(arena, to, &coid->oid); +} + +static SECStatus +AddSubjectAltNames(PLArenaPool *arena, CERTGeneralName **existingListp, + const char *constNames, CERTGeneralNameType type) +{ + CERTGeneralName *nameList = NULL; + CERTGeneralName *current = NULL; + PRCList *prev = NULL; + char *cp, *nextName = NULL; + SECStatus rv = SECSuccess; + PRBool readTypeFromName = (PRBool)(type == 0); + char *names = NULL; + + if (constNames) + names = PORT_Strdup(constNames); + + if (names == NULL) { + return SECFailure; + } + + /* + * walk down the comma separated list of names. NOTE: there is + * no sanity checks to see if the email address look like + * email addresses. + * + * Each name may optionally be prefixed with a type: string. + * If it isn't, the type from the previous name will be used. + * If there wasn't a previous name yet, the type given + * as a parameter to this function will be used. + * If the type value is zero (undefined), we'll fail. + */ + for (cp = names; cp; cp = nextName) { + int len; + char *oidString; + char *nextComma; + CERTName *name; + PRStatus status; + unsigned char *data; + PRNetAddr addr; + + nextName = NULL; + if (*cp == ',') { + cp++; + } + nextComma = PORT_Strchr(cp, ','); + if (nextComma) { + *nextComma = 0; + nextName = nextComma + 1; + } + if ((*cp) == 0) { + continue; + } + if (readTypeFromName) { + char *save = cp; + /* Because we already replaced nextComma with end-of-string, + * a found colon belongs to the current name */ + cp = PORT_Strchr(cp, ':'); + if (cp) { + *cp = 0; + cp++; + type = CERT_GetGeneralNameTypeFromString(save); + if (*cp == 0) { + continue; + } + } else { + if (type == 0) { + /* no type known yet */ + rv = SECFailure; + break; + } + cp = save; + } + } + + current = PORT_ArenaZNew(arena, CERTGeneralName); + if (!current) { + rv = SECFailure; + break; + } + + current->type = type; + switch (type) { + /* string types */ + case certRFC822Name: + case certDNSName: + case certURI: + current->name.other.data = + (unsigned char *)PORT_ArenaStrdup(arena, cp); + current->name.other.len = PORT_Strlen(cp); + break; + /* unformated data types */ + case certX400Address: + case certEDIPartyName: + /* turn a string into a data and len */ + rv = SECFailure; /* punt on these for now */ + fprintf(stderr, "EDI Party Name and X.400 Address not supported\n"); + break; + case certDirectoryName: + /* certDirectoryName */ + name = CERT_AsciiToName(cp); + if (name == NULL) { + rv = SECFailure; + fprintf(stderr, "Invalid Directory Name (\"%s\")\n", cp); + break; + } + rv = CERT_CopyName(arena, ¤t->name.directoryName, name); + CERT_DestroyName(name); + break; + /* types that require more processing */ + case certIPAddress: + /* convert the string to an ip address */ + status = PR_StringToNetAddr(cp, &addr); + if (status != PR_SUCCESS) { + rv = SECFailure; + fprintf(stderr, "Invalid IP Address (\"%s\")\n", cp); + break; + } + + if (PR_NetAddrFamily(&addr) == PR_AF_INET) { + len = sizeof(addr.inet.ip); + data = (unsigned char *)&addr.inet.ip; + } else if (PR_NetAddrFamily(&addr) == PR_AF_INET6) { + len = sizeof(addr.ipv6.ip); + data = (unsigned char *)&addr.ipv6.ip; + } else { + fprintf(stderr, "Invalid IP Family\n"); + rv = SECFailure; + break; + } + current->name.other.data = PORT_ArenaAlloc(arena, len); + if (current->name.other.data == NULL) { + rv = SECFailure; + break; + } + current->name.other.len = len; + PORT_Memcpy(current->name.other.data, data, len); + break; + case certRegisterID: + rv = GetOidFromString(arena, ¤t->name.other, cp, strlen(cp)); + break; + case certOtherName: + oidString = cp; + cp = PORT_Strchr(cp, ';'); + if (cp == NULL) { + rv = SECFailure; + fprintf(stderr, "missing name in other name\n"); + break; + } + *cp++ = 0; + current->name.OthName.name.data = + (unsigned char *)PORT_ArenaStrdup(arena, cp); + if (current->name.OthName.name.data == NULL) { + rv = SECFailure; + break; + } + current->name.OthName.name.len = PORT_Strlen(cp); + rv = GetOidFromString(arena, ¤t->name.OthName.oid, + oidString, strlen(oidString)); + break; + default: + rv = SECFailure; + fprintf(stderr, "Missing or invalid Subject Alternate Name type\n"); + break; + } + if (rv == SECFailure) { + break; + } + + if (prev) { + current->l.prev = prev; + prev->next = &(current->l); + } else { + nameList = current; + } + prev = &(current->l); + } + PORT_Free(names); + /* at this point nameList points to the head of a doubly linked, + * but not yet circular, list and current points to its tail. */ + if (rv == SECSuccess && nameList) { + if (*existingListp != NULL) { + PRCList *existingprev; + /* add nameList to the end of the existing list */ + existingprev = (*existingListp)->l.prev; + (*existingListp)->l.prev = &(current->l); + nameList->l.prev = existingprev; + existingprev->next = &(nameList->l); + current->l.next = &((*existingListp)->l); + } else { + /* make nameList circular and set it as the new existingList */ + nameList->l.prev = prev; + current->l.next = &(nameList->l); + *existingListp = nameList; + } + } + return rv; +} + +static SECStatus +AddEmailSubjectAlt(PLArenaPool *arena, CERTGeneralName **existingListp, + const char *emailAddrs) +{ + return AddSubjectAltNames(arena, existingListp, emailAddrs, + certRFC822Name); +} + +static SECStatus +AddDNSSubjectAlt(PLArenaPool *arena, CERTGeneralName **existingListp, + const char *dnsNames) +{ + return AddSubjectAltNames(arena, existingListp, dnsNames, certDNSName); +} + +static SECStatus +AddGeneralSubjectAlt(PLArenaPool *arena, CERTGeneralName **existingListp, + const char *altNames) +{ + return AddSubjectAltNames(arena, existingListp, altNames, 0); +} + +static SECStatus +AddBasicConstraint(PLArenaPool *arena, void *extHandle) +{ + CERTBasicConstraints basicConstraint; + SECStatus rv; + char buffer[10]; + PRBool yesNoAns; + + do { + basicConstraint.pathLenConstraint = CERT_UNLIMITED_PATH_CONSTRAINT; + basicConstraint.isCA = GetYesNo("Is this a CA certificate [y/N]?"); + + buffer[0] = '\0'; + if (PrintChoicesAndGetAnswer("Enter the path length constraint, " + "enter to skip [<0 for unlimited path]:", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + if (PORT_Strlen(buffer) > 0) + basicConstraint.pathLenConstraint = PORT_Atoi(buffer); + + yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, + &basicConstraint, yesNoAns, SEC_OID_X509_BASIC_CONSTRAINTS, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeBasicConstraintValue); + } while (0); + + return (rv); +} + +static SECStatus +AddNameConstraints(void *extHandle) +{ + PLArenaPool *arena = NULL; + CERTNameConstraints *constraints = NULL; + + CERTNameConstraint *current = NULL; + CERTNameConstraint *last_permited = NULL; + CERTNameConstraint *last_excluded = NULL; + SECStatus rv = SECSuccess; + + char buffer[512]; + int intValue = 0; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena) { + constraints = PORT_ArenaZNew(arena, CERTNameConstraints); + } + + if (!arena || !constraints) { + SECU_PrintError(progName, "out of memory"); + PORT_FreeArena(arena, PR_FALSE); + return SECFailure; + } + + constraints->permited = constraints->excluded = NULL; + + do { + current = PORT_ArenaZNew(arena, CERTNameConstraint); + if (!current) { + GEN_BREAK(SECFailure); + } + + if (!GetGeneralName(arena, ¤t->name, PR_TRUE)) { + GEN_BREAK(SECFailure); + } + + if (PrintChoicesAndGetAnswer("Type of Name Constraint?\n" + "\t1 - permitted\n\t2 - excluded\n\tAny" + "other number to finish\n\tChoice", + buffer, sizeof(buffer)) != + SECSuccess) { + GEN_BREAK(SECFailure); + } + + intValue = PORT_Atoi(buffer); + switch (intValue) { + case 1: + if (constraints->permited == NULL) { + constraints->permited = last_permited = current; + } + last_permited->l.next = &(current->l); + current->l.prev = &(last_permited->l); + last_permited = current; + break; + case 2: + if (constraints->excluded == NULL) { + constraints->excluded = last_excluded = current; + } + last_excluded->l.next = &(current->l); + current->l.prev = &(last_excluded->l); + last_excluded = current; + break; + } + + PR_snprintf(buffer, sizeof(buffer), "Add another entry to the" + " Name Constraint Extension [y/N]"); + + if (GetYesNo(buffer) == 0) { + break; + } + + } while (1); + + if (rv == SECSuccess) { + int oidIdent = SEC_OID_X509_NAME_CONSTRAINTS; + + PRBool yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + if (constraints->permited != NULL) { + last_permited->l.next = &(constraints->permited->l); + constraints->permited->l.prev = &(last_permited->l); + } + if (constraints->excluded != NULL) { + last_excluded->l.next = &(constraints->excluded->l); + constraints->excluded->l.prev = &(last_excluded->l); + } + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, constraints, + yesNoAns, oidIdent, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeNameConstraintsExtension); + } + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +static SECStatus +AddAuthKeyID(void *extHandle) +{ + CERTAuthKeyID *authKeyID = NULL; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + PRBool yesNoAns; + + do { + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + GEN_BREAK(SECFailure); + } + + if (GetYesNo("Enter value for the authKeyID extension [y/N]?") == 0) + break; + + authKeyID = PORT_ArenaZNew(arena, CERTAuthKeyID); + if (authKeyID == NULL) { + GEN_BREAK(SECFailure); + } + + rv = GetString(arena, "Enter value for the key identifier fields," + "enter to omit:", + &authKeyID->keyID); + if (rv != SECSuccess) + break; + + SECU_SECItemHexStringToBinary(&authKeyID->keyID); + + authKeyID->authCertIssuer = CreateGeneralName(arena); + if (authKeyID->authCertIssuer == NULL && + SECFailure == PORT_GetError()) + break; + + rv = GetString(arena, "Enter value for the authCertSerial field, " + "enter to omit:", + &authKeyID->authCertSerialNumber); + + yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, + authKeyID, yesNoAns, SEC_OID_X509_AUTH_KEY_ID, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeAuthKeyID); + if (rv) + break; + + } while (0); + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +static SECStatus +AddSubjKeyID(void *extHandle) +{ + SECItem keyID; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + PRBool yesNoAns; + + do { + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + GEN_BREAK(SECFailure); + } + printf("Adding Subject Key ID extension.\n"); + + rv = GetString(arena, "Enter value for the key identifier fields," + "enter to omit:", + &keyID); + if (rv != SECSuccess) + break; + + SECU_SECItemHexStringToBinary(&keyID); + + yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, + &keyID, yesNoAns, SEC_OID_X509_SUBJECT_KEY_ID, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeSubjectKeyID); + if (rv) + break; + + } while (0); + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +static SECStatus +AddCrlDistPoint(void *extHandle) +{ + PLArenaPool *arena = NULL; + CERTCrlDistributionPoints *crlDistPoints = NULL; + CRLDistributionPoint *current; + SECStatus rv = SECSuccess; + int count = 0, intValue; + char buffer[512]; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) + return (SECFailure); + + do { + current = NULL; + + current = PORT_ArenaZNew(arena, CRLDistributionPoint); + if (current == NULL) { + GEN_BREAK(SECFailure); + } + + /* Get the distributionPointName fields - this field is optional */ + if (PrintChoicesAndGetAnswer( + "Enter the type of the distribution point name:\n" + "\t1 - Full Name\n\t2 - Relative Name\n\tAny other " + "number to finish\n\t\tChoice: ", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + intValue = PORT_Atoi(buffer); + switch (intValue) { + case generalName: + current->distPointType = intValue; + current->distPoint.fullName = CreateGeneralName(arena); + rv = PORT_GetError(); + break; + + case relativeDistinguishedName: { + CERTName *name; + + current->distPointType = intValue; + puts("Enter the relative name: "); + fflush(stdout); + if (Gets_s(buffer, sizeof(buffer)) == NULL) { + GEN_BREAK(SECFailure); + } + /* For simplicity, use CERT_AsciiToName to converse from a string + to NAME, but we only interest in the first RDN */ + name = CERT_AsciiToName(buffer); + if (!name) { + GEN_BREAK(SECFailure); + } + rv = CERT_CopyRDN(arena, ¤t->distPoint.relativeName, + name->rdns[0]); + CERT_DestroyName(name); + break; + } + } + if (rv != SECSuccess) + break; + + /* Get the reason flags */ + if (PrintChoicesAndGetAnswer( + "\nSelect one of the following for the reason flags\n" + "\t0 - unused\n\t1 - keyCompromise\n" + "\t2 - caCompromise\n\t3 - affiliationChanged\n" + "\t4 - superseded\n\t5 - cessationOfOperation\n" + "\t6 - certificateHold\n" + "\tAny other number to finish\t\tChoice: ", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + intValue = PORT_Atoi(buffer); + if (intValue == 0) { + /* Checking that zero value of variable 'value' + * corresponds to '0' input made by user */ + char *chPtr = strchr(buffer, '0'); + if (chPtr == NULL) { + intValue = -1; + } + } + if (intValue >= 0 && intValue < 8) { + current->reasons.data = PORT_ArenaAlloc(arena, sizeof(char)); + if (current->reasons.data == NULL) { + GEN_BREAK(SECFailure); + } + *current->reasons.data = (char)(0x80 >> intValue); + current->reasons.len = 1; + } + puts("Enter value for the CRL Issuer name:\n"); + current->crlIssuer = CreateGeneralName(arena); + if (current->crlIssuer == NULL && (rv = PORT_GetError()) == SECFailure) + break; + + if (crlDistPoints == NULL) { + crlDistPoints = PORT_ArenaZNew(arena, CERTCrlDistributionPoints); + if (crlDistPoints == NULL) { + GEN_BREAK(SECFailure); + } + } + + if (crlDistPoints->distPoints) { + crlDistPoints->distPoints = + PORT_ArenaGrow(arena, crlDistPoints->distPoints, + sizeof(*crlDistPoints->distPoints) * count, + sizeof(*crlDistPoints->distPoints) * (count + 1)); + } else { + crlDistPoints->distPoints = + PORT_ArenaZAlloc(arena, sizeof(*crlDistPoints->distPoints) * (count + 1)); + } + if (crlDistPoints->distPoints == NULL) { + GEN_BREAK(SECFailure); + } + + crlDistPoints->distPoints[count] = current; + ++count; + if (GetYesNo("Enter another value for the CRLDistributionPoint " + "extension [y/N]?") == 0) { + /* Add null to the end to mark end of data */ + crlDistPoints->distPoints = + PORT_ArenaGrow(arena, crlDistPoints->distPoints, + sizeof(*crlDistPoints->distPoints) * count, + sizeof(*crlDistPoints->distPoints) * (count + 1)); + crlDistPoints->distPoints[count] = NULL; + break; + } + + } while (1); + + if (rv == SECSuccess) { + PRBool yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, + crlDistPoints, yesNoAns, SEC_OID_X509_CRL_DIST_POINTS, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeCRLDistributionPoints); + } + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +static SECStatus +AddPolicyConstraints(void *extHandle) +{ + CERTCertificatePolicyConstraints *policyConstr; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + SECItem *item, *dummy; + char buffer[512]; + int value; + PRBool yesNoAns; + PRBool skipExt = PR_TRUE; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + return SECFailure; + } + + policyConstr = PORT_ArenaZNew(arena, CERTCertificatePolicyConstraints); + if (policyConstr == NULL) { + SECU_PrintError(progName, "out of memory"); + goto loser; + } + + if (PrintChoicesAndGetAnswer("for requireExplicitPolicy enter the number " + "of certs in path\nbefore explicit policy is required\n" + "(press Enter to omit)", + buffer, sizeof(buffer)) == SECFailure) { + goto loser; + } + + if (PORT_Strlen(buffer)) { + value = PORT_Atoi(buffer); + if (value < 0) { + goto loser; + } + item = &policyConstr->explicitPolicySkipCerts; + dummy = SEC_ASN1EncodeInteger(arena, item, value); + if (!dummy) { + goto loser; + } + skipExt = PR_FALSE; + } + + if (PrintChoicesAndGetAnswer("for inihibitPolicyMapping enter " + "the number of certs in path\n" + "after which policy mapping is not allowed\n" + "(press Enter to omit)", + buffer, sizeof(buffer)) == SECFailure) { + goto loser; + } + + if (PORT_Strlen(buffer)) { + value = PORT_Atoi(buffer); + if (value < 0) { + goto loser; + } + item = &policyConstr->inhibitMappingSkipCerts; + dummy = SEC_ASN1EncodeInteger(arena, item, value); + if (!dummy) { + goto loser; + } + skipExt = PR_FALSE; + } + + if (!skipExt) { + yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, policyConstr, + yesNoAns, SEC_OID_X509_POLICY_CONSTRAINTS, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodePolicyConstraintsExtension); + } else { + fprintf(stdout, "Policy Constraint extensions must contain " + "at least one policy field\n"); + rv = SECFailure; + } + +loser: + if (arena) { + PORT_FreeArena(arena, PR_FALSE); + } + return (rv); +} + +static SECStatus +AddInhibitAnyPolicy(void *extHandle) +{ + CERTCertificateInhibitAny certInhibitAny; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + SECItem *item, *dummy; + char buffer[10]; + int value; + PRBool yesNoAns; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + return SECFailure; + } + + if (PrintChoicesAndGetAnswer("Enter the number of certs in the path " + "permitted to use anyPolicy.\n" + "(press Enter for 0)", + buffer, sizeof(buffer)) == SECFailure) { + goto loser; + } + + item = &certInhibitAny.inhibitAnySkipCerts; + value = PORT_Atoi(buffer); + if (value < 0) { + goto loser; + } + dummy = SEC_ASN1EncodeInteger(arena, item, value); + if (!dummy) { + goto loser; + } + + yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, &certInhibitAny, + yesNoAns, SEC_OID_X509_INHIBIT_ANY_POLICY, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeInhibitAnyExtension); +loser: + if (arena) { + PORT_FreeArena(arena, PR_FALSE); + } + return (rv); +} + +static SECStatus +AddPolicyMappings(void *extHandle) +{ + CERTPolicyMap **policyMapArr = NULL; + CERTPolicyMap *current; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + int count = 0; + char buffer[512]; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + return SECFailure; + } + + do { + if (PrintChoicesAndGetAnswer("Enter an Object Identifier (dotted " + "decimal format) for Issuer Domain Policy", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + + current = PORT_ArenaZNew(arena, CERTPolicyMap); + if (current == NULL) { + GEN_BREAK(SECFailure); + } + + rv = SEC_StringToOID(arena, ¤t->issuerDomainPolicy, buffer, 0); + if (rv == SECFailure) { + GEN_BREAK(SECFailure); + } + + if (PrintChoicesAndGetAnswer("Enter an Object Identifier for " + "Subject Domain Policy", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + + rv = SEC_StringToOID(arena, ¤t->subjectDomainPolicy, buffer, 0); + if (rv == SECFailure) { + GEN_BREAK(SECFailure); + } + + if (policyMapArr == NULL) { + policyMapArr = PORT_ArenaZNew(arena, CERTPolicyMap *); + if (policyMapArr == NULL) { + GEN_BREAK(SECFailure); + } + } + + policyMapArr = PORT_ArenaGrow(arena, policyMapArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + if (policyMapArr == NULL) { + GEN_BREAK(SECFailure); + } + + policyMapArr[count] = current; + ++count; + + if (!GetYesNo("Enter another Policy Mapping [y/N]")) { + /* Add null to the end to mark end of data */ + policyMapArr = PORT_ArenaGrow(arena, policyMapArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + if (policyMapArr == NULL) { + GEN_BREAK(SECFailure); + } + policyMapArr[count] = NULL; + break; + } + + } while (1); + + if (rv == SECSuccess) { + CERTCertificatePolicyMappings mappings; + PRBool yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + mappings.arena = arena; + mappings.policyMaps = policyMapArr; + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, &mappings, + yesNoAns, SEC_OID_X509_POLICY_MAPPINGS, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodePolicyMappingExtension); + } + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +enum PoliciQualifierEnum { + cpsPointer = 1, + userNotice = 2 +}; + +static CERTPolicyQualifier ** +RequestPolicyQualifiers(PLArenaPool *arena, SECItem *policyID) +{ + CERTPolicyQualifier **policyQualifArr = NULL; + CERTPolicyQualifier *current; + SECStatus rv = SECSuccess; + int count = 0; + char buffer[512]; + void *mark; + SECOidData *oid = NULL; + int intValue = 0; + int inCount = 0; + + PORT_Assert(arena); + mark = PORT_ArenaMark(arena); + do { + current = PORT_ArenaZNew(arena, CERTPolicyQualifier); + if (current == NULL) { + GEN_BREAK(SECFailure); + } + + /* Get the accessMethod fields */ + SECU_PrintObjectID(stdout, policyID, + "Choose the type of qualifier for policy", 0); + + if (PrintChoicesAndGetAnswer( + "\t1 - CPS Pointer qualifier\n" + "\t2 - User notice qualifier\n" + "\tAny other number to finish\n" + "\t\tChoice: ", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + intValue = PORT_Atoi(buffer); + switch (intValue) { + case cpsPointer: { + SECItem input; + + oid = SECOID_FindOIDByTag(SEC_OID_PKIX_CPS_POINTER_QUALIFIER); + if (PrintChoicesAndGetAnswer("Enter CPS pointer URI: ", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + input.len = PORT_Strlen(buffer); + input.data = (void *)PORT_ArenaStrdup(arena, buffer); + if (input.data == NULL || + SEC_ASN1EncodeItem(arena, ¤t->qualifierValue, &input, + SEC_ASN1_GET(SEC_IA5StringTemplate)) == NULL) { + GEN_BREAK(SECFailure); + } + break; + } + case userNotice: { + SECItem **noticeNumArr; + CERTUserNotice *notice = PORT_ArenaZNew(arena, CERTUserNotice); + if (!notice) { + GEN_BREAK(SECFailure); + } + + oid = SECOID_FindOIDByTag(SEC_OID_PKIX_USER_NOTICE_QUALIFIER); + + if (GetYesNo("\t add a User Notice reference? [y/N]")) { + + if (PrintChoicesAndGetAnswer("Enter user organization string: ", + buffer, sizeof(buffer)) == + SECFailure) { + GEN_BREAK(SECFailure); + } + + notice->noticeReference.organization.type = siAsciiString; + notice->noticeReference.organization.len = + PORT_Strlen(buffer); + notice->noticeReference.organization.data = + (void *)PORT_ArenaStrdup(arena, buffer); + + noticeNumArr = PORT_ArenaZNewArray(arena, SECItem *, 2); + if (!noticeNumArr) { + GEN_BREAK(SECFailure); + } + + do { + SECItem *noticeNum; + + noticeNum = PORT_ArenaZNew(arena, SECItem); + + if (PrintChoicesAndGetAnswer( + "Enter User Notice reference number " + "(or -1 to quit): ", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + + intValue = PORT_Atoi(buffer); + if (noticeNum == NULL) { + if (intValue < 0) { + fprintf(stdout, "a noticeReference must have at " + "least one reference number\n"); + GEN_BREAK(SECFailure); + } + } else { + if (intValue >= 0) { + noticeNumArr = PORT_ArenaGrow(arena, noticeNumArr, + sizeof(current) * + inCount, + sizeof(current) * + (inCount + 1)); + if (noticeNumArr == NULL) { + GEN_BREAK(SECFailure); + } + } else { + break; + } + } + if (!SEC_ASN1EncodeInteger(arena, noticeNum, intValue)) { + GEN_BREAK(SECFailure); + } + noticeNumArr[inCount++] = noticeNum; + noticeNumArr[inCount] = NULL; + + } while (1); + if (rv == SECFailure) { + GEN_BREAK(SECFailure); + } + notice->noticeReference.noticeNumbers = noticeNumArr; + rv = CERT_EncodeNoticeReference(arena, ¬ice->noticeReference, + ¬ice->derNoticeReference); + if (rv == SECFailure) { + GEN_BREAK(SECFailure); + } + } + if (GetYesNo("\t EnterUser Notice explicit text? [y/N]")) { + /* Getting only 200 bytes - RFC limitation */ + if (PrintChoicesAndGetAnswer( + "\t", buffer, 200) == SECFailure) { + GEN_BREAK(SECFailure); + } + notice->displayText.type = siAsciiString; + notice->displayText.len = PORT_Strlen(buffer); + notice->displayText.data = + (void *)PORT_ArenaStrdup(arena, buffer); + if (notice->displayText.data == NULL) { + GEN_BREAK(SECFailure); + } + } + + rv = CERT_EncodeUserNotice(arena, notice, ¤t->qualifierValue); + if (rv == SECFailure) { + GEN_BREAK(SECFailure); + } + + break; + } + } + if (rv == SECFailure || oid == NULL || + SECITEM_CopyItem(arena, ¤t->qualifierID, &oid->oid) == + SECFailure) { + GEN_BREAK(SECFailure); + } + + if (!policyQualifArr) { + policyQualifArr = PORT_ArenaZNew(arena, CERTPolicyQualifier *); + } else { + policyQualifArr = PORT_ArenaGrow(arena, policyQualifArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + } + if (policyQualifArr == NULL) { + GEN_BREAK(SECFailure); + } + + policyQualifArr[count] = current; + ++count; + + if (!GetYesNo("Enter another policy qualifier [y/N]")) { + /* Add null to the end to mark end of data */ + policyQualifArr = PORT_ArenaGrow(arena, policyQualifArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + if (policyQualifArr == NULL) { + GEN_BREAK(SECFailure); + } + policyQualifArr[count] = NULL; + break; + } + + } while (1); + + if (rv != SECSuccess) { + PORT_ArenaRelease(arena, mark); + policyQualifArr = NULL; + } + return (policyQualifArr); +} + +static SECStatus +AddCertPolicies(void *extHandle) +{ + CERTPolicyInfo **certPoliciesArr = NULL; + CERTPolicyInfo *current; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + int count = 0; + char buffer[512]; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + return SECFailure; + } + + do { + current = PORT_ArenaZNew(arena, CERTPolicyInfo); + if (current == NULL) { + GEN_BREAK(SECFailure); + } + + if (PrintChoicesAndGetAnswer("Enter a CertPolicy Object Identifier " + "(dotted decimal format)\n" + "or \"any\" for AnyPolicy:", + buffer, sizeof(buffer)) == SECFailure) { + GEN_BREAK(SECFailure); + } + + if (strncmp(buffer, "any", 3) == 0) { + /* use string version of X509_CERTIFICATE_POLICIES.anyPolicy */ + strcpy(buffer, "OID.2.5.29.32.0"); + } + rv = SEC_StringToOID(arena, ¤t->policyID, buffer, 0); + + if (rv == SECFailure) { + GEN_BREAK(SECFailure); + } + + current->policyQualifiers = + RequestPolicyQualifiers(arena, ¤t->policyID); + + if (!certPoliciesArr) { + certPoliciesArr = PORT_ArenaZNew(arena, CERTPolicyInfo *); + } else { + certPoliciesArr = PORT_ArenaGrow(arena, certPoliciesArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + } + if (certPoliciesArr == NULL) { + GEN_BREAK(SECFailure); + } + + certPoliciesArr[count] = current; + ++count; + + if (!GetYesNo("Enter another PolicyInformation field [y/N]?")) { + /* Add null to the end to mark end of data */ + certPoliciesArr = PORT_ArenaGrow(arena, certPoliciesArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + if (certPoliciesArr == NULL) { + GEN_BREAK(SECFailure); + } + certPoliciesArr[count] = NULL; + break; + } + + } while (1); + + if (rv == SECSuccess) { + CERTCertificatePolicies policies; + PRBool yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + policies.arena = arena; + policies.policyInfos = certPoliciesArr; + + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, &policies, + yesNoAns, SEC_OID_X509_CERTIFICATE_POLICIES, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeCertPoliciesExtension); + } + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +enum AuthInfoAccessTypesEnum { + caIssuers = 1, + ocsp = 2 +}; + +enum SubjInfoAccessTypesEnum { + caRepository = 1, + timeStamping = 2 +}; + +/* Encode and add an AIA or SIA extension */ +static SECStatus +AddInfoAccess(void *extHandle, PRBool addSIAExt, PRBool isCACert) +{ + CERTAuthInfoAccess **infoAccArr = NULL; + CERTAuthInfoAccess *current; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + int count = 0; + char buffer[512]; + SECOidData *oid = NULL; + int intValue = 0; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + return SECFailure; + } + + do { + current = NULL; + current = PORT_ArenaZNew(arena, CERTAuthInfoAccess); + if (current == NULL) { + GEN_BREAK(SECFailure); + } + + /* Get the accessMethod fields */ + if (addSIAExt) { + if (isCACert) { + puts("Adding \"CA Repository\" access method type for " + "Subject Information Access extension:\n"); + intValue = caRepository; + } else { + puts("Adding \"Time Stamping Services\" access method type for " + "Subject Information Access extension:\n"); + intValue = timeStamping; + } + } else { + if (PrintChoicesAndGetAnswer("Enter access method type " + "for Authority Information Access extension:\n" + "\t1 - CA Issuers\n\t2 - OCSP\n\tAny" + "other number to finish\n\tChoice", + buffer, sizeof(buffer)) != + SECSuccess) { + GEN_BREAK(SECFailure); + } + intValue = PORT_Atoi(buffer); + } + if (addSIAExt) { + switch (intValue) { + case caRepository: + oid = SECOID_FindOIDByTag(SEC_OID_PKIX_CA_REPOSITORY); + break; + + case timeStamping: + oid = SECOID_FindOIDByTag(SEC_OID_PKIX_TIMESTAMPING); + break; + } + } else { + switch (intValue) { + case caIssuers: + oid = SECOID_FindOIDByTag(SEC_OID_PKIX_CA_ISSUERS); + break; + + case ocsp: + oid = SECOID_FindOIDByTag(SEC_OID_PKIX_OCSP); + break; + } + } + if (oid == NULL || + SECITEM_CopyItem(arena, ¤t->method, &oid->oid) == + SECFailure) { + GEN_BREAK(SECFailure); + } + + current->location = CreateGeneralName(arena); + if (!current->location) { + GEN_BREAK(SECFailure); + } + + if (infoAccArr == NULL) { + infoAccArr = PORT_ArenaZNew(arena, CERTAuthInfoAccess *); + } else { + infoAccArr = PORT_ArenaGrow(arena, infoAccArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + } + if (infoAccArr == NULL) { + GEN_BREAK(SECFailure); + } + + infoAccArr[count] = current; + ++count; + + PR_snprintf(buffer, sizeof(buffer), "Add another location to the %s" + " Information Access extension [y/N]", + (addSIAExt) ? "Subject" : "Authority"); + + if (GetYesNo(buffer) == 0) { + /* Add null to the end to mark end of data */ + infoAccArr = PORT_ArenaGrow(arena, infoAccArr, + sizeof(current) * count, + sizeof(current) * (count + 1)); + if (infoAccArr == NULL) { + GEN_BREAK(SECFailure); + } + infoAccArr[count] = NULL; + break; + } + + } while (1); + + if (rv == SECSuccess) { + int oidIdent = SEC_OID_X509_AUTH_INFO_ACCESS; + + PRBool yesNoAns = GetYesNo("Is this a critical extension [y/N]?"); + + if (addSIAExt) { + oidIdent = SEC_OID_X509_SUBJECT_INFO_ACCESS; + } + rv = SECU_EncodeAndAddExtensionValue(arena, extHandle, infoAccArr, + yesNoAns, oidIdent, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeInfoAccessExtension); + } + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return (rv); +} + +/* Example of valid input: + * 1.2.3.4:critical:/tmp/abc,5.6.7.8:not-critical:/tmp/xyz + */ +static SECStatus +parseNextGenericExt(const char *nextExtension, const char **oid, int *oidLen, + const char **crit, int *critLen, + const char **filename, int *filenameLen, + const char **next) +{ + const char *nextColon; + const char *nextComma; + const char *iter = nextExtension; + + if (!iter || !*iter) + return SECFailure; + + /* Require colons at earlier positions than nextComma (or end of string ) */ + nextComma = strchr(iter, ','); + + *oid = iter; + nextColon = strchr(iter, ':'); + if (!nextColon || (nextComma && nextColon > nextComma)) + return SECFailure; + *oidLen = (nextColon - *oid); + + if (!*oidLen) + return SECFailure; + + iter = nextColon; + ++iter; + + *crit = iter; + nextColon = strchr(iter, ':'); + if (!nextColon || (nextComma && nextColon > nextComma)) + return SECFailure; + *critLen = (nextColon - *crit); + + if (!*critLen) + return SECFailure; + + iter = nextColon; + ++iter; + + *filename = iter; + if (nextComma) { + *filenameLen = (nextComma - *filename); + iter = nextComma; + ++iter; + *next = iter; + } else { + *filenameLen = strlen(*filename); + *next = NULL; + } + + if (!*filenameLen) + return SECFailure; + + return SECSuccess; +} + +SECStatus +AddExtensions(void *extHandle, const char *emailAddrs, const char *dnsNames, + certutilExtnList extList, const char *extGeneric) +{ + PLArenaPool *arena; + SECStatus rv = SECSuccess; + char *errstring = NULL; + const char *nextExtension = NULL; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena == NULL) { + return SECFailure; + } + + do { + /* Add key usage extension */ + if (extList[ext_keyUsage].activated) { + rv = AddKeyUsage(extHandle, extList[ext_keyUsage].arg); + if (rv) { + errstring = "KeyUsage"; + break; + } + } + + /* Add extended key usage extension */ + if (extList[ext_extKeyUsage].activated) { + rv = AddExtKeyUsage(extHandle, extList[ext_extKeyUsage].arg); + if (rv) { + errstring = "ExtendedKeyUsage"; + break; + } + } + + /* Add basic constraint extension */ + if (extList[ext_basicConstraint].activated) { + rv = AddBasicConstraint(arena, extHandle); + if (rv) { + errstring = "BasicConstraint"; + break; + } + } + + /* Add name constraints extension */ + if (extList[ext_nameConstraints].activated) { + rv = AddNameConstraints(extHandle); + if (rv) { + errstring = "NameConstraints"; + break; + } + } + + if (extList[ext_authorityKeyID].activated) { + rv = AddAuthKeyID(extHandle); + if (rv) { + errstring = "AuthorityKeyID"; + break; + } + } + + if (extList[ext_subjectKeyID].activated) { + rv = AddSubjKeyID(extHandle); + if (rv) { + errstring = "SubjectKeyID"; + break; + } + } + + if (extList[ext_CRLDistPts].activated) { + rv = AddCrlDistPoint(extHandle); + if (rv) { + errstring = "CRLDistPoints"; + break; + } + } + + if (extList[ext_NSCertType].activated) { + rv = AddNscpCertType(extHandle, extList[ext_NSCertType].arg); + if (rv) { + errstring = "NSCertType"; + break; + } + } + + if (extList[ext_authInfoAcc].activated || + extList[ext_subjInfoAcc].activated) { + rv = AddInfoAccess(extHandle, extList[ext_subjInfoAcc].activated, + extList[ext_basicConstraint].activated); + if (rv) { + errstring = "InformationAccess"; + break; + } + } + + if (extList[ext_certPolicies].activated) { + rv = AddCertPolicies(extHandle); + if (rv) { + errstring = "Policies"; + break; + } + } + + if (extList[ext_policyMappings].activated) { + rv = AddPolicyMappings(extHandle); + if (rv) { + errstring = "PolicyMappings"; + break; + } + } + + if (extList[ext_policyConstr].activated) { + rv = AddPolicyConstraints(extHandle); + if (rv) { + errstring = "PolicyConstraints"; + break; + } + } + + if (extList[ext_inhibitAnyPolicy].activated) { + rv = AddInhibitAnyPolicy(extHandle); + if (rv) { + errstring = "InhibitAnyPolicy"; + break; + } + } + + if (emailAddrs || dnsNames || extList[ext_subjectAltName].activated) { + CERTGeneralName *namelist = NULL; + SECItem item = { 0, NULL, 0 }; + + rv = SECSuccess; + + if (emailAddrs) { + rv |= AddEmailSubjectAlt(arena, &namelist, emailAddrs); + } + + if (dnsNames) { + rv |= AddDNSSubjectAlt(arena, &namelist, dnsNames); + } + + if (extList[ext_subjectAltName].activated) { + rv |= AddGeneralSubjectAlt(arena, &namelist, + extList[ext_subjectAltName].arg); + } + + if (rv == SECSuccess) { + rv = CERT_EncodeAltNameExtension(arena, namelist, &item); + if (rv == SECSuccess) { + rv = CERT_AddExtension(extHandle, + SEC_OID_X509_SUBJECT_ALT_NAME, + &item, PR_FALSE, PR_TRUE); + } + } + if (rv) { + errstring = "SubjectAltName"; + break; + } + } + } while (0); + + PORT_FreeArena(arena, PR_FALSE); + + if (rv != SECSuccess) { + SECU_PrintError(progName, "Problem creating %s extension", errstring); + } + + nextExtension = extGeneric; + while (nextExtension && *nextExtension) { + SECItem oid_item, value; + PRBool isCritical; + const char *oid, *crit, *filename, *next; + int oidLen, critLen, filenameLen; + PRFileDesc *inFile = NULL; + char *zeroTerminatedFilename = NULL; + + rv = parseNextGenericExt(nextExtension, &oid, &oidLen, &crit, &critLen, + &filename, &filenameLen, &next); + if (rv != SECSuccess) { + SECU_PrintError(progName, + "error parsing generic extension parameter %s", + nextExtension); + break; + } + oid_item.data = NULL; + oid_item.len = 0; + rv = GetOidFromString(NULL, &oid_item, oid, oidLen); + if (rv != SECSuccess) { + SECU_PrintError(progName, "malformed extension OID %s", nextExtension); + break; + } + if (!strncmp("critical", crit, critLen)) { + isCritical = PR_TRUE; + } else if (!strncmp("not-critical", crit, critLen)) { + isCritical = PR_FALSE; + } else { + rv = SECFailure; + SECU_PrintError(progName, "expected 'critical' or 'not-critical'"); + break; + } + zeroTerminatedFilename = PL_strndup(filename, filenameLen); + if (!zeroTerminatedFilename) { + rv = SECFailure; + SECU_PrintError(progName, "out of memory"); + break; + } + rv = SECFailure; + inFile = PR_Open(zeroTerminatedFilename, PR_RDONLY, 0); + if (inFile) { + rv = SECU_ReadDERFromFile(&value, inFile, PR_FALSE, PR_FALSE); + PR_Close(inFile); + inFile = NULL; + } + if (rv != SECSuccess) { + SECU_PrintError(progName, "unable to read file %s", + zeroTerminatedFilename); + } + PL_strfree(zeroTerminatedFilename); + if (rv != SECSuccess) { + break; + } + rv = CERT_AddExtensionByOID(extHandle, &oid_item, &value, isCritical, + PR_TRUE /*copyData*/); + SECITEM_FreeItem(&value, PR_FALSE); + SECITEM_FreeItem(&oid_item, PR_FALSE); + if (rv != SECSuccess) { + SECU_PrintError(progName, "failed to add extension %s", nextExtension); + break; + } + nextExtension = next; + } + + return rv; +} diff --git a/security/nss/cmd/certutil/certutil.c b/security/nss/cmd/certutil/certutil.c new file mode 100644 index 0000000000..07b1ea51bd --- /dev/null +++ b/security/nss/cmd/certutil/certutil.c @@ -0,0 +1,4038 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* +** certutil.c +** +** utility for managing certificates and the cert database +** +*/ +#include +#include +#include + +#if defined(WIN32) +#include "fcntl.h" +#include "io.h" +#endif + +#include "secutil.h" + +#if defined(XP_UNIX) +#include +#endif + +#include "nspr.h" +#include "prtypes.h" +#include "prtime.h" +#include "prlong.h" + +#include "pk11func.h" +#include "secasn1.h" +#include "cert.h" +#include "cryptohi.h" +#include "secoid.h" +#include "certdb.h" +#include "nss.h" +#include "certutil.h" +#include "basicutil.h" +#include "ssl.h" + +#define MIN_KEY_BITS 512 +/* MAX_KEY_BITS should agree with RSA_MAX_MODULUS_BITS in freebl */ +#define MAX_KEY_BITS 8192 +#define DEFAULT_KEY_BITS 2048 + +#define GEN_BREAK(e) \ + rv = e; \ + break; + +char *progName; + +static SECStatus +ChangeCertTrust(CERTCertDBHandle *handle, CERTCertificate *cert, + CERTCertTrust *trust, PK11SlotInfo *slot, void *pwdata) +{ + SECStatus rv; + + rv = CERT_ChangeCertTrust(handle, cert, trust); + if (rv != SECSuccess) { + if (PORT_GetError() == SEC_ERROR_TOKEN_NOT_LOGGED_IN) { + rv = PK11_Authenticate(slot, PR_TRUE, pwdata); + if (PORT_GetError() == SEC_ERROR_TOKEN_NOT_LOGGED_IN) { + PK11SlotInfo *internalslot; + internalslot = PK11_GetInternalKeySlot(); + rv = PK11_Authenticate(internalslot, PR_TRUE, pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, + "could not authenticate to token %s.", + PK11_GetTokenName(internalslot)); + PK11_FreeSlot(internalslot); + return SECFailure; + } + PK11_FreeSlot(internalslot); + } + rv = CERT_ChangeCertTrust(handle, cert, trust); + } + } + return rv; +} + +static CERTCertificateRequest * +GetCertRequest(const SECItem *reqDER, void *pwarg) +{ + CERTCertificateRequest *certReq = NULL; + CERTSignedData signedData; + PLArenaPool *arena = NULL; + SECStatus rv; + + do { + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena == NULL) { + GEN_BREAK(SECFailure); + } + + certReq = (CERTCertificateRequest *)PORT_ArenaZAlloc(arena, sizeof(CERTCertificateRequest)); + if (!certReq) { + GEN_BREAK(SECFailure); + } + certReq->arena = arena; + + /* Since cert request is a signed data, must decode to get the inner + data + */ + PORT_Memset(&signedData, 0, sizeof(signedData)); + rv = SEC_ASN1DecodeItem(arena, &signedData, + SEC_ASN1_GET(CERT_SignedDataTemplate), reqDER); + if (rv) { + break; + } + rv = SEC_ASN1DecodeItem(arena, certReq, + SEC_ASN1_GET(CERT_CertificateRequestTemplate), &signedData.data); + if (rv) { + break; + } + rv = CERT_VerifySignedDataWithPublicKeyInfo(&signedData, + &certReq->subjectPublicKeyInfo, pwarg); + } while (0); + + if (rv) { + SECU_PrintError(progName, "bad certificate request\n"); + if (arena) { + PORT_FreeArena(arena, PR_FALSE); + } + certReq = NULL; + } + + return certReq; +} + +static SECStatus +AddCert(PK11SlotInfo *slot, CERTCertDBHandle *handle, char *name, char *trusts, + const SECItem *certDER, PRBool emailcert, void *pwdata) +{ + CERTCertTrust *trust = NULL; + CERTCertificate *cert = NULL; + SECStatus rv; + + do { + /* Read in an ASCII cert and return a CERTCertificate */ + cert = CERT_DecodeCertFromPackage((char *)certDER->data, certDER->len); + if (!cert) { + SECU_PrintError(progName, "could not decode certificate"); + GEN_BREAK(SECFailure); + } + + /* Create a cert trust */ + trust = (CERTCertTrust *)PORT_ZAlloc(sizeof(CERTCertTrust)); + if (!trust) { + SECU_PrintError(progName, "unable to allocate cert trust"); + GEN_BREAK(SECFailure); + } + + rv = CERT_DecodeTrustString(trust, trusts); + if (rv) { + SECU_PrintError(progName, "unable to decode trust string"); + GEN_BREAK(SECFailure); + } + + rv = PK11_ImportCert(slot, cert, CK_INVALID_HANDLE, name, PR_FALSE); + if (rv != SECSuccess) { + /* sigh, PK11_Import Cert and CERT_ChangeCertTrust should have + * been coded to take a password arg. */ + if (PORT_GetError() == SEC_ERROR_TOKEN_NOT_LOGGED_IN) { + rv = PK11_Authenticate(slot, PR_TRUE, pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, + "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + GEN_BREAK(SECFailure); + } + rv = PK11_ImportCert(slot, cert, CK_INVALID_HANDLE, + name, PR_FALSE); + } + if (rv != SECSuccess) { + SECU_PrintError(progName, + "could not add certificate to token or database"); + GEN_BREAK(SECFailure); + } + } + rv = ChangeCertTrust(handle, cert, trust, slot, pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, + "could not change trust on certificate"); + GEN_BREAK(SECFailure); + } + + if (emailcert) { + CERT_SaveSMimeProfile(cert, NULL, pwdata); + } + + } while (0); + + CERT_DestroyCertificate(cert); + PORT_Free(trust); + + return rv; +} + +static SECStatus +CertReq(SECKEYPrivateKey *privk, SECKEYPublicKey *pubk, KeyType keyType, + SECOidTag hashAlgTag, CERTName *subject, const char *phone, int ascii, + const char *emailAddrs, const char *dnsNames, + certutilExtnList extnList, const char *extGeneric, + PRBool pssCertificate, /*out*/ SECItem *result) +{ + CERTSubjectPublicKeyInfo *spki; + CERTCertificateRequest *cr; + SECItem *encoding; + SECOidTag signAlgTag; + SECStatus rv; + PLArenaPool *arena; + void *extHandle; + SECItem signedReq = { siBuffer, NULL, 0 }; + SECAlgorithmID signAlg; + SECItem *params = NULL; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + SECU_PrintError(progName, "out of memory"); + return SECFailure; + } + + /* Create info about public key */ + spki = SECKEY_CreateSubjectPublicKeyInfo(pubk); + if (!spki) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "unable to create subject public key"); + return SECFailure; + } + + /* Change cert type to RSA-PSS, if desired. */ + if (pssCertificate) { + params = SEC_CreateSignatureAlgorithmParameters(arena, + NULL, + SEC_OID_PKCS1_RSA_PSS_SIGNATURE, + hashAlgTag, + NULL, + privk); + if (!params) { + PORT_FreeArena(arena, PR_FALSE); + SECKEY_DestroySubjectPublicKeyInfo(spki); + SECU_PrintError(progName, "unable to create RSA-PSS parameters"); + return SECFailure; + } + + spki->algorithm.parameters.data = NULL; + rv = SECOID_SetAlgorithmID(arena, &spki->algorithm, + SEC_OID_PKCS1_RSA_PSS_SIGNATURE, + hashAlgTag == SEC_OID_UNKNOWN ? NULL : params); + if (rv != SECSuccess) { + PORT_FreeArena(arena, PR_FALSE); + SECKEY_DestroySubjectPublicKeyInfo(spki); + SECU_PrintError(progName, "unable to set algorithm ID"); + return SECFailure; + } + } + + /* Generate certificate request */ + cr = CERT_CreateCertificateRequest(subject, spki, NULL); + SECKEY_DestroySubjectPublicKeyInfo(spki); + if (!cr) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "unable to make certificate request"); + return SECFailure; + } + + extHandle = CERT_StartCertificateRequestAttributes(cr); + if (extHandle == NULL) { + PORT_FreeArena(arena, PR_FALSE); + CERT_DestroyCertificateRequest(cr); + return SECFailure; + } + if (AddExtensions(extHandle, emailAddrs, dnsNames, extnList, extGeneric) != + SECSuccess) { + PORT_FreeArena(arena, PR_FALSE); + CERT_FinishExtensions(extHandle); + CERT_DestroyCertificateRequest(cr); + return SECFailure; + } + CERT_FinishExtensions(extHandle); + CERT_FinishCertificateRequestAttributes(cr); + + /* Der encode the request */ + encoding = SEC_ASN1EncodeItem(arena, NULL, cr, + SEC_ASN1_GET(CERT_CertificateRequestTemplate)); + CERT_DestroyCertificateRequest(cr); + if (encoding == NULL) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "der encoding of request failed"); + return SECFailure; + } + + PORT_Memset(&signAlg, 0, sizeof(signAlg)); + if (pssCertificate) { + rv = SECOID_SetAlgorithmID(arena, &signAlg, + SEC_OID_PKCS1_RSA_PSS_SIGNATURE, params); + if (rv != SECSuccess) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "unable to set algorithm ID"); + return SECFailure; + } + } else { + signAlgTag = SEC_GetSignatureAlgorithmOidTag(keyType, hashAlgTag); + if (signAlgTag == SEC_OID_UNKNOWN) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "unknown Key or Hash type"); + return SECFailure; + } + rv = SECOID_SetAlgorithmID(arena, &signAlg, signAlgTag, 0); + if (rv != SECSuccess) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "unable to set algorithm ID"); + return SECFailure; + } + } + + /* Sign the request */ + rv = SEC_DerSignDataWithAlgorithmID(arena, &signedReq, + encoding->data, encoding->len, + privk, &signAlg); + if (rv) { + PORT_FreeArena(arena, PR_FALSE); + SECU_PrintError(progName, "signing of data failed"); + return SECFailure; + } + + /* Encode request in specified format */ + if (ascii) { + char *obuf; + char *header, *name, *email, *org, *state, *country; + + obuf = BTOA_ConvertItemToAscii(&signedReq); + if (!obuf) { + goto oom; + } + + name = CERT_GetCommonName(subject); + if (!name) { + name = PORT_Strdup("(not specified)"); + } + + if (!phone) + phone = "(not specified)"; + + email = CERT_GetCertEmailAddress(subject); + if (!email) + email = PORT_Strdup("(not specified)"); + + org = CERT_GetOrgName(subject); + if (!org) + org = PORT_Strdup("(not specified)"); + + state = CERT_GetStateName(subject); + if (!state) + state = PORT_Strdup("(not specified)"); + + country = CERT_GetCountryName(subject); + if (!country) + country = PORT_Strdup("(not specified)"); + + header = PR_smprintf( + "\nCertificate request generated by Netscape certutil\n" + "Phone: %s\n\n" + "Common Name: %s\n" + "Email: %s\n" + "Organization: %s\n" + "State: %s\n" + "Country: %s\n\n" + "%s\n", + phone, name, email, org, state, country, NS_CERTREQ_HEADER); + + PORT_Free(name); + PORT_Free(email); + PORT_Free(org); + PORT_Free(state); + PORT_Free(country); + + if (header) { + char *trailer = PR_smprintf("\n%s\n", NS_CERTREQ_TRAILER); + if (trailer) { + PRUint32 headerLen = PL_strlen(header); + PRUint32 obufLen = PL_strlen(obuf); + PRUint32 trailerLen = PL_strlen(trailer); + SECITEM_AllocItem(NULL, result, + headerLen + obufLen + trailerLen); + if (result->data) { + PORT_Memcpy(result->data, header, headerLen); + PORT_Memcpy(result->data + headerLen, obuf, obufLen); + PORT_Memcpy(result->data + headerLen + obufLen, + trailer, trailerLen); + } + PR_smprintf_free(trailer); + } + PR_smprintf_free(header); + } + PORT_Free(obuf); + } else { + (void)SECITEM_CopyItem(NULL, result, &signedReq); + } + + if (!result->data) { + oom: + SECU_PrintError(progName, "out of memory"); + PORT_SetError(SEC_ERROR_NO_MEMORY); + rv = SECFailure; + } + + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +static SECStatus +ChangeTrustAttributes(CERTCertDBHandle *handle, PK11SlotInfo *slot, + char *name, char *trusts, void *pwdata) +{ + SECStatus rv; + CERTCertificate *cert; + CERTCertTrust *trust; + + cert = CERT_FindCertByNicknameOrEmailAddrCX(handle, name, pwdata); + if (!cert) { + SECU_PrintError(progName, "could not find certificate named \"%s\"", + name); + return SECFailure; + } + + trust = (CERTCertTrust *)PORT_ZAlloc(sizeof(CERTCertTrust)); + if (!trust) { + SECU_PrintError(progName, "unable to allocate cert trust"); + return SECFailure; + } + + /* This function only decodes these characters: pPwcTCu, */ + rv = CERT_DecodeTrustString(trust, trusts); + if (rv) { + SECU_PrintError(progName, "unable to decode trust string"); + return SECFailure; + } + + /* CERT_ChangeCertTrust API does not have a way to pass in + * a context, so NSS can't prompt for the password if it needs to. + * check to see if the failure was token not logged in and + * log in if need be. */ + rv = ChangeCertTrust(handle, cert, trust, slot, pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, "unable to modify trust attributes"); + return SECFailure; + } + CERT_DestroyCertificate(cert); + PORT_Free(trust); + + return SECSuccess; +} + +static SECStatus +DumpChain(CERTCertDBHandle *handle, char *name, PRBool ascii, + PRBool simpleSelfSigned) +{ + CERTCertificate *the_cert; + CERTCertificateList *chain; + int i, j; + the_cert = SECU_FindCertByNicknameOrFilename(handle, name, + ascii, NULL); + if (!the_cert) { + SECU_PrintError(progName, "Could not find: %s\n", name); + return SECFailure; + } + if (simpleSelfSigned && + SECEqual == SECITEM_CompareItem(&the_cert->derIssuer, + &the_cert->derSubject)) { + printf("\"%s\" [%s]\n\n", the_cert->nickname, the_cert->subjectName); + CERT_DestroyCertificate(the_cert); + return SECSuccess; + } + + chain = CERT_CertChainFromCert(the_cert, 0, PR_TRUE); + CERT_DestroyCertificate(the_cert); + if (!chain) { + SECU_PrintError(progName, "Could not obtain chain for: %s\n", name); + return SECFailure; + } + for (i = chain->len - 1; i >= 0; i--) { + CERTCertificate *c; + c = CERT_FindCertByDERCert(handle, &chain->certs[i]); + for (j = i; j < chain->len - 1; j++) { + printf(" "); + } + if (c) { + printf("\"%s\" [%s]\n\n", c->nickname, c->subjectName); + CERT_DestroyCertificate(c); + } else { + printf("(null)\n\n"); + } + } + CERT_DestroyCertificateList(chain); + return SECSuccess; +} + +static SECStatus +outputCertOrExtension(CERTCertificate *the_cert, PRBool raw, PRBool ascii, + SECItem *extensionOID, PRFileDesc *outfile) +{ + SECItem data; + PRInt32 numBytes; + SECStatus rv = SECFailure; + if (extensionOID) { + int i; + PRBool found = PR_FALSE; + for (i = 0; the_cert->extensions[i] != NULL; i++) { + CERTCertExtension *extension = the_cert->extensions[i]; + if (SECITEM_CompareItem(&extension->id, extensionOID) == SECEqual) { + found = PR_TRUE; + numBytes = PR_Write(outfile, extension->value.data, + extension->value.len); + rv = SECSuccess; + if (numBytes != (PRInt32)extension->value.len) { + SECU_PrintSystemError(progName, "error writing extension"); + rv = SECFailure; + } + break; + } + } + if (!found) { + SECU_PrintSystemError(progName, "extension not found"); + rv = SECFailure; + } + } else { + data.data = the_cert->derCert.data; + data.len = the_cert->derCert.len; + if (ascii) { + PR_fprintf(outfile, "%s\n%s\n%s\n", NS_CERT_HEADER, + BTOA_DataToAscii(data.data, data.len), NS_CERT_TRAILER); + rv = SECSuccess; + } else if (raw) { + numBytes = PR_Write(outfile, data.data, data.len); + rv = SECSuccess; + if (numBytes != (PRInt32)data.len) { + SECU_PrintSystemError(progName, "error writing raw cert"); + rv = SECFailure; + } + } else { + rv = SEC_PrintCertificateAndTrust(the_cert, "Certificate", NULL); + if (rv != SECSuccess) { + SECU_PrintError(progName, "problem printing certificate"); + } + } + } + return rv; +} + +static SECStatus +listCerts(CERTCertDBHandle *handle, char *name, char *email, + PK11SlotInfo *slot, PRBool raw, PRBool ascii, + SECItem *extensionOID, + PRFileDesc *outfile, void *pwarg) +{ + SECStatus rv = SECFailure; + CERTCertList *certs; + CERTCertListNode *node; + + /* List certs on a non-internal slot. */ + if (!PK11_IsFriendly(slot) && PK11_NeedLogin(slot)) { + SECStatus newrv = PK11_Authenticate(slot, PR_TRUE, pwarg); + if (newrv != SECSuccess) { + SECU_PrintError(progName, "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + return SECFailure; + } + } + if (name) { + CERTCertificate *the_cert = + SECU_FindCertByNicknameOrFilename(handle, name, ascii, NULL); + if (!the_cert) { + SECU_PrintError(progName, "Could not find cert: %s\n", name); + return SECFailure; + } + /* Here, we have one cert with the desired nickname or email + * address. Now, we will attempt to get a list of ALL certs + * with the same subject name as the cert we have. That list + * should contain, at a minimum, the one cert we have already found. + * If the list of certs is empty (NULL), the libraries have failed. + */ + certs = CERT_CreateSubjectCertList(NULL, handle, &the_cert->derSubject, + PR_Now(), PR_FALSE); + CERT_DestroyCertificate(the_cert); + if (!certs) { + PORT_SetError(SEC_ERROR_LIBRARY_FAILURE); + SECU_PrintError(progName, "problem printing certificates"); + return SECFailure; + } + for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node, certs); + node = CERT_LIST_NEXT(node)) { + rv = outputCertOrExtension(node->cert, raw, ascii, extensionOID, + outfile); + if (rv != SECSuccess) { + break; + } + } + } else if (email) { + certs = PK11_FindCertsFromEmailAddress(email, NULL); + if (!certs) { + SECU_PrintError(progName, + "Could not find certificates for email address: %s\n", + email); + return SECFailure; + } + for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node, certs); + node = CERT_LIST_NEXT(node)) { + rv = outputCertOrExtension(node->cert, raw, ascii, extensionOID, + outfile); + if (rv != SECSuccess) { + break; + } + } + } else { + certs = PK11_ListCertsInSlot(slot); + if (certs) { + for (node = CERT_LIST_HEAD(certs); !CERT_LIST_END(node, certs); + node = CERT_LIST_NEXT(node)) { + SECU_PrintCertNickname(node, stdout); + } + rv = SECSuccess; + } + } + if (certs) { + CERT_DestroyCertList(certs); + } + if (rv) { + SECU_PrintError(progName, "problem printing certificate nicknames"); + return SECFailure; + } + + return SECSuccess; /* not rv ?? */ +} + +static SECStatus +ListCerts(CERTCertDBHandle *handle, char *nickname, char *email, + PK11SlotInfo *slot, PRBool raw, PRBool ascii, + SECItem *extensionOID, + PRFileDesc *outfile, secuPWData *pwdata) +{ + SECStatus rv; + + if (slot && PK11_NeedUserInit(slot)) { + printf("\nDatabase needs user init\n"); + } + + if (!ascii && !raw && !nickname && !email) { + PR_fprintf(outfile, "\n%-60s %-5s\n%-60s %-5s\n\n", + "Certificate Nickname", "Trust Attributes", "", + "SSL,S/MIME,JAR/XPI"); + } + if (slot == NULL) { + CERTCertList *list; + CERTCertListNode *node; + + list = PK11_ListCerts(PK11CertListAll, pwdata); + for (node = CERT_LIST_HEAD(list); !CERT_LIST_END(node, list); + node = CERT_LIST_NEXT(node)) { + SECU_PrintCertNickname(node, stdout); + } + CERT_DestroyCertList(list); + return SECSuccess; + } + rv = listCerts(handle, nickname, email, slot, raw, ascii, + extensionOID, outfile, pwdata); + return rv; +} + +static SECStatus +DeleteCert(CERTCertDBHandle *handle, char *name, void *pwdata) +{ + SECStatus rv; + CERTCertificate *cert; + + cert = CERT_FindCertByNicknameOrEmailAddrCX(handle, name, pwdata); + if (!cert) { + SECU_PrintError(progName, "could not find certificate named \"%s\"", + name); + return SECFailure; + } + + rv = SEC_DeletePermCertificate(cert); + CERT_DestroyCertificate(cert); + if (rv) { + SECU_PrintError(progName, "unable to delete certificate"); + } + return rv; +} + +static SECStatus +RenameCert(CERTCertDBHandle *handle, char *name, char *newName, void *pwdata) +{ + SECStatus rv; + CERTCertificate *cert; + + cert = CERT_FindCertByNicknameOrEmailAddrCX(handle, name, pwdata); + if (!cert) { + SECU_PrintError(progName, "could not find certificate named \"%s\"", + name); + return SECFailure; + } + + rv = __PK11_SetCertificateNickname(cert, newName); + CERT_DestroyCertificate(cert); + if (rv) { + SECU_PrintError(progName, "unable to rename certificate"); + } + return rv; +} + +static SECStatus +ValidateCert(CERTCertDBHandle *handle, char *name, char *date, + char *certUsage, PRBool checkSig, PRBool logit, + PRBool ascii, secuPWData *pwdata) +{ + SECStatus rv; + CERTCertificate *cert = NULL; + PRTime timeBoundary; + SECCertificateUsage usage; + CERTVerifyLog reallog; + CERTVerifyLog *log = NULL; + + if (!certUsage) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return (SECFailure); + } + + switch (*certUsage) { + case 'O': + usage = certificateUsageStatusResponder; + break; + case 'L': + usage = certificateUsageSSLCA; + break; + case 'A': + usage = certificateUsageAnyCA; + break; + case 'Y': + usage = certificateUsageVerifyCA; + break; + case 'C': + usage = certificateUsageSSLClient; + break; + case 'V': + usage = certificateUsageSSLServer; + break; + case 'I': + usage = certificateUsageIPsec; + break; + case 'S': + usage = certificateUsageEmailSigner; + break; + case 'R': + usage = certificateUsageEmailRecipient; + break; + case 'J': + usage = certificateUsageObjectSigner; + break; + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return (SECFailure); + } + do { + cert = SECU_FindCertByNicknameOrFilename(handle, name, ascii, + NULL); + if (!cert) { + SECU_PrintError(progName, "could not find certificate named \"%s\"", + name); + GEN_BREAK(SECFailure) + } + + if (date != NULL) { + rv = DER_AsciiToTime(&timeBoundary, date); + if (rv) { + SECU_PrintError(progName, "invalid input date"); + GEN_BREAK(SECFailure) + } + } else { + timeBoundary = PR_Now(); + } + + if (logit) { + log = &reallog; + + log->count = 0; + log->head = NULL; + log->tail = NULL; + log->arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (log->arena == NULL) { + SECU_PrintError(progName, "out of memory"); + GEN_BREAK(SECFailure) + } + } + + rv = CERT_VerifyCertificate(handle, cert, checkSig, usage, + timeBoundary, pwdata, log, &usage); + if (log) { + if (log->head == NULL) { + fprintf(stdout, "%s: certificate is valid\n", progName); + GEN_BREAK(SECSuccess) + } else { + char *nick; + CERTVerifyLogNode *node; + + node = log->head; + while (node) { + if (node->cert->nickname != NULL) { + nick = node->cert->nickname; + } else { + nick = node->cert->subjectName; + } + fprintf(stderr, "%s : %s\n", nick, + SECU_Strerror(node->error)); + CERT_DestroyCertificate(node->cert); + node = node->next; + } + } + } else { + if (rv != SECSuccess) { + PRErrorCode perr = PORT_GetError(); + fprintf(stdout, "%s: certificate is invalid: %s\n", + progName, SECU_Strerror(perr)); + GEN_BREAK(SECFailure) + } + fprintf(stdout, "%s: certificate is valid\n", progName); + GEN_BREAK(SECSuccess) + } + } while (0); + + if (cert) { + CERT_DestroyCertificate(cert); + } + + return (rv); +} + +static PRBool +ItemIsPrintableASCII(const SECItem *item) +{ + unsigned char *src = item->data; + unsigned int len = item->len; + while (len-- > 0) { + unsigned char uc = *src++; + if (uc < 0x20 || uc > 0x7e) + return PR_FALSE; + } + return PR_TRUE; +} + +/* Caller ensures that dst is at least item->len*2+1 bytes long */ +static void +SECItemToHex(const SECItem *item, char *dst) +{ + if (dst && item && item->data) { + unsigned char *src = item->data; + unsigned int len = item->len; + for (; len > 0; --len, dst += 2) { + snprintf(dst, 3, "%02x", *src++); + } + *dst = '\0'; + } +} + +static const char *const keyTypeName[] = { + "null", "rsa", "dsa", "fortezza", "dh", "kea", "ec", "rsaPss", "rsaOaep" +}; + +#define MAX_CKA_ID_BIN_LEN 20 +#define MAX_CKA_ID_STR_LEN 40 + +/* output human readable key ID in buffer, which should have at least + * MAX_CKA_ID_STR_LEN + 3 octets (quotations and a null terminator) */ +static void +formatPrivateKeyID(SECKEYPrivateKey *privkey, char *buffer) +{ + SECItem *ckaID; + + ckaID = PK11_GetLowLevelKeyIDForPrivateKey(privkey); + if (!ckaID) { + strcpy(buffer, "(no CKA_ID)"); + } else if (ItemIsPrintableASCII(ckaID)) { + int len = PR_MIN(MAX_CKA_ID_STR_LEN, ckaID->len); + buffer[0] = '"'; + memcpy(buffer + 1, ckaID->data, len); + buffer[1 + len] = '"'; + buffer[2 + len] = '\0'; + } else { + /* print ckaid in hex */ + SECItem idItem = *ckaID; + if (idItem.len > MAX_CKA_ID_BIN_LEN) + idItem.len = MAX_CKA_ID_BIN_LEN; + SECItemToHex(&idItem, buffer); + } + SECITEM_ZfreeItem(ckaID, PR_TRUE); +} + +/* print key number, key ID (in hex or ASCII), key label (nickname) */ +static SECStatus +PrintKey(PRFileDesc *out, const char *nickName, int count, + SECKEYPrivateKey *key, void *pwarg) +{ + char ckaIDbuf[MAX_CKA_ID_STR_LEN + 4]; + CERTCertificate *cert; + KeyType keyType; + + formatPrivateKeyID(key, ckaIDbuf); + cert = PK11_GetCertFromPrivateKey(key); + if (cert) { + keyType = CERT_GetCertKeyType(&cert->subjectPublicKeyInfo); + CERT_DestroyCertificate(cert); + } else { + keyType = key->keyType; + } + PR_fprintf(out, "<%2d> %-8.8s %-42.42s %s\n", count, + keyTypeName[keyType], ckaIDbuf, nickName); + + return SECSuccess; +} + +/* returns SECSuccess if ANY keys are found, SECFailure otherwise. */ +static SECStatus +ListKeysInSlot(PK11SlotInfo *slot, const char *nickName, KeyType keyType, + void *pwarg) +{ + SECKEYPrivateKeyList *list; + SECKEYPrivateKeyListNode *node; + int count = 0; + + if (PK11_NeedLogin(slot)) { + SECStatus rv = PK11_Authenticate(slot, PR_TRUE, pwarg); + if (rv != SECSuccess) { + SECU_PrintError(progName, "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + return SECFailure; + } + } + + if (nickName && nickName[0]) + list = PK11_ListPrivKeysInSlot(slot, (char *)nickName, pwarg); + else + list = PK11_ListPrivateKeysInSlot(slot); + if (list == NULL) { + SECU_PrintError(progName, "problem listing keys"); + return SECFailure; + } + for (node = PRIVKEY_LIST_HEAD(list); + !PRIVKEY_LIST_END(node, list); + node = PRIVKEY_LIST_NEXT(node)) { + char *keyName; + static const char orphan[] = { "(orphan)" }; + + if (keyType != nullKey && keyType != node->key->keyType) + continue; + keyName = PK11_GetPrivateKeyNickname(node->key); + if (!keyName || !keyName[0]) { + /* Try extra hard to find nicknames for keys that lack them. */ + CERTCertificate *cert; + PORT_Free((void *)keyName); + keyName = NULL; + cert = PK11_GetCertFromPrivateKey(node->key); + if (cert) { + if (cert->nickname && cert->nickname[0]) { + keyName = PORT_Strdup(cert->nickname); + } else if (cert->emailAddr && cert->emailAddr[0]) { + keyName = PORT_Strdup(cert->emailAddr); + } + CERT_DestroyCertificate(cert); + } + } + if (nickName) { + if (!keyName || PL_strcmp(keyName, nickName)) { + /* PKCS#11 module returned unwanted keys */ + PORT_Free((void *)keyName); + continue; + } + } + if (!keyName) + keyName = (char *)orphan; + + PrintKey(PR_STDOUT, keyName, count, node->key, pwarg); + + if (keyName != (char *)orphan) + PORT_Free((void *)keyName); + count++; + } + SECKEY_DestroyPrivateKeyList(list); + + if (count == 0) { + PR_fprintf(PR_STDOUT, "%s: no keys found\n", progName); + return SECFailure; + } + return SECSuccess; +} + +/* returns SECSuccess if ANY keys are found, SECFailure otherwise. */ +static SECStatus +ListKeys(PK11SlotInfo *slot, const char *nickName, int index, + KeyType keyType, PRBool dopriv, secuPWData *pwdata) +{ + SECStatus rv = SECFailure; + static const char fmt[] = + "%s: Checking token \"%.33s\" in slot \"%.65s\"\n"; + + if (slot == NULL) { + PK11SlotList *list; + PK11SlotListElement *le; + + list = PK11_GetAllTokens(CKM_INVALID_MECHANISM, PR_FALSE, PR_FALSE, pwdata); + if (list) { + for (le = list->head; le; le = le->next) { + PR_fprintf(PR_STDOUT, fmt, progName, + PK11_GetTokenName(le->slot), + PK11_GetSlotName(le->slot)); + rv &= ListKeysInSlot(le->slot, nickName, keyType, pwdata); + } + PK11_FreeSlotList(list); + } + } else { + PR_fprintf(PR_STDOUT, fmt, progName, PK11_GetTokenName(slot), + PK11_GetSlotName(slot)); + rv = ListKeysInSlot(slot, nickName, keyType, pwdata); + } + return rv; +} + +static SECStatus +DeleteCertAndKey(char *nickname, secuPWData *pwdata) +{ + SECStatus rv; + CERTCertificate *cert; + PK11SlotInfo *slot; + + slot = PK11_GetInternalKeySlot(); + if (PK11_NeedLogin(slot)) { + rv = PK11_Authenticate(slot, PR_TRUE, pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + return SECFailure; + } + } + cert = PK11_FindCertFromNickname(nickname, pwdata); + if (!cert) { + PK11_FreeSlot(slot); + return SECFailure; + } + rv = PK11_DeleteTokenCertAndKey(cert, pwdata); + if (rv != SECSuccess) { + SECU_PrintError("problem deleting private key \"%s\"\n", nickname); + } + CERT_DestroyCertificate(cert); + PK11_FreeSlot(slot); + return rv; +} + +static SECKEYPrivateKey * +findPrivateKeyByID(PK11SlotInfo *slot, const char *ckaID, secuPWData *pwarg) +{ + PORTCheapArenaPool arena; + SECItem ckaIDItem = { 0 }; + SECKEYPrivateKey *privkey = NULL; + SECStatus rv; + + if (PK11_NeedLogin(slot)) { + rv = PK11_Authenticate(slot, PR_TRUE, pwarg); + if (rv != SECSuccess) { + SECU_PrintError(progName, "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + return NULL; + } + } + + if (0 == PL_strncasecmp("0x", ckaID, 2)) { + ckaID += 2; /* skip leading "0x" */ + } + PORT_InitCheapArena(&arena, DER_DEFAULT_CHUNKSIZE); + if (SECU_HexString2SECItem(&arena.arena, &ckaIDItem, ckaID)) { + privkey = PK11_FindKeyByKeyID(slot, &ckaIDItem, pwarg); + } + PORT_DestroyCheapArena(&arena); + return privkey; +} + +static SECStatus +DeleteKey(SECKEYPrivateKey *privkey, secuPWData *pwarg) +{ + SECStatus rv; + PK11SlotInfo *slot; + + slot = PK11_GetSlotFromPrivateKey(privkey); + if (PK11_NeedLogin(slot)) { + rv = PK11_Authenticate(slot, PR_TRUE, pwarg); + if (rv != SECSuccess) { + SECU_PrintError(progName, "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + return SECFailure; + } + } + + rv = PK11_DeleteTokenPrivateKey(privkey, PR_TRUE); + if (rv != SECSuccess) { + char ckaIDbuf[MAX_CKA_ID_STR_LEN + 4]; + formatPrivateKeyID(privkey, ckaIDbuf); + SECU_PrintError("problem deleting private key \"%s\"\n", ckaIDbuf); + } + + PK11_FreeSlot(slot); + return rv; +} + +/* + * L i s t M o d u l e s + * + * Print a list of the PKCS11 modules that are + * available. This is useful for smartcard people to + * make sure they have the drivers loaded. + * + */ +static SECStatus +ListModules(void) +{ + PK11SlotList *list; + PK11SlotListElement *le; + + /* get them all! */ + list = PK11_GetAllTokens(CKM_INVALID_MECHANISM, PR_FALSE, PR_FALSE, NULL); + if (list == NULL) + return SECFailure; + + /* look at each slot*/ + for (le = list->head; le; le = le->next) { + char *token_uri = PK11_GetTokenURI(le->slot); + printf("\n"); + printf(" slot: %s\n", PK11_GetSlotName(le->slot)); + printf(" token: %s\n", PK11_GetTokenName(le->slot)); + printf(" uri: %s\n", token_uri); + PORT_Free(token_uri); + } + PK11_FreeSlotList(list); + + return SECSuccess; +} + +static void +PrintBuildFlags() +{ +#ifdef NSS_FIPS_DISABLED + PR_fprintf(PR_STDOUT, "NSS_FIPS_DISABLED\n"); +#endif +#ifdef NSS_NO_INIT_SUPPORT + PR_fprintf(PR_STDOUT, "NSS_NO_INIT_SUPPORT\n"); +#endif + exit(0); +} + +static void +PrintSyntax() +{ +#define FPS fprintf(stderr, + FPS "Type %s -H for more detailed descriptions\n", progName); + FPS "Usage: %s -N [-d certdir] [-P dbprefix] [-f pwfile] [--empty-password]\n", progName); + FPS "Usage: %s -T [-d certdir] [-P dbprefix] [-h token-name]\n" + "\t\t [-f pwfile] [-0 SSO-password]\n", progName); + FPS "\t%s -A -n cert-name -t trustargs [-d certdir] [-P dbprefix] [-a] [-i input]\n", + progName); + FPS "\t%s -B -i batch-file\n", progName); + FPS "\t%s -C [-c issuer-name | -x] -i cert-request-file -o cert-file\n" + "\t\t [-m serial-number] [-w warp-months] [-v months-valid]\n" + "\t\t [-f pwfile] [-d certdir] [-P dbprefix] [-Z hashAlg]\n" + "\t\t [-1 | --keyUsage [keyUsageKeyword,..]] [-2] [-3] [-4]\n" + "\t\t [-5 | --nsCertType [nsCertTypeKeyword,...]]\n" + "\t\t [-6 | --extKeyUsage [extKeyUsageKeyword,...]] [-7 emailAddrs]\n" + "\t\t [-8 dns-names] [-a]\n", + progName); + FPS "\t%s -D -n cert-name [-d certdir] [-P dbprefix]\n", progName); + FPS "\t%s --rename -n cert-name --new-n new-cert-name\n" + "\t\t [-d certdir] [-P dbprefix]\n", progName); + FPS "\t%s -E -n cert-name -t trustargs [-d certdir] [-P dbprefix] [-a] [-i input]\n", + progName); + FPS "\t%s -F -n cert-name [-d certdir] [-P dbprefix]\n", + progName); + FPS "\t%s -F -k key-id [-d certdir] [-P dbprefix]\n", + progName); + FPS "\t%s -G -n key-name [-h token-name] [-k rsa] [-g key-size] [-y exp]\n" + "\t\t [-f pwfile] [-z noisefile] [-d certdir] [-P dbprefix]\n", progName); + FPS "\t%s -G [-h token-name] -k dsa [-q pqgfile -g key-size] [-f pwfile]\n" + "\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName); + FPS "\t%s -G [-h token-name] -k ec -q curve [-f pwfile]\n" + "\t\t [-z noisefile] [-d certdir] [-P dbprefix]\n", progName); + FPS "\t%s -K [-n key-name] [-h token-name] [-k dsa|ec|rsa|all]\n", + progName); + FPS "\t\t [-f pwfile] [-X] [-d certdir] [-P dbprefix]\n"); + FPS "\t%s --upgrade-merge --source-dir upgradeDir --upgrade-id uniqueID\n", + progName); + FPS "\t\t [--upgrade-token-name tokenName] [-d targetDBDir]\n"); + FPS "\t\t [-P targetDBPrefix] [--source-prefix upgradeDBPrefix]\n"); + FPS "\t\t [-f targetPWfile] [-@ upgradePWFile]\n"); + FPS "\t%s --merge --source-dir sourceDBDir [-d targetDBdir]\n", + progName); + FPS "\t\t [-P targetDBPrefix] [--source-prefix sourceDBPrefix]\n"); + FPS "\t\t [-f targetPWfile] [-@ sourcePWFile]\n"); + FPS "\t%s -L [-n cert-name] [-h token-name] [--email email-address]\n", + progName); + FPS "\t\t [-X] [-r] [-a] [--dump-ext-val OID] [-d certdir] [-P dbprefix]\n"); + FPS "\t%s --build-flags\n", progName); + FPS "\t%s -M -n cert-name -t trustargs [-d certdir] [-P dbprefix]\n", + progName); + FPS "\t%s -O -n cert-name [-X] [-d certdir] [-a] [-P dbprefix]\n" + "\t\t [--simple-self-signed]\n", + progName); + FPS "\t%s -R -s subj -o cert-request-file [-d certdir] [-P dbprefix] [-p phone] [-a]\n" + "\t\t [-7 emailAddrs] [-k key-type-or-id] [-h token-name] [-f pwfile]\n" + "\t\t [-g key-size] [-Z hashAlg]\n", + progName); + FPS "\t%s -V -n cert-name -u usage [-b time] [-e] [-a]\n" + "\t\t[-X] [-d certdir] [-P dbprefix]\n", + progName); + FPS "Usage: %s -W [-d certdir] [-f pwfile] [-@newpwfile]\n", + progName); + FPS "\t%s -S -n cert-name -s subj [-c issuer-name | -x] -t trustargs\n" + "\t\t [-k key-type-or-id] [-q key-params] [-h token-name] [-g key-size]\n" + "\t\t [-m serial-number] [-w warp-months] [-v months-valid]\n" + "\t\t [-f pwfile] [-d certdir] [-P dbprefix] [-Z hashAlg]\n" + "\t\t [-p phone] [-1] [-2] [-3] [-4] [-5] [-6] [-7 emailAddrs]\n" + "\t\t [-8 DNS-names]\n" + "\t\t [--extAIA] [--extSIA] [--extCP] [--extPM] [--extPC] [--extIA]\n" + "\t\t [--extSKID] [--extNC] [--extSAN type:name[,type:name]...]\n" + "\t\t [--extGeneric OID:critical-flag:filename[,OID:critical-flag:filename]...]\n", progName); + FPS "\t%s -U [-X] [-d certdir] [-P dbprefix]\n", progName); + exit(1); +} + +enum usage_level { + usage_all = 0, + usage_selected = 1 +}; + +static void luCommonDetailsAE(); + +static void +luA(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "A")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Add a certificate to the database (create if needed)\n", + "-A"); + if (ul == usage_selected && !is_my_command) + return; + if (ul == usage_all) { + FPS "%-20s\n", " All options under -E apply"); + } else { + luCommonDetailsAE(); + } +} + +static void +luB(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "B")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Run a series of certutil commands from a batch file\n", "-B"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Specify the batch file\n", " -i batch-file"); +} + +static void +luE(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "E")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Add an Email certificate to the database (create if needed)\n", + "-E"); + if (ul == usage_selected && !is_my_command) + return; + luCommonDetailsAE(); +} + +static void +luCommonDetailsAE() +{ + FPS "%-20s Specify the nickname of the certificate to add\n", + " -n cert-name"); + FPS "%-20s Set the certificate trust attributes:\n", + " -t trustargs"); + FPS "%-25s trustargs is of the form x,y,z where x is for SSL, y is for S/MIME,\n", ""); + FPS "%-25s and z is for code signing. Use ,, for no explicit trust.\n", ""); + FPS "%-25s p \t prohibited (explicitly distrusted)\n", ""); + FPS "%-25s P \t trusted peer\n", ""); + FPS "%-25s c \t valid CA\n", ""); + FPS "%-25s T \t trusted CA to issue client certs (implies c)\n", ""); + FPS "%-25s C \t trusted CA to issue server certs (implies c)\n", ""); + FPS "%-25s u \t user cert\n", ""); + FPS "%-25s w \t send warning\n", ""); + FPS "%-25s g \t make step-up cert\n", ""); + FPS "%-20s Specify the password file\n", + " -f pwfile"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s The input certificate is encoded in ASCII (RFC1113)\n", + " -a"); + FPS "%-20s Specify the certificate file (default is stdin)\n", + " -i input"); + FPS "\n"); +} + +static void +luC(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "C")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Create a new binary certificate from a BINARY cert request\n", + "-C"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The nickname of the issuer cert\n", + " -c issuer-name"); + FPS "%-20s The BINARY certificate request file\n", + " -i cert-request "); + FPS "%-20s Output binary cert to this file (default is stdout)\n", + " -o output-cert"); + FPS "%-20s Self sign\n", + " -x"); + FPS "%-20s Sign the certificate with RSA-PSS (the issuer key must be rsa)\n", + " --pss-sign"); + FPS "%-20s Cert serial number\n", + " -m serial-number"); + FPS "%-20s Time Warp\n", + " -w warp-months"); + FPS "%-20s Months valid (default is 3)\n", + " -v months-valid"); + FPS "%-20s Specify the password file\n", + " -f pwfile"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s \n" + "%-20s Specify the hash algorithm to use. Possible keywords:\n" + "%-20s \"MD2\", \"MD4\", \"MD5\", \"SHA1\", \"SHA224\",\n" + "%-20s \"SHA256\", \"SHA384\", \"SHA512\"\n", + " -Z hashAlg", "", "", ""); + FPS "%-20s \n" + "%-20s Create key usage extension. Possible keywords:\n" + "%-20s \"digitalSignature\", \"nonRepudiation\", \"keyEncipherment\",\n" + "%-20s \"dataEncipherment\", \"keyAgreement\", \"certSigning\",\n" + "%-20s \"crlSigning\", \"critical\"\n", + " -1 | --keyUsage keyword,keyword,...", "", "", "", ""); + FPS "%-20s Create basic constraint extension\n", + " -2 "); + FPS "%-20s Create authority key ID extension\n", + " -3 "); + FPS "%-20s Create crl distribution point extension\n", + " -4 "); + FPS "%-20s \n" + "%-20s Create netscape cert type extension. Possible keywords:\n" + "%-20s \"sslClient\", \"sslServer\", \"smime\", \"objectSigning\",\n" + "%-20s \"sslCA\", \"smimeCA\", \"objectSigningCA\", \"critical\".\n", + " -5 | --nsCertType keyword,keyword,... ", "", "", ""); + FPS "%-20s \n" + "%-20s Create extended key usage extension. Possible keywords:\n" + "%-20s \"serverAuth\", \"clientAuth\",\"codeSigning\",\n" + "%-20s \"emailProtection\", \"timeStamp\",\"ocspResponder\",\n" + "%-20s \"stepUp\", \"msTrustListSign\", \"x509Any\",\n" + "%-20s \"ipsecIKE\", \"ipsecIKEEnd\", \"ipsecIKEIntermediate\",\n" + "%-20s \"ipsecEnd\", \"ipsecTunnel\", \"ipsecUser\",\n" + "%-20s \"critical\"\n", + " -6 | --extKeyUsage keyword,keyword,...", "", "", "", "", "", "", ""); + FPS "%-20s Create an email subject alt name extension\n", + " -7 emailAddrs"); + FPS "%-20s Create an dns subject alt name extension\n", + " -8 dnsNames"); + FPS "%-20s The input certificate request is encoded in ASCII (RFC1113)\n", + " -a"); + FPS "\n"); +} + +static void +luG(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "G")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Generate a new key pair\n", + "-G"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Name of token in which to generate key (default is internal)\n", + " -h token-name"); + FPS "%-20s Type of key pair to generate (\"dsa\", \"ec\", \"rsa\" (default))\n", + " -k key-type"); + FPS "%-20s Key size in bits, (min %d, max %d, default %d) (not for ec)\n", + " -g key-size", MIN_KEY_BITS, MAX_KEY_BITS, DEFAULT_KEY_BITS); + FPS "%-20s Set the public exponent value (3, 17, 65537) (rsa only)\n", + " -y exp"); + FPS "%-20s Specify the password file\n", + " -f password-file"); + FPS "%-20s Specify the noise file to be used\n", + " -z noisefile"); + FPS "%-20s read PQG value from pqgfile (dsa only)\n", + " -q pqgfile"); + FPS "%-20s Elliptic curve name (ec only)\n", + " -q curve-name"); + FPS "%-20s One of nistp256, nistp384, nistp521, curve25519.\n", ""); + FPS "%-20s If a custom token is present, the following curves are also supported:\n", ""); + FPS "%-20s sect163k1, nistk163, sect163r1, sect163r2,\n", ""); + FPS "%-20s nistb163, sect193r1, sect193r2, sect233k1, nistk233,\n", ""); + FPS "%-20s sect233r1, nistb233, sect239k1, sect283k1, nistk283,\n", ""); + FPS "%-20s sect283r1, nistb283, sect409k1, nistk409, sect409r1,\n", ""); + FPS "%-20s nistb409, sect571k1, nistk571, sect571r1, nistb571,\n", ""); + FPS "%-20s secp160k1, secp160r1, secp160r2, secp192k1, secp192r1,\n", ""); + FPS "%-20s nistp192, secp224k1, secp224r1, nistp224, secp256k1,\n", ""); + FPS "%-20s secp256r1, secp384r1, secp521r1,\n", ""); + FPS "%-20s prime192v1, prime192v2, prime192v3, \n", ""); + FPS "%-20s prime239v1, prime239v2, prime239v3, c2pnb163v1, \n", ""); + FPS "%-20s c2pnb163v2, c2pnb163v3, c2pnb176v1, c2tnb191v1, \n", ""); + FPS "%-20s c2tnb191v2, c2tnb191v3, \n", ""); + FPS "%-20s c2pnb208w1, c2tnb239v1, c2tnb239v2, c2tnb239v3, \n", ""); + FPS "%-20s c2pnb272w1, c2pnb304w1, \n", ""); + FPS "%-20s c2tnb359w1, c2pnb368w1, c2tnb431r1, secp112r1, \n", ""); + FPS "%-20s secp112r2, secp128r1, secp128r2, sect113r1, sect113r2\n", ""); + FPS "%-20s sect131r1, sect131r2\n", ""); + FPS "%-20s Key database directory (default is ~/.netscape)\n", + " -d keydir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s\n" + "%-20s PKCS #11 key Attributes.\n", + " --keyAttrFlags attrflags", ""); + FPS "%-20s Comma separated list of key attribute attribute flags,\n", ""); + FPS "%-20s selected from the following list of choices:\n", ""); + FPS "%-20s {token | session} {public | private} {sensitive | insensitive}\n", ""); + FPS "%-20s {modifiable | unmodifiable} {extractable | unextractable}\n", ""); + FPS "%-20s\n", + " --keyOpFlagsOn opflags"); + FPS "%-20s\n" + "%-20s PKCS #11 key Operation Flags.\n", + " --keyOpFlagsOff opflags", ""); + FPS "%-20s Comma separated list of one or more of the following:\n", ""); + FPS "%-20s encrypt, decrypt, sign, sign_recover, verify,\n", ""); + FPS "%-20s verify_recover, wrap, unwrap, derive\n", ""); + FPS "\n"); +} + +static void +luD(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "D")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Delete a certificate from the database\n", + "-D"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The nickname of the cert to delete\n", + " -n cert-name"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "\n"); +} + +static void +luF(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "F")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Delete a key and associated certificate from the database\n", + "-F"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The nickname of the key to delete\n", + " -n cert-name"); + FPS "%-20s The key id of the key to delete, obtained using -K\n", + " -k key-id"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "\n"); +} + +static void +luU(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "U")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s List all modules\n", /*, or print out a single named module\n",*/ + "-U"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Module database directory (default is '~/.netscape')\n", + " -d moddir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s force the database to open R/W\n", + " -X"); + FPS "\n"); +} + +static void +luK(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "K")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s List all private keys\n", + "-K"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Name of token to search (\"all\" for all tokens)\n", + " -h token-name "); + + FPS "%-20s Key type (\"all\" (default), \"dsa\"," + " \"ec\"," + " \"rsa\")\n", + " -k key-type"); + FPS "%-20s The nickname of the key or associated certificate\n", + " -n name"); + FPS "%-20s Specify the password file\n", + " -f password-file"); + FPS "%-20s Key database directory (default is ~/.netscape)\n", + " -d keydir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s force the database to open R/W\n", + " -X"); + FPS "\n"); +} + +static void +luL(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "L")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s List all certs, or print out a single named cert (or a subset)\n", + "-L"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Name of token to search (\"all\" for all tokens)\n", + " -h token-name "); + FPS "%-20s Pretty print named cert (list all if unspecified)\n", + " -n cert-name"); + FPS "%-20s \n" + "%-20s Pretty print cert with email address (list all if unspecified)\n", + " --email email-address", ""); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s force the database to open R/W\n", + " -X"); + FPS "%-20s For single cert, print binary DER encoding\n", + " -r"); + FPS "%-20s For single cert, print ASCII encoding (RFC1113)\n", + " -a"); + FPS "%-20s \n" + "%-20s For single cert, print binary DER encoding of extension OID\n", + " --dump-ext-val OID", ""); + FPS "\n"); +} + +static void +luM(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "M")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Modify trust attributes of certificate\n", + "-M"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The nickname of the cert to modify\n", + " -n cert-name"); + FPS "%-20s Set the certificate trust attributes (see -A above)\n", + " -t trustargs"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "\n"); +} + +static void +luN(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "N")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Create a new certificate database\n", + "-N"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s Specify the password file\n", + " -f password-file"); + FPS "%-20s use empty password when creating a new database\n", + " --empty-password"); + FPS "\n"); +} + +static void +luT(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "T")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Reset the Key database or token\n", + "-T"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s Token to reset (default is internal)\n", + " -h token-name"); + FPS "%-20s Set token's Site Security Officer password\n", + " -0 SSO-password"); + FPS "\n"); +} + +static void +luO(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "O")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Print the chain of a certificate\n", + "-O"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The nickname of the cert to modify\n", + " -n cert-name"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Input the certificate in ASCII (RFC1113); default is binary\n", + " -a"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s force the database to open R/W\n", + " -X"); + FPS "%-20s don't search for a chain if issuer name equals subject name\n", + " --simple-self-signed"); + FPS "\n"); +} + +static void +luR(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "R")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Generate a certificate request (stdout)\n", + "-R"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Specify the subject name (using RFC1485)\n", + " -s subject"); + FPS "%-20s Output the cert request to this file\n", + " -o output-req"); + FPS "%-20s Type of key pair to generate (\"dsa\", \"ec\", \"rsa\" (default))\n", + " -k key-type-or-id"); + FPS "%-20s or nickname of the cert key to use, or key id obtained using -K\n", + ""); + FPS "%-20s Name of token in which to generate key (default is internal)\n", + " -h token-name"); + FPS "%-20s Key size in bits, RSA keys only (min %d, max %d, default %d)\n", + " -g key-size", MIN_KEY_BITS, MAX_KEY_BITS, DEFAULT_KEY_BITS); + FPS "%-20s Create a certificate request restricted to RSA-PSS (rsa only)\n", + " --pss"); + FPS "%-20s Name of file containing PQG parameters (dsa only)\n", + " -q pqgfile"); + FPS "%-20s Elliptic curve name (ec only)\n", + " -q curve-name"); + FPS "%-20s See the \"-G\" option for a full list of supported names.\n", + ""); + FPS "%-20s Specify the password file\n", + " -f pwfile"); + FPS "%-20s Key database directory (default is ~/.netscape)\n", + " -d keydir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s Specify the contact phone number (\"123-456-7890\")\n", + " -p phone"); + FPS "%-20s \n" + "%-20s Specify the hash algorithm to use. Possible keywords:\n" + "%-20s \"MD2\", \"MD4\", \"MD5\", \"SHA1\", \"SHA224\",\n" + "%-20s \"SHA256\", \"SHA384\", \"SHA512\"\n", + " -Z hashAlg", "", "", ""); + FPS "%-20s Output the cert request in ASCII (RFC1113); default is binary\n", + " -a"); + FPS "%-20s \n", + " See -S for available extension options"); + FPS "%-20s \n", + " See -G for available key flag options"); + FPS "\n"); +} + +static void +luV(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "V")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Validate a certificate\n", + "-V"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The nickname of the cert to Validate\n", + " -n cert-name"); + FPS "%-20s validity time (\"YYMMDDHHMMSS[+HHMM|-HHMM|Z]\")\n", + " -b time"); + FPS "%-20s Check certificate signature \n", + " -e "); + FPS "%-20s Specify certificate usage:\n", " -u certusage"); + FPS "%-25s C \t SSL Client\n", ""); + FPS "%-25s V \t SSL Server\n", ""); + FPS "%-25s I \t IPsec\n", ""); + FPS "%-25s L \t SSL CA\n", ""); + FPS "%-25s A \t Any CA\n", ""); + FPS "%-25s Y \t Verify CA\n", ""); + FPS "%-25s S \t Email signer\n", ""); + FPS "%-25s R \t Email Recipient\n", ""); + FPS "%-25s O \t OCSP status responder\n", ""); + FPS "%-25s J \t Object signer\n", ""); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Input the certificate in ASCII (RFC1113); default is binary\n", + " -a"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s force the database to open R/W\n", + " -X"); + FPS "\n"); +} + +static void +luW(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "W")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Change the key database password\n", + "-W"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s cert and key database directory\n", + " -d certdir"); + FPS "%-20s Specify a file with the current password\n", + " -f pwfile"); + FPS "%-20s Specify a file with the new password in two lines\n", + " -@ newpwfile"); + FPS "\n"); +} + +static void +luRename(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "rename")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Change the database nickname of a certificate\n", + "--rename"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s The old nickname of the cert to rename\n", + " -n cert-name"); + FPS "%-20s The new nickname of the cert to rename\n", + " --new-n new-name"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "\n"); +} + +static void +luUpgradeMerge(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "upgrade-merge")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Upgrade an old database and merge it into a new one\n", + "--upgrade-merge"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Cert database directory to merge into (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix of the target database\n", + " -P dbprefix"); + FPS "%-20s Specify the password file for the target database\n", + " -f pwfile"); + FPS "%-20s \n%-20s Cert database directory to upgrade from\n", + " --source-dir certdir", ""); + FPS "%-20s \n%-20s Cert & Key database prefix of the upgrade database\n", + " --source-prefix dbprefix", ""); + FPS "%-20s \n%-20s Unique identifier for the upgrade database\n", + " --upgrade-id uniqueID", ""); + FPS "%-20s \n%-20s Name of the token while it is in upgrade state\n", + " --upgrade-token-name name", ""); + FPS "%-20s Specify the password file for the upgrade database\n", + " -@ pwfile"); + FPS "\n"); +} + +static void +luMerge(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "merge")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Merge source database into the target database\n", + "--merge"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Cert database directory of target (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix of the target database\n", + " -P dbprefix"); + FPS "%-20s Specify the password file for the target database\n", + " -f pwfile"); + FPS "%-20s \n%-20s Cert database directory of the source database\n", + " --source-dir certdir", ""); + FPS "%-20s \n%-20s Cert & Key database prefix of the source database\n", + " --source-prefix dbprefix", ""); + FPS "%-20s Specify the password file for the source database\n", + " -@ pwfile"); + FPS "\n"); +} + +static void +luS(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "S")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Make a certificate and add to database\n", + "-S"); + if (ul == usage_selected && !is_my_command) + return; + FPS "%-20s Specify the nickname of the cert\n", + " -n key-name"); + FPS "%-20s Specify the subject name (using RFC1485)\n", + " -s subject"); + FPS "%-20s The nickname of the issuer cert\n", + " -c issuer-name"); + FPS "%-20s Set the certificate trust attributes (see -A above)\n", + " -t trustargs"); + FPS "%-20s Type of key pair to generate (\"dsa\", \"ec\", \"rsa\" (default))\n", + " -k key-type-or-id"); + FPS "%-20s Name of token in which to generate key (default is internal)\n", + " -h token-name"); + FPS "%-20s Key size in bits, RSA keys only (min %d, max %d, default %d)\n", + " -g key-size", MIN_KEY_BITS, MAX_KEY_BITS, DEFAULT_KEY_BITS); + FPS "%-20s Create a certificate restricted to RSA-PSS (rsa only)\n", + " --pss"); + FPS "%-20s Name of file containing PQG parameters (dsa only)\n", + " -q pqgfile"); + FPS "%-20s Elliptic curve name (ec only)\n", + " -q curve-name"); + FPS "%-20s See the \"-G\" option for a full list of supported names.\n", + ""); + FPS "%-20s Self sign\n", + " -x"); + FPS "%-20s Sign the certificate with RSA-PSS (the issuer key must be rsa)\n", + " --pss-sign"); + FPS "%-20s Cert serial number\n", + " -m serial-number"); + FPS "%-20s Time Warp\n", + " -w warp-months"); + FPS "%-20s Months valid (default is 3)\n", + " -v months-valid"); + FPS "%-20s Specify the password file\n", + " -f pwfile"); + FPS "%-20s Cert database directory (default is ~/.netscape)\n", + " -d certdir"); + FPS "%-20s Cert & Key database prefix\n", + " -P dbprefix"); + FPS "%-20s Specify the contact phone number (\"123-456-7890\")\n", + " -p phone"); + FPS "%-20s \n" + "%-20s Specify the hash algorithm to use. Possible keywords:\n" + "%-20s \"MD2\", \"MD4\", \"MD5\", \"SHA1\", \"SHA224\",\n" + "%-20s \"SHA256\", \"SHA384\", \"SHA512\"\n", + " -Z hashAlg", "", "", ""); + FPS "%-20s Create key usage extension\n", + " -1 "); + FPS "%-20s Create basic constraint extension\n", + " -2 "); + FPS "%-20s Create authority key ID extension\n", + " -3 "); + FPS "%-20s Create crl distribution point extension\n", + " -4 "); + FPS "%-20s Create netscape cert type extension\n", + " -5 "); + FPS "%-20s Create extended key usage extension\n", + " -6 "); + FPS "%-20s Create an email subject alt name extension\n", + " -7 emailAddrs "); + FPS "%-20s Create a DNS subject alt name extension\n", + " -8 DNS-names"); + FPS "%-20s Create an Authority Information Access extension\n", + " --extAIA "); + FPS "%-20s Create a Subject Information Access extension\n", + " --extSIA "); + FPS "%-20s Create a Certificate Policies extension\n", + " --extCP "); + FPS "%-20s Create a Policy Mappings extension\n", + " --extPM "); + FPS "%-20s Create a Policy Constraints extension\n", + " --extPC "); + FPS "%-20s Create an Inhibit Any Policy extension\n", + " --extIA "); + FPS "%-20s Create a subject key ID extension\n", + " --extSKID "); + FPS "%-20s \n", + " See -G for available key flag options"); + FPS "%-20s Create a name constraints extension\n", + " --extNC "); + FPS "%-20s \n" + "%-20s Create a Subject Alt Name extension with one or multiple names\n", + " --extSAN type:name[,type:name]...", ""); + FPS "%-20s - type: directory, dn, dns, edi, ediparty, email, ip, ipaddr,\n", ""); + FPS "%-20s other, registerid, rfc822, uri, x400, x400addr\n", ""); + FPS "%-20s \n" + "%-20s Add one or multiple extensions that certutil cannot encode yet,\n" + "%-20s by loading their encodings from external files.\n", + " --extGeneric OID:critical-flag:filename[,OID:critical-flag:filename]...", "", ""); + FPS "%-20s - OID (example): 1.2.3.4\n", ""); + FPS "%-20s - critical-flag: critical or not-critical\n", ""); + FPS "%-20s - filename: full path to a file containing an encoded extension\n", ""); + FPS "\n"); +} + +static void +luBuildFlags(enum usage_level ul, const char *command) +{ + int is_my_command = (command && 0 == strcmp(command, "build-flags")); + if (ul == usage_all || !command || is_my_command) + FPS "%-15s Print enabled build flags relevant for NSS test execution\n", + "--build-flags"); + if (ul == usage_selected && !is_my_command) + return; + FPS "\n"); +} + +static void +LongUsage(enum usage_level ul, const char *command) +{ + luA(ul, command); + luB(ul, command); + luE(ul, command); + luC(ul, command); + luG(ul, command); + luD(ul, command); + luRename(ul, command); + luF(ul, command); + luU(ul, command); + luK(ul, command); + luL(ul, command); + luBuildFlags(ul, command); + luM(ul, command); + luN(ul, command); + luT(ul, command); + luO(ul, command); + luR(ul, command); + luV(ul, command); + luW(ul, command); + luUpgradeMerge(ul, command); + luMerge(ul, command); + luS(ul, command); +#undef FPS +} + +static void +Usage() +{ + PR_fprintf(PR_STDERR, + "%s - Utility to manipulate NSS certificate databases\n\n" + "Usage: %s -d \n\n" + "Valid commands:\n", + progName, progName); + LongUsage(usage_selected, NULL); + PR_fprintf(PR_STDERR, "\n" + "%s -H : Print available options for the given command\n" + "%s -H : Print complete help output of all commands and options\n" + "%s --syntax : Print a short summary of all commands and options\n", + progName, progName, progName); + exit(1); +} + +static CERTCertificate * +MakeV1Cert(CERTCertDBHandle *handle, + CERTCertificateRequest *req, + char *issuerNickName, + PRBool selfsign, + unsigned int serialNumber, + int warpmonths, + int validityMonths) +{ + CERTCertificate *issuerCert = NULL; + CERTValidity *validity; + CERTCertificate *cert = NULL; + PRExplodedTime printableTime; + PRTime now, after; + + if (!selfsign) { + issuerCert = CERT_FindCertByNicknameOrEmailAddr(handle, issuerNickName); + if (!issuerCert) { + SECU_PrintError(progName, "could not find certificate named \"%s\"", + issuerNickName); + return NULL; + } + } + + now = PR_Now(); + PR_ExplodeTime(now, PR_GMTParameters, &printableTime); + if (warpmonths) { + printableTime.tm_month += warpmonths; + now = PR_ImplodeTime(&printableTime); + PR_ExplodeTime(now, PR_GMTParameters, &printableTime); + } + printableTime.tm_month += validityMonths; + after = PR_ImplodeTime(&printableTime); + + /* note that the time is now in micro-second unit */ + validity = CERT_CreateValidity(now, after); + if (validity) { + cert = CERT_CreateCertificate(serialNumber, + (selfsign ? &req->subject + : &issuerCert->subject), + validity, req); + + CERT_DestroyValidity(validity); + } + if (issuerCert) { + CERT_DestroyCertificate(issuerCert); + } + + return (cert); +} + +static SECStatus +SetSignatureAlgorithm(PLArenaPool *arena, + SECAlgorithmID *signAlg, + SECAlgorithmID *spkiAlg, + SECOidTag hashAlgTag, + SECKEYPrivateKey *privKey, + PRBool pssSign) +{ + SECStatus rv; + + if (pssSign || + SECOID_GetAlgorithmTag(spkiAlg) == SEC_OID_PKCS1_RSA_PSS_SIGNATURE) { + SECItem *srcParams; + SECItem *params; + + if (SECOID_GetAlgorithmTag(spkiAlg) == SEC_OID_PKCS1_RSA_PSS_SIGNATURE) { + srcParams = &spkiAlg->parameters; + } else { + /* If the issuer's public key is RSA, the parameter field + * of the SPKI should be NULL, which can't be used as a + * basis of RSA-PSS parameters. */ + srcParams = NULL; + } + params = SEC_CreateSignatureAlgorithmParameters(arena, + NULL, + SEC_OID_PKCS1_RSA_PSS_SIGNATURE, + hashAlgTag, + srcParams, + privKey); + if (!params) { + SECU_PrintError(progName, "Could not create RSA-PSS parameters"); + return SECFailure; + } + rv = SECOID_SetAlgorithmID(arena, signAlg, + SEC_OID_PKCS1_RSA_PSS_SIGNATURE, + params); + if (rv != SECSuccess) { + SECU_PrintError(progName, "Could not set signature algorithm id."); + return rv; + } + } else { + KeyType keyType = SECKEY_GetPrivateKeyType(privKey); + SECOidTag algID; + + algID = SEC_GetSignatureAlgorithmOidTag(keyType, hashAlgTag); + if (algID == SEC_OID_UNKNOWN) { + SECU_PrintError(progName, "Unknown key or hash type for issuer."); + return SECFailure; + } + rv = SECOID_SetAlgorithmID(arena, signAlg, algID, 0); + if (rv != SECSuccess) { + SECU_PrintError(progName, "Could not set signature algorithm id."); + return rv; + } + } + return SECSuccess; +} + +static SECStatus +SignCert(CERTCertDBHandle *handle, CERTCertificate *cert, PRBool selfsign, + SECOidTag hashAlgTag, + SECKEYPrivateKey *privKey, char *issuerNickName, + int certVersion, PRBool pssSign, void *pwarg) +{ + SECItem der; + SECKEYPrivateKey *caPrivateKey = NULL; + SECStatus rv; + PLArenaPool *arena; + CERTCertificate *issuer; + void *dummy; + + arena = cert->arena; + + if (selfsign) { + issuer = cert; + } else { + issuer = PK11_FindCertFromNickname(issuerNickName, pwarg); + if ((CERTCertificate *)NULL == issuer) { + SECU_PrintError(progName, "unable to find issuer with nickname %s", + issuerNickName); + rv = SECFailure; + goto done; + } + privKey = caPrivateKey = PK11_FindKeyByAnyCert(issuer, pwarg); + if (caPrivateKey == NULL) { + SECU_PrintError(progName, "unable to retrieve key %s", issuerNickName); + rv = SECFailure; + CERT_DestroyCertificate(issuer); + goto done; + } + } + + if (pssSign && + (SECKEY_GetPrivateKeyType(privKey) != rsaKey && + SECKEY_GetPrivateKeyType(privKey) != rsaPssKey)) { + SECU_PrintError(progName, "unable to create RSA-PSS signature with key %s", + issuerNickName); + rv = SECFailure; + if (!selfsign) { + CERT_DestroyCertificate(issuer); + } + goto done; + } + + rv = SetSignatureAlgorithm(arena, + &cert->signature, + &issuer->subjectPublicKeyInfo.algorithm, + hashAlgTag, + privKey, + pssSign); + if (!selfsign) { + CERT_DestroyCertificate(issuer); + } + if (rv != SECSuccess) { + goto done; + } + + switch (certVersion) { + case (SEC_CERTIFICATE_VERSION_1): + /* The initial version for x509 certificates is version one + * and this default value must be an implicit DER encoding. */ + cert->version.data = NULL; + cert->version.len = 0; + break; + case (SEC_CERTIFICATE_VERSION_2): + case (SEC_CERTIFICATE_VERSION_3): + case 3: /* unspecified format (would be version 4 certificate). */ + *(cert->version.data) = certVersion; + cert->version.len = 1; + break; + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + rv = SECFailure; + goto done; + } + + der.len = 0; + der.data = NULL; + dummy = SEC_ASN1EncodeItem(arena, &der, cert, + SEC_ASN1_GET(CERT_CertificateTemplate)); + if (!dummy) { + fprintf(stderr, "Could not encode certificate.\n"); + rv = SECFailure; + goto done; + } + + rv = SEC_DerSignDataWithAlgorithmID(arena, &cert->derCert, der.data, der.len, + privKey, &cert->signature); + if (rv != SECSuccess) { + fprintf(stderr, "Could not sign encoded certificate data.\n"); + /* result allocated out of the arena, it will be freed + * when the arena is freed */ + goto done; + } +done: + if (caPrivateKey) { + SECKEY_DestroyPrivateKey(caPrivateKey); + } + return rv; +} + +static SECStatus +CreateCert( + CERTCertDBHandle *handle, + PK11SlotInfo *slot, + char *issuerNickName, + const SECItem *certReqDER, + SECKEYPrivateKey **selfsignprivkey, + void *pwarg, + SECOidTag hashAlgTag, + unsigned int serialNumber, + int warpmonths, + int validityMonths, + const char *emailAddrs, + const char *dnsNames, + PRBool ascii, + PRBool selfsign, + certutilExtnList extnList, + const char *extGeneric, + int certVersion, + PRBool pssSign, + SECItem *certDER) +{ + void *extHandle = NULL; + CERTCertificate *subjectCert = NULL; + CERTCertificateRequest *certReq = NULL; + SECStatus rv = SECSuccess; + CERTCertExtension **CRexts; + + do { + /* Create a certrequest object from the input cert request der */ + certReq = GetCertRequest(certReqDER, pwarg); + if (certReq == NULL) { + GEN_BREAK(SECFailure) + } + + subjectCert = MakeV1Cert(handle, certReq, issuerNickName, selfsign, + serialNumber, warpmonths, validityMonths); + if (subjectCert == NULL) { + GEN_BREAK(SECFailure) + } + + extHandle = CERT_StartCertExtensions(subjectCert); + if (extHandle == NULL) { + GEN_BREAK(SECFailure) + } + + rv = AddExtensions(extHandle, emailAddrs, dnsNames, extnList, extGeneric); + if (rv != SECSuccess) { + GEN_BREAK(SECFailure) + } + + if (certReq->attributes != NULL && + certReq->attributes[0] != NULL && + certReq->attributes[0]->attrType.data != NULL && + certReq->attributes[0]->attrType.len > 0 && + SECOID_FindOIDTag(&certReq->attributes[0]->attrType) == + SEC_OID_PKCS9_EXTENSION_REQUEST) { + rv = CERT_GetCertificateRequestExtensions(certReq, &CRexts); + if (rv != SECSuccess) + break; + rv = CERT_MergeExtensions(extHandle, CRexts); + if (rv != SECSuccess) + break; + } + + CERT_FinishExtensions(extHandle); + extHandle = NULL; + + /* self-signing a cert request, find the private key */ + if (selfsign && *selfsignprivkey == NULL) { + *selfsignprivkey = PK11_FindKeyByDERCert(slot, subjectCert, pwarg); + if (!*selfsignprivkey) { + fprintf(stderr, "Failed to locate private key.\n"); + rv = SECFailure; + break; + } + } + + rv = SignCert(handle, subjectCert, selfsign, hashAlgTag, + *selfsignprivkey, issuerNickName, + certVersion, pssSign, pwarg); + if (rv != SECSuccess) + break; + + rv = SECFailure; + if (ascii) { + char *asciiDER = BTOA_DataToAscii(subjectCert->derCert.data, + subjectCert->derCert.len); + if (asciiDER) { + char *wrapped = PR_smprintf("%s\n%s\n%s\n", + NS_CERT_HEADER, + asciiDER, + NS_CERT_TRAILER); + if (wrapped) { + PRUint32 wrappedLen = PL_strlen(wrapped); + if (SECITEM_AllocItem(NULL, certDER, wrappedLen)) { + PORT_Memcpy(certDER->data, wrapped, wrappedLen); + rv = SECSuccess; + } + PR_smprintf_free(wrapped); + } + PORT_Free(asciiDER); + } + } else { + rv = SECITEM_CopyItem(NULL, certDER, &subjectCert->derCert); + } + } while (0); + if (extHandle) { + CERT_FinishExtensions(extHandle); + } + CERT_DestroyCertificateRequest(certReq); + CERT_DestroyCertificate(subjectCert); + if (rv != SECSuccess) { + PRErrorCode perr = PR_GetError(); + fprintf(stderr, "%s: unable to create cert (%s)\n", progName, + SECU_Strerror(perr)); + } + return (rv); +} + +/* + * map a class to a user presentable string + */ +static const char *objClassArray[] = { + "Data", + "Certificate", + "Public Key", + "Private Key", + "Secret Key", + "Hardware Feature", + "Domain Parameters", + "Mechanism" +}; + +static const char *objNSSClassArray[] = { + "CKO_NSS", + "Crl", + "SMIME Record", + "Trust", + "Builtin Root List" +}; + +const char * +getObjectClass(CK_ULONG classType) +{ + static char buf[sizeof(CK_ULONG) * 2 + 3]; + + if (classType <= CKO_MECHANISM) { + return objClassArray[classType]; + } + if (classType >= CKO_NSS && classType <= CKO_NSS_BUILTIN_ROOT_LIST) { + return objNSSClassArray[classType - CKO_NSS]; + } + snprintf(buf, sizeof(buf), "0x%lx", classType); + return buf; +} + +typedef struct { + char *name; + int nameSize; + CK_ULONG value; +} flagArray; + +#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 } +}; + +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 } +}; + +int attrFlagsCount = PR_ARRAY_SIZE(attrFlagsArray); + +#define MAX_STRING 30 +CK_ULONG +GetFlags(char *flagsString, flagArray *flags, int count) +{ + CK_ULONG flagsValue = strtol(flagsString, NULL, 0); + int i; + + if ((flagsValue != 0) || (*flagsString == 0)) { + return flagsValue; + } + while (*flagsString) { + for (i = 0; i < count; i++) { + if (strncmp(flagsString, flags[i].name, flags[i].nameSize) == + 0) { + flagsValue |= flags[i].value; + flagsString += flags[i].nameSize; + if (*flagsString != 0) { + flagsString++; + } + break; + } + } + if (i == count) { + char name[MAX_STRING]; + char *tok; + + strncpy(name, flagsString, MAX_STRING); + name[MAX_STRING - 1] = 0; + tok = strchr(name, ','); + if (tok) { + *tok = 0; + } + fprintf(stderr, "Unknown flag (%s)\n", name); + tok = strchr(flagsString, ','); + if (tok == NULL) { + break; + } + flagsString = tok + 1; + } + } + return flagsValue; +} + +CK_FLAGS +GetOpFlags(char *flags) +{ + return GetFlags(flags, opFlagsArray, opFlagsCount); +} + +PK11AttrFlags +GetAttrFlags(char *flags) +{ + return GetFlags(flags, attrFlagsArray, attrFlagsCount); +} + +char * +mkNickname(unsigned char *data, int len) +{ + char *nick = PORT_Alloc(len + 1); + if (!nick) { + return nick; + } + PORT_Memcpy(nick, data, len); + nick[len] = 0; + return nick; +} + +/* + * dump a PK11_MergeTokens error log to the console + */ +void +DumpMergeLog(const char *progname, PK11MergeLog *log) +{ + PK11MergeLogNode *node; + + for (node = log->head; node; node = node->next) { + SECItem attrItem; + char *nickname = NULL; + const char *objectClass = NULL; + SECStatus rv; + + attrItem.data = NULL; + rv = PK11_ReadRawAttribute(PK11_TypeGeneric, node->object, + CKA_LABEL, &attrItem); + if (rv == SECSuccess) { + nickname = mkNickname(attrItem.data, attrItem.len); + PORT_Free(attrItem.data); + } + attrItem.data = NULL; + rv = PK11_ReadRawAttribute(PK11_TypeGeneric, node->object, + CKA_CLASS, &attrItem); + if (rv == SECSuccess) { + if (attrItem.len == sizeof(CK_ULONG)) { + objectClass = getObjectClass(*(CK_ULONG *)attrItem.data); + } + PORT_Free(attrItem.data); + } + + fprintf(stderr, "%s: Could not merge object %s (type %s): %s\n", + progName, + nickname ? nickname : "unnamed", + objectClass ? objectClass : "unknown", + SECU_Strerror(node->error)); + + if (nickname) { + PORT_Free(nickname); + } + } +} + +/* Certutil commands */ +enum { + cmd_AddCert = 0, + cmd_CreateNewCert, + cmd_DeleteCert, + cmd_AddEmailCert, + cmd_DeleteKey, + cmd_GenKeyPair, + cmd_PrintHelp, + cmd_PrintSyntax, + cmd_ListKeys, + cmd_ListCerts, + cmd_ModifyCertTrust, + cmd_NewDBs, + cmd_DumpChain, + cmd_CertReq, + cmd_CreateAndAddCert, + cmd_TokenReset, + cmd_ListModules, + cmd_CheckCertValidity, + cmd_ChangePassword, + cmd_Version, + cmd_Batch, + cmd_Merge, + cmd_UpgradeMerge, /* test only */ + cmd_Rename, + cmd_BuildFlags, + max_cmd +}; + +/* Certutil options */ +enum certutilOpts { + opt_SSOPass = 0, + opt_AddKeyUsageExt, + opt_AddBasicConstraintExt, + opt_AddAuthorityKeyIDExt, + opt_AddCRLDistPtsExt, + opt_AddNSCertTypeExt, + opt_AddExtKeyUsageExt, + opt_ExtendedEmailAddrs, + opt_ExtendedDNSNames, + opt_ASCIIForIO, + opt_ValidityTime, + opt_IssuerName, + opt_CertDir, + opt_VerifySig, + opt_PasswordFile, + opt_KeySize, + opt_TokenName, + opt_InputFile, + opt_Emailaddress, + opt_KeyIndex, + opt_KeyType, + opt_DetailedInfo, + opt_SerialNumber, + opt_Nickname, + opt_OutputFile, + opt_PhoneNumber, + opt_DBPrefix, + opt_PQGFile, + opt_BinaryDER, + opt_Subject, + opt_Trust, + opt_Usage, + opt_Validity, + opt_OffsetMonths, + opt_SelfSign, + opt_RW, + opt_Exponent, + opt_NoiseFile, + opt_Hash, + opt_NewPasswordFile, + opt_AddAuthInfoAccExt, + opt_AddSubjInfoAccExt, + opt_AddCertPoliciesExt, + opt_AddPolicyMapExt, + opt_AddPolicyConstrExt, + opt_AddInhibAnyExt, + opt_AddNameConstraintsExt, + opt_AddSubjectKeyIDExt, + opt_AddCmdKeyUsageExt, + opt_AddCmdNSCertTypeExt, + opt_AddCmdExtKeyUsageExt, + opt_SourceDir, + opt_SourcePrefix, + opt_UpgradeID, + opt_UpgradeTokenName, + opt_KeyOpFlagsOn, + opt_KeyOpFlagsOff, + opt_KeyAttrFlags, + opt_EmptyPassword, + opt_CertVersion, + opt_AddSubjectAltNameExt, + opt_DumpExtensionValue, + opt_GenericExtensions, + opt_NewNickname, + opt_Pss, + opt_PssSign, + opt_SimpleSelfSigned, + 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" } +}; +#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" }, +}; +#define NUM_OPTIONS ((sizeof options_init) / (sizeof options_init[0])) + +static secuCommandFlag certutil_commands[NUM_COMMANDS]; +static secuCommandFlag certutil_options[NUM_OPTIONS]; + +static const secuCommand certutil = { + NUM_COMMANDS, + NUM_OPTIONS, + certutil_commands, + certutil_options +}; + +static certutilExtnList certutil_extns; + +static int +certutil_main(int argc, char **argv, PRBool initialize) +{ + CERTCertDBHandle *certHandle; + PK11SlotInfo *slot = NULL; + CERTName *subject = 0; + PRFileDesc *inFile = PR_STDIN; + PRFileDesc *outFile = PR_STDOUT; + SECItem certReqDER = { siBuffer, NULL, 0 }; + SECItem certDER = { siBuffer, NULL, 0 }; + const char *slotname = "internal"; + const char *certPrefix = ""; + char *sourceDir = ""; + const char *srcCertPrefix = ""; + char *upgradeID = ""; + char *upgradeTokenName = ""; + KeyType keytype = rsaKey; + char *name = NULL; + char *newName = NULL; + char *email = NULL; + char *keysource = NULL; + SECOidTag hashAlgTag = SEC_OID_UNKNOWN; + int keysize = DEFAULT_KEY_BITS; + int publicExponent = 0x010001; + int certVersion = SEC_CERTIFICATE_VERSION_3; + unsigned int serialNumber = 0; + int warpmonths = 0; + int validityMonths = 3; + int commandsEntered = 0; + char commandToRun = '\0'; + secuPWData pwdata = { PW_NONE, 0 }; + secuPWData pwdata2 = { PW_NONE, 0 }; + PRBool readOnly = PR_FALSE; + PRBool initialized = PR_FALSE; + CK_FLAGS keyOpFlagsOn = 0; + CK_FLAGS keyOpFlagsOff = 0; + PK11AttrFlags keyAttrFlags = + PK11_ATTR_TOKEN | PK11_ATTR_SENSITIVE | PK11_ATTR_PRIVATE; + + SECKEYPrivateKey *privkey = NULL; + SECKEYPublicKey *pubkey = NULL; + + int i; + SECStatus rv; + + progName = PORT_Strrchr(argv[0], '/'); + progName = progName ? progName + 1 : argv[0]; + memcpy(certutil_commands, commands_init, sizeof commands_init); + memcpy(certutil_options, options_init, sizeof options_init); + + rv = SECU_ParseCommandLine(argc, argv, progName, &certutil); + + if (rv != SECSuccess) + Usage(); + + if (certutil.commands[cmd_PrintSyntax].activated) { + PrintSyntax(); + } + + if (certutil.commands[cmd_PrintHelp].activated) { + char buf[2]; + const char *command = NULL; + for (i = 0; i < max_cmd; i++) { + if (i == cmd_PrintHelp) + continue; + if (certutil.commands[i].activated) { + if (certutil.commands[i].flag) { + buf[0] = certutil.commands[i].flag; + buf[1] = 0; + command = buf; + } else { + command = certutil.commands[i].longform; + } + break; + } + } + LongUsage((command ? usage_selected : usage_all), command); + exit(1); + } + + if (certutil.commands[cmd_BuildFlags].activated) { + PrintBuildFlags(); + } + + if (certutil.options[opt_PasswordFile].arg) { + pwdata.source = PW_FROMFILE; + pwdata.data = certutil.options[opt_PasswordFile].arg; + } + if (certutil.options[opt_NewPasswordFile].arg) { + pwdata2.source = PW_FROMFILE; + pwdata2.data = certutil.options[opt_NewPasswordFile].arg; + } + + if (certutil.options[opt_CertDir].activated) + SECU_ConfigDirectory(certutil.options[opt_CertDir].arg); + + if (certutil.options[opt_SourceDir].activated) + sourceDir = certutil.options[opt_SourceDir].arg; + + if (certutil.options[opt_UpgradeID].activated) + upgradeID = certutil.options[opt_UpgradeID].arg; + + if (certutil.options[opt_UpgradeTokenName].activated) + upgradeTokenName = certutil.options[opt_UpgradeTokenName].arg; + + if (certutil.options[opt_KeySize].activated) { + keysize = PORT_Atoi(certutil.options[opt_KeySize].arg); + if ((keysize < MIN_KEY_BITS) || (keysize > MAX_KEY_BITS)) { + PR_fprintf(PR_STDERR, + "%s -g: Keysize must be between %d and %d.\n", + progName, MIN_KEY_BITS, MAX_KEY_BITS); + return 255; + } + if (keytype == ecKey) { + PR_fprintf(PR_STDERR, "%s -g: Not for ec keys.\n", progName); + return 255; + } + } + + /* -h specify token name */ + if (certutil.options[opt_TokenName].activated) { + if (PL_strcmp(certutil.options[opt_TokenName].arg, "all") == 0) + slotname = NULL; + else + slotname = certutil.options[opt_TokenName].arg; + } + + /* -Z hash type */ + if (certutil.options[opt_Hash].activated) { + char *arg = certutil.options[opt_Hash].arg; + hashAlgTag = SECU_StringToSignatureAlgTag(arg); + if (hashAlgTag == SEC_OID_UNKNOWN) { + PR_fprintf(PR_STDERR, "%s -Z: %s is not a recognized type.\n", + progName, arg); + return 255; + } + } + + /* -k key type */ + if (certutil.options[opt_KeyType].activated) { + char *arg = certutil.options[opt_KeyType].arg; + if (PL_strcmp(arg, "rsa") == 0) { + keytype = rsaKey; + } else if (PL_strcmp(arg, "dsa") == 0) { + keytype = dsaKey; + } else if (PL_strcmp(arg, "ec") == 0) { + keytype = ecKey; + } else if (PL_strcmp(arg, "all") == 0) { + keytype = nullKey; + } else { + /* use an existing private/public key pair */ + keysource = arg; + } + } else if (certutil.commands[cmd_ListKeys].activated) { + keytype = nullKey; + } + + if (certutil.options[opt_KeyOpFlagsOn].activated) { + keyOpFlagsOn = GetOpFlags(certutil.options[opt_KeyOpFlagsOn].arg); + } + if (certutil.options[opt_KeyOpFlagsOff].activated) { + keyOpFlagsOff = GetOpFlags(certutil.options[opt_KeyOpFlagsOff].arg); + keyOpFlagsOn &= ~keyOpFlagsOff; /* make off override on */ + } + if (certutil.options[opt_KeyAttrFlags].activated) { + keyAttrFlags = GetAttrFlags(certutil.options[opt_KeyAttrFlags].arg); + } + + /* -m serial number */ + if (certutil.options[opt_SerialNumber].activated) { + int sn = PORT_Atoi(certutil.options[opt_SerialNumber].arg); + if (sn < 0) { + PR_fprintf(PR_STDERR, "%s -m: %s is not a valid serial number.\n", + progName, certutil.options[opt_SerialNumber].arg); + return 255; + } + serialNumber = sn; + } + + /* -P certdb name prefix */ + if (certutil.options[opt_DBPrefix].activated) { + if (certutil.options[opt_DBPrefix].arg) { + certPrefix = certutil.options[opt_DBPrefix].arg; + } else { + Usage(); + } + } + + /* --source-prefix certdb name prefix */ + if (certutil.options[opt_SourcePrefix].activated) { + if (certutil.options[opt_SourcePrefix].arg) { + srcCertPrefix = certutil.options[opt_SourcePrefix].arg; + } else { + Usage(); + } + } + + /* -q PQG file or curve name */ + if (certutil.options[opt_PQGFile].activated) { + if ((keytype != dsaKey) && (keytype != ecKey)) { + PR_fprintf(PR_STDERR, "%s -q: specifies a PQG file for DSA keys" + " (-k dsa) or a named curve for EC keys (-k ec)\n)", + progName); + return 255; + } + } + + /* -s subject name */ + if (certutil.options[opt_Subject].activated) { + subject = CERT_AsciiToName(certutil.options[opt_Subject].arg); + if (!subject) { + PR_fprintf(PR_STDERR, "%s -s: improperly formatted name: \"%s\"\n", + progName, certutil.options[opt_Subject].arg); + return 255; + } + } + + /* -v validity period */ + if (certutil.options[opt_Validity].activated) { + validityMonths = PORT_Atoi(certutil.options[opt_Validity].arg); + if (validityMonths < 0) { + PR_fprintf(PR_STDERR, "%s -v: incorrect validity period: \"%s\"\n", + progName, certutil.options[opt_Validity].arg); + return 255; + } + } + + /* -w warp months */ + if (certutil.options[opt_OffsetMonths].activated) + warpmonths = PORT_Atoi(certutil.options[opt_OffsetMonths].arg); + + /* -y public exponent (for RSA) */ + if (certutil.options[opt_Exponent].activated) { + publicExponent = PORT_Atoi(certutil.options[opt_Exponent].arg); + if ((publicExponent != 3) && + (publicExponent != 17) && + (publicExponent != 65537)) { + PR_fprintf(PR_STDERR, "%s -y: incorrect public exponent %d.", + progName, publicExponent); + PR_fprintf(PR_STDERR, "Must be 3, 17, or 65537.\n"); + return 255; + } + } + + /* --certVersion */ + if (certutil.options[opt_CertVersion].activated) { + certVersion = PORT_Atoi(certutil.options[opt_CertVersion].arg); + if (certVersion < 1 || certVersion > 4) { + PR_fprintf(PR_STDERR, "%s -certVersion: incorrect certificate version %d.", + progName, certVersion); + PR_fprintf(PR_STDERR, "Must be 1, 2, 3 or 4.\n"); + return 255; + } + certVersion = certVersion - 1; + } + + /* Check number of commands entered. */ + commandsEntered = 0; + for (i = 0; i < certutil.numCommands; i++) { + if (certutil.commands[i].activated) { + commandToRun = certutil.commands[i].flag; + commandsEntered++; + } + if (commandsEntered > 1) + break; + } + if (commandsEntered > 1) { + PR_fprintf(PR_STDERR, "%s: only one command at a time!\n", progName); + PR_fprintf(PR_STDERR, "You entered: "); + for (i = 0; i < certutil.numCommands; i++) { + if (certutil.commands[i].activated) + PR_fprintf(PR_STDERR, " -%c", certutil.commands[i].flag); + } + PR_fprintf(PR_STDERR, "\n"); + return 255; + } + if (commandsEntered == 0) { + Usage(); + } + + if (certutil.commands[cmd_ListCerts].activated || + certutil.commands[cmd_PrintHelp].activated || + certutil.commands[cmd_ListKeys].activated || + certutil.commands[cmd_ListModules].activated || + certutil.commands[cmd_CheckCertValidity].activated || + certutil.commands[cmd_Version].activated) { + readOnly = !certutil.options[opt_RW].activated; + } + + /* -A, -D, -M, -S, -V, and all require -n */ + if ((certutil.commands[cmd_AddCert].activated || + certutil.commands[cmd_DeleteCert].activated || + certutil.commands[cmd_DumpChain].activated || + certutil.commands[cmd_ModifyCertTrust].activated || + certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_CheckCertValidity].activated) && + !certutil.options[opt_Nickname].activated) { + PR_fprintf(PR_STDERR, + "%s -%c: nickname is required for this command (-n).\n", + progName, commandToRun); + return 255; + } + + /* -A, -E, -M, -S require trust */ + if ((certutil.commands[cmd_AddCert].activated || + certutil.commands[cmd_AddEmailCert].activated || + certutil.commands[cmd_ModifyCertTrust].activated || + certutil.commands[cmd_CreateAndAddCert].activated) && + !certutil.options[opt_Trust].activated) { + PR_fprintf(PR_STDERR, + "%s -%c: trust is required for this command (-t).\n", + progName, commandToRun); + return 255; + } + + /* if -L is given raw, ascii or dump mode, it must be for only one cert. */ + if (certutil.commands[cmd_ListCerts].activated && + (certutil.options[opt_ASCIIForIO].activated || + certutil.options[opt_DumpExtensionValue].activated || + certutil.options[opt_BinaryDER].activated) && + !certutil.options[opt_Nickname].activated) { + PR_fprintf(PR_STDERR, + "%s: nickname is required to dump cert in raw or ascii mode.\n", + progName); + return 255; + } + + /* -L can only be in (raw || ascii). */ + if (certutil.commands[cmd_ListCerts].activated && + certutil.options[opt_ASCIIForIO].activated && + certutil.options[opt_BinaryDER].activated) { + PR_fprintf(PR_STDERR, + "%s: cannot specify both -r and -a when dumping cert.\n", + progName); + return 255; + } + + /* If making a cert request, need a subject. */ + if ((certutil.commands[cmd_CertReq].activated || + certutil.commands[cmd_CreateAndAddCert].activated) && + !(certutil.options[opt_Subject].activated || keysource)) { + PR_fprintf(PR_STDERR, + "%s -%c: subject is required to create a cert request.\n", + progName, commandToRun); + return 255; + } + + /* If making a cert, need a serial number. */ + if ((certutil.commands[cmd_CreateNewCert].activated || + certutil.commands[cmd_CreateAndAddCert].activated) && + !certutil.options[opt_SerialNumber].activated) { + /* Make a default serial number from the current time. */ + PRTime now = PR_Now(); + LL_USHR(now, now, 19); + LL_L2UI(serialNumber, now); + } + + /* Validation needs the usage to validate for. */ + if (certutil.commands[cmd_CheckCertValidity].activated && + !certutil.options[opt_Usage].activated) { + PR_fprintf(PR_STDERR, + "%s -V: specify a usage to validate the cert for (-u).\n", + progName); + return 255; + } + + /* Rename needs an old and a new nickname */ + if (certutil.commands[cmd_Rename].activated && + !(certutil.options[opt_Nickname].activated && + certutil.options[opt_NewNickname].activated)) { + + PR_fprintf(PR_STDERR, + "%s --rename: specify an old nickname (-n) and\n" + " a new nickname (--new-n).\n", + progName); + return 255; + } + + /* Delete needs a nickname or a key ID */ + if (certutil.commands[cmd_DeleteKey].activated && + !(certutil.options[opt_Nickname].activated || keysource)) { + PR_fprintf(PR_STDERR, + "%s -%c: specify a nickname (-n) or\n" + " a key ID (-k).\n", + progName, commandToRun); + return 255; + } + + /* Upgrade/Merge needs a source database and a upgrade id. */ + if (certutil.commands[cmd_UpgradeMerge].activated && + !(certutil.options[opt_SourceDir].activated && + certutil.options[opt_UpgradeID].activated)) { + + PR_fprintf(PR_STDERR, + "%s --upgrade-merge: specify an upgrade database directory " + "(--source-dir) and\n" + " an upgrade ID (--upgrade-id).\n", + progName); + return 255; + } + + /* Merge needs a source database */ + if (certutil.commands[cmd_Merge].activated && + !certutil.options[opt_SourceDir].activated) { + + PR_fprintf(PR_STDERR, + "%s --merge: specify an source database directory " + "(--source-dir)\n", + progName); + return 255; + } + + /* To make a cert, need either a issuer or to self-sign it. */ + if (certutil.commands[cmd_CreateAndAddCert].activated && + !(certutil.options[opt_IssuerName].activated || + certutil.options[opt_SelfSign].activated)) { + PR_fprintf(PR_STDERR, + "%s -S: must specify issuer (-c) or self-sign (-x).\n", + progName); + return 255; + } + + /* Using slotname == NULL for listing keys and certs on all slots, + * but only that. */ + if (!(certutil.commands[cmd_ListKeys].activated || + certutil.commands[cmd_DumpChain].activated || + certutil.commands[cmd_ListCerts].activated) && + slotname == NULL) { + PR_fprintf(PR_STDERR, + "%s -%c: cannot use \"-h all\" for this command.\n", + progName, commandToRun); + return 255; + } + + /* Using keytype == nullKey for list all key types, but only that. */ + if (!certutil.commands[cmd_ListKeys].activated && keytype == nullKey) { + PR_fprintf(PR_STDERR, + "%s -%c: cannot use \"-k all\" for this command.\n", + progName, commandToRun); + return 255; + } + + /* Open the input file. */ + if (certutil.options[opt_InputFile].activated) { + inFile = PR_Open(certutil.options[opt_InputFile].arg, PR_RDONLY, 0); + if (!inFile) { + PR_fprintf(PR_STDERR, + "%s: unable to open \"%s\" for reading (%ld, %ld).\n", + progName, certutil.options[opt_InputFile].arg, + PR_GetError(), PR_GetOSError()); + return 255; + } + } + + /* Open the output file. */ + if (certutil.options[opt_OutputFile].activated) { + outFile = PR_Open(certutil.options[opt_OutputFile].arg, + PR_CREATE_FILE | PR_RDWR | PR_TRUNCATE, 00660); + if (!outFile) { + PR_fprintf(PR_STDERR, + "%s: unable to open \"%s\" for writing (%ld, %ld).\n", + progName, certutil.options[opt_OutputFile].arg, + PR_GetError(), PR_GetOSError()); + return 255; + } + } + + name = SECU_GetOptionArg(&certutil, opt_Nickname); + newName = SECU_GetOptionArg(&certutil, opt_NewNickname); + email = SECU_GetOptionArg(&certutil, opt_Emailaddress); + + PK11_SetPasswordFunc(SECU_GetModulePassword); + + if (PR_TRUE == initialize) { + /* Initialize NSPR and NSS. */ + PR_Init(PR_SYSTEM_THREAD, PR_PRIORITY_NORMAL, 1); + if (!certutil.commands[cmd_UpgradeMerge].activated) { + rv = NSS_Initialize(SECU_ConfigDirectory(NULL), + certPrefix, certPrefix, + "secmod.db", readOnly ? NSS_INIT_READONLY : 0); + } else { + rv = NSS_InitWithMerge(SECU_ConfigDirectory(NULL), + certPrefix, certPrefix, "secmod.db", + sourceDir, srcCertPrefix, srcCertPrefix, + upgradeID, upgradeTokenName, + readOnly ? NSS_INIT_READONLY : 0); + } + if (rv != SECSuccess) { + SECU_PrintPRandOSError(progName); + rv = SECFailure; + goto shutdown; + } + initialized = PR_TRUE; + SECU_RegisterDynamicOids(); + /* Ensure the SSL error code table has been registered. Bug 1460284. */ + SSL_OptionSetDefault(-1, 0); + } + certHandle = CERT_GetDefaultCertDB(); + + if (certutil.commands[cmd_Version].activated) { + printf("Certificate database content version: command not implemented.\n"); + } + + if (PL_strcmp(slotname, "internal") == 0) + slot = PK11_GetInternalKeySlot(); + else if (slotname != NULL) + slot = PK11_FindSlotByName(slotname); + + if (!slot && (certutil.commands[cmd_NewDBs].activated || + certutil.commands[cmd_ModifyCertTrust].activated || + certutil.commands[cmd_ChangePassword].activated || + certutil.commands[cmd_TokenReset].activated || + certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_AddCert].activated || + certutil.commands[cmd_Merge].activated || + certutil.commands[cmd_UpgradeMerge].activated || + certutil.commands[cmd_AddEmailCert].activated)) { + + SECU_PrintError(progName, "could not find the slot %s", slotname); + rv = SECFailure; + goto shutdown; + } + + /* If creating new database, initialize the password. */ + if (certutil.commands[cmd_NewDBs].activated) { + if (certutil.options[opt_EmptyPassword].activated && (PK11_NeedUserInit(slot))) { + rv = PK11_InitPin(slot, (char *)NULL, ""); + } else { + rv = SECU_ChangePW2(slot, 0, 0, certutil.options[opt_PasswordFile].arg, + certutil.options[opt_NewPasswordFile].arg); + } + if (rv != SECSuccess) { + SECU_PrintError(progName, "Could not set password for the slot"); + goto shutdown; + } + } + + /* if we are going to modify the cert database, + * make sure it's initialized */ + if (certutil.commands[cmd_ModifyCertTrust].activated || + certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_AddCert].activated || + certutil.commands[cmd_AddEmailCert].activated) { + if (PK11_NeedLogin(slot) && PK11_NeedUserInit(slot)) { + char *password = NULL; + /* fetch the password from the command line or the file + * if no password is supplied, initialize the password to NULL */ + if (pwdata.source == PW_FROMFILE) { + password = SECU_FilePasswd(slot, PR_FALSE, pwdata.data); + } else if (pwdata.source == PW_PLAINTEXT) { + password = PL_strdup(pwdata.data); + } + rv = PK11_InitPin(slot, (char *)NULL, password ? password : ""); + if (password) { + PORT_Memset(password, 0, PL_strlen(password)); + PORT_Free(password); + } + if (rv != SECSuccess) { + SECU_PrintError(progName, "Could not set password for the slot"); + goto shutdown; + } + } + } + + /* walk through the upgrade merge if necessary. + * This option is more to test what some applications will want to do + * to do an automatic upgrade. The --merge command is more useful for + * the general case where 2 database need to be merged together. + */ + if (certutil.commands[cmd_UpgradeMerge].activated) { + if (*upgradeTokenName == 0) { + upgradeTokenName = upgradeID; + } + if (!PK11_IsInternal(slot)) { + fprintf(stderr, "Only internal DB's can be upgraded\n"); + rv = SECSuccess; + goto shutdown; + } + if (!PK11_IsRemovable(slot)) { + printf("database already upgraded.\n"); + rv = SECSuccess; + goto shutdown; + } + if (!PK11_NeedLogin(slot)) { + printf("upgrade complete!\n"); + rv = SECSuccess; + goto shutdown; + } + /* authenticate to the old DB if necessary */ + if (PORT_Strcmp(PK11_GetTokenName(slot), upgradeTokenName) == 0) { + /* if we need a password, supply it. This will be the password + * for the old database */ + rv = PK11_Authenticate(slot, PR_FALSE, &pwdata2); + if (rv != SECSuccess) { + SECU_PrintError(progName, "Could not get password for %s", + upgradeTokenName); + goto shutdown; + } + /* + * if we succeeded above, but still aren't logged in, that means + * we just supplied the password for the old database. We may + * need the password for the new database. NSS will automatically + * change the token names at this point + */ + if (PK11_IsLoggedIn(slot, &pwdata)) { + printf("upgrade complete!\n"); + rv = SECSuccess; + goto shutdown; + } + } + + /* call PK11_IsPresent to update our cached token information */ + if (!PK11_IsPresent(slot)) { + /* this shouldn't happen. We call isPresent to force a token + * info update */ + fprintf(stderr, "upgrade/merge internal error\n"); + rv = SECFailure; + goto shutdown; + } + + /* the token is now set to the state of the source database, + * if we need a password for it, PK11_Authenticate will + * automatically prompt us */ + rv = PK11_Authenticate(slot, PR_FALSE, &pwdata); + if (rv == SECSuccess) { + printf("upgrade complete!\n"); + } else { + SECU_PrintError(progName, "Could not get password for %s", + PK11_GetTokenName(slot)); + } + goto shutdown; + } + + /* + * merge 2 databases. + */ + if (certutil.commands[cmd_Merge].activated) { + PK11SlotInfo *sourceSlot = NULL; + PK11MergeLog *log; + char *modspec = PR_smprintf( + "configDir='%s' certPrefix='%s' tokenDescription='%s'", + sourceDir, srcCertPrefix, + *upgradeTokenName ? upgradeTokenName : "Source Database"); + + if (!modspec) { + rv = SECFailure; + goto shutdown; + } + + sourceSlot = SECMOD_OpenUserDB(modspec); + PR_smprintf_free(modspec); + if (!sourceSlot) { + SECU_PrintError(progName, "couldn't open source database"); + rv = SECFailure; + goto shutdown; + } + + rv = PK11_Authenticate(slot, PR_FALSE, &pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, "Couldn't get password for %s", + PK11_GetTokenName(slot)); + goto merge_fail; + } + + rv = PK11_Authenticate(sourceSlot, PR_FALSE, &pwdata2); + if (rv != SECSuccess) { + SECU_PrintError(progName, "Couldn't get password for %s", + PK11_GetTokenName(sourceSlot)); + goto merge_fail; + } + + log = PK11_CreateMergeLog(); + if (!log) { + rv = SECFailure; + SECU_PrintError(progName, "couldn't create error log"); + goto merge_fail; + } + + rv = PK11_MergeTokens(slot, sourceSlot, log, &pwdata, &pwdata2); + if (rv != SECSuccess) { + DumpMergeLog(progName, log); + } + PK11_DestroyMergeLog(log); + + merge_fail: + SECMOD_CloseUserDB(sourceSlot); + PK11_FreeSlot(sourceSlot); + goto shutdown; + } + + /* The following 8 options are mutually exclusive with all others. */ + + /* List certs (-L) */ + if (certutil.commands[cmd_ListCerts].activated) { + if (certutil.options[opt_DumpExtensionValue].activated) { + const char *oid_str; + SECItem oid_item; + SECStatus srv; + oid_item.data = NULL; + oid_item.len = 0; + oid_str = certutil.options[opt_DumpExtensionValue].arg; + srv = GetOidFromString(NULL, &oid_item, oid_str, strlen(oid_str)); + if (srv != SECSuccess) { + SECU_PrintError(progName, "malformed extension OID %s", + oid_str); + goto shutdown; + } + rv = ListCerts(certHandle, name, email, slot, + PR_TRUE /*binary*/, PR_FALSE /*ascii*/, + &oid_item, + outFile, &pwdata); + SECITEM_FreeItem(&oid_item, PR_FALSE); + } else { + rv = ListCerts(certHandle, name, email, slot, + certutil.options[opt_BinaryDER].activated, + certutil.options[opt_ASCIIForIO].activated, + NULL, outFile, &pwdata); + } + goto shutdown; + } + if (certutil.commands[cmd_DumpChain].activated) { + rv = DumpChain(certHandle, name, + certutil.options[opt_ASCIIForIO].activated, + certutil.options[opt_SimpleSelfSigned].activated); + goto shutdown; + } + /* XXX needs work */ + /* List keys (-K) */ + if (certutil.commands[cmd_ListKeys].activated) { + rv = ListKeys(slot, name, 0 /*keyindex*/, keytype, PR_FALSE /*dopriv*/, + &pwdata); + goto shutdown; + } + /* List modules (-U) */ + if (certutil.commands[cmd_ListModules].activated) { + rv = ListModules(); + goto shutdown; + } + /* Delete cert (-D) */ + if (certutil.commands[cmd_DeleteCert].activated) { + rv = DeleteCert(certHandle, name, &pwdata); + goto shutdown; + } + /* Rename cert (--rename) */ + if (certutil.commands[cmd_Rename].activated) { + rv = RenameCert(certHandle, name, newName, &pwdata); + goto shutdown; + } + /* Delete key (-F) */ + if (certutil.commands[cmd_DeleteKey].activated) { + if (certutil.options[opt_Nickname].activated) { + rv = DeleteCertAndKey(name, &pwdata); + } else { + privkey = findPrivateKeyByID(slot, keysource, &pwdata); + if (!privkey) { + SECU_PrintError(progName, "%s is not a key-id", keysource); + rv = SECFailure; + } else { + rv = DeleteKey(privkey, &pwdata); + /* already destroyed by PK11_DeleteTokenPrivateKey */ + privkey = NULL; + } + } + goto shutdown; + } + /* Modify trust attribute for cert (-M) */ + if (certutil.commands[cmd_ModifyCertTrust].activated) { + rv = ChangeTrustAttributes(certHandle, slot, name, + certutil.options[opt_Trust].arg, &pwdata); + goto shutdown; + } + /* Change key db password (-W) (future - change pw to slot?) */ + if (certutil.commands[cmd_ChangePassword].activated) { + rv = SECU_ChangePW2(slot, 0, 0, certutil.options[opt_PasswordFile].arg, + certutil.options[opt_NewPasswordFile].arg); + if (rv != SECSuccess) { + SECU_PrintError(progName, "Could not set password for the slot"); + goto shutdown; + } + } + /* Reset the a token */ + if (certutil.commands[cmd_TokenReset].activated) { + char *sso_pass = ""; + + if (certutil.options[opt_SSOPass].activated) { + sso_pass = certutil.options[opt_SSOPass].arg; + } + rv = PK11_ResetToken(slot, sso_pass); + + goto shutdown; + } + /* Check cert validity against current time (-V) */ + if (certutil.commands[cmd_CheckCertValidity].activated) { + /* XXX temporary hack for fips - must log in to get priv key */ + if (certutil.options[opt_VerifySig].activated) { + if (slot && PK11_NeedLogin(slot)) { + SECStatus newrv = PK11_Authenticate(slot, PR_TRUE, &pwdata); + if (newrv != SECSuccess) { + SECU_PrintError(progName, "could not authenticate to token %s.", + PK11_GetTokenName(slot)); + goto shutdown; + } + } + } + rv = ValidateCert(certHandle, name, + certutil.options[opt_ValidityTime].arg, + certutil.options[opt_Usage].arg, + certutil.options[opt_VerifySig].activated, + certutil.options[opt_DetailedInfo].activated, + certutil.options[opt_ASCIIForIO].activated, + &pwdata); + if (rv != SECSuccess && PR_GetError() == SEC_ERROR_INVALID_ARGS) + SECU_PrintError(progName, "validation failed"); + goto shutdown; + } + + /* + * Key generation + */ + + /* These commands may require keygen. */ + if (certutil.commands[cmd_CertReq].activated || + certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_GenKeyPair].activated) { + if (keysource) { + CERTCertificate *keycert; + keycert = CERT_FindCertByNicknameOrEmailAddr(certHandle, keysource); + if (!keycert) { + keycert = PK11_FindCertFromNickname(keysource, NULL); + } + + if (keycert) { + privkey = PK11_FindKeyByDERCert(slot, keycert, &pwdata); + } else { + /* Interpret keysource as CKA_ID */ + privkey = findPrivateKeyByID(slot, keysource, &pwdata); + } + + if (!privkey) { + SECU_PrintError( + progName, + "%s is neither a key-type nor a nickname nor a key-id", keysource); + return SECFailure; + } + + pubkey = SECKEY_ConvertToPublicKey(privkey); + if (!pubkey) { + SECU_PrintError(progName, + "Could not get keys from cert %s", keysource); + if (keycert) { + CERT_DestroyCertificate(keycert); + } + rv = SECFailure; + goto shutdown; + } + keytype = privkey->keyType; + + /* On CertReq for renewal if no subject has been + * specified obtain it from the certificate. + */ + if (certutil.commands[cmd_CertReq].activated && !subject) { + if (keycert) { + subject = CERT_AsciiToName(keycert->subjectName); + if (!subject) { + SECU_PrintError( + progName, + "Could not get subject from certificate %s", + keysource); + CERT_DestroyCertificate(keycert); + rv = SECFailure; + goto shutdown; + } + } else { + SECU_PrintError(progName, "Subject name not provided"); + rv = SECFailure; + goto shutdown; + } + } + if (keycert) { + CERT_DestroyCertificate(keycert); + } + } else { + privkey = + CERTUTIL_GeneratePrivateKey(keytype, slot, keysize, + publicExponent, + certutil.options[opt_NoiseFile].arg, + &pubkey, + certutil.options[opt_PQGFile].arg, + keyAttrFlags, + keyOpFlagsOn, + keyOpFlagsOff, + &pwdata); + if (privkey == NULL) { + SECU_PrintError(progName, "unable to generate key(s)\n"); + rv = SECFailure; + goto shutdown; + } + } + privkey->wincx = &pwdata; + PORT_Assert(pubkey != NULL); + + /* If all that was needed was keygen, exit. */ + if (certutil.commands[cmd_GenKeyPair].activated) { + rv = SECSuccess; + goto shutdown; + } + } + + if (certutil.options[opt_Pss].activated) { + if (!certutil.commands[cmd_CertReq].activated && + !certutil.commands[cmd_CreateAndAddCert].activated) { + PR_fprintf(PR_STDERR, + "%s -%c: --pss only works with -R or -S.\n", + progName, commandToRun); + return 255; + } + if (keytype != rsaKey) { + PR_fprintf(PR_STDERR, + "%s -%c: --pss only works with RSA keys.\n", + progName, commandToRun); + return 255; + } + } + + /* --pss-sign is to sign a certificate with RSA-PSS, even if the + * issuer's key is an RSA key. If the key is an RSA-PSS key, the + * generated signature is always RSA-PSS. */ + if (certutil.options[opt_PssSign].activated) { + if (!certutil.commands[cmd_CreateNewCert].activated && + !certutil.commands[cmd_CreateAndAddCert].activated) { + PR_fprintf(PR_STDERR, + "%s -%c: --pss-sign only works with -C or -S.\n", + progName, commandToRun); + return 255; + } + if (keytype != rsaKey) { + PR_fprintf(PR_STDERR, + "%s -%c: --pss-sign only works with RSA keys.\n", + progName, commandToRun); + return 255; + } + } + + if (certutil.options[opt_SimpleSelfSigned].activated && + !certutil.commands[cmd_DumpChain].activated) { + PR_fprintf(PR_STDERR, + "%s -%c: --simple-self-signed only works with -O.\n", + progName, commandToRun); + return 255; + } + + /* If we need a list of extensions convert the flags into list format */ + if (certutil.commands[cmd_CertReq].activated || + certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_CreateNewCert].activated) { + certutil_extns[ext_keyUsage].activated = + certutil.options[opt_AddCmdKeyUsageExt].activated; + if (!certutil_extns[ext_keyUsage].activated) { + certutil_extns[ext_keyUsage].activated = + certutil.options[opt_AddKeyUsageExt].activated; + } else { + certutil_extns[ext_keyUsage].arg = + certutil.options[opt_AddCmdKeyUsageExt].arg; + } + certutil_extns[ext_basicConstraint].activated = + certutil.options[opt_AddBasicConstraintExt].activated; + certutil_extns[ext_nameConstraints].activated = + certutil.options[opt_AddNameConstraintsExt].activated; + certutil_extns[ext_authorityKeyID].activated = + certutil.options[opt_AddAuthorityKeyIDExt].activated; + certutil_extns[ext_subjectKeyID].activated = + certutil.options[opt_AddSubjectKeyIDExt].activated; + certutil_extns[ext_CRLDistPts].activated = + certutil.options[opt_AddCRLDistPtsExt].activated; + certutil_extns[ext_NSCertType].activated = + certutil.options[opt_AddCmdNSCertTypeExt].activated; + if (!certutil_extns[ext_NSCertType].activated) { + certutil_extns[ext_NSCertType].activated = + certutil.options[opt_AddNSCertTypeExt].activated; + } else { + certutil_extns[ext_NSCertType].arg = + certutil.options[opt_AddCmdNSCertTypeExt].arg; + } + + certutil_extns[ext_extKeyUsage].activated = + certutil.options[opt_AddCmdExtKeyUsageExt].activated; + if (!certutil_extns[ext_extKeyUsage].activated) { + certutil_extns[ext_extKeyUsage].activated = + certutil.options[opt_AddExtKeyUsageExt].activated; + } else { + certutil_extns[ext_extKeyUsage].arg = + certutil.options[opt_AddCmdExtKeyUsageExt].arg; + } + certutil_extns[ext_subjectAltName].activated = + certutil.options[opt_AddSubjectAltNameExt].activated; + if (certutil_extns[ext_subjectAltName].activated) { + certutil_extns[ext_subjectAltName].arg = + certutil.options[opt_AddSubjectAltNameExt].arg; + } + + certutil_extns[ext_authInfoAcc].activated = + certutil.options[opt_AddAuthInfoAccExt].activated; + certutil_extns[ext_subjInfoAcc].activated = + certutil.options[opt_AddSubjInfoAccExt].activated; + certutil_extns[ext_certPolicies].activated = + certutil.options[opt_AddCertPoliciesExt].activated; + certutil_extns[ext_policyMappings].activated = + certutil.options[opt_AddPolicyMapExt].activated; + certutil_extns[ext_policyConstr].activated = + certutil.options[opt_AddPolicyConstrExt].activated; + certutil_extns[ext_inhibitAnyPolicy].activated = + certutil.options[opt_AddInhibAnyExt].activated; + } + + /* -A -C or -E Read inFile */ + if (certutil.commands[cmd_CreateNewCert].activated || + certutil.commands[cmd_AddCert].activated || + certutil.commands[cmd_AddEmailCert].activated) { + PRBool isCreate = certutil.commands[cmd_CreateNewCert].activated; + rv = SECU_ReadDERFromFile(isCreate ? &certReqDER : &certDER, inFile, + certutil.options[opt_ASCIIForIO].activated, + PR_TRUE); + if (rv) + goto shutdown; + } + + /* + * Certificate request + */ + + /* Make a cert request (-R). */ + if (certutil.commands[cmd_CertReq].activated) { + rv = CertReq(privkey, pubkey, keytype, hashAlgTag, subject, + certutil.options[opt_PhoneNumber].arg, + certutil.options[opt_ASCIIForIO].activated, + certutil.options[opt_ExtendedEmailAddrs].arg, + certutil.options[opt_ExtendedDNSNames].arg, + certutil_extns, + (certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg + : NULL), + certutil.options[opt_Pss].activated, + &certReqDER); + if (rv) + goto shutdown; + privkey->wincx = &pwdata; + } + + /* + * Certificate creation + */ + + /* If making and adding a cert, create a cert request file first without + * any extensions, then load it with the command line extensions + * and output the cert to another file. + */ + if (certutil.commands[cmd_CreateAndAddCert].activated) { + static certutilExtnList nullextnlist = { { PR_FALSE, NULL } }; + rv = CertReq(privkey, pubkey, keytype, hashAlgTag, subject, + certutil.options[opt_PhoneNumber].arg, + PR_FALSE, /* do not BASE64-encode regardless of -a option */ + NULL, + NULL, + nullextnlist, + (certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg + : NULL), + certutil.options[opt_Pss].activated, + &certReqDER); + if (rv) + goto shutdown; + privkey->wincx = &pwdata; + } + + /* Create a certificate (-C or -S). */ + if (certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_CreateNewCert].activated) { + rv = CreateCert(certHandle, slot, + certutil.options[opt_IssuerName].arg, + &certReqDER, &privkey, &pwdata, hashAlgTag, + serialNumber, warpmonths, validityMonths, + certutil.options[opt_ExtendedEmailAddrs].arg, + certutil.options[opt_ExtendedDNSNames].arg, + certutil.options[opt_ASCIIForIO].activated && + certutil.commands[cmd_CreateNewCert].activated, + certutil.options[opt_SelfSign].activated, + certutil_extns, + (certutil.options[opt_GenericExtensions].activated ? certutil.options[opt_GenericExtensions].arg + : NULL), + certVersion, + certutil.options[opt_PssSign].activated, + &certDER); + if (rv) + goto shutdown; + } + + /* + * Adding a cert to the database (or slot) + */ + + /* -A -E or -S Add the cert to the DB */ + if (certutil.commands[cmd_CreateAndAddCert].activated || + certutil.commands[cmd_AddCert].activated || + certutil.commands[cmd_AddEmailCert].activated) { + if (strstr(certutil.options[opt_Trust].arg, "u")) { + fprintf(stderr, "Notice: Trust flag u is set automatically if the " + "private key is present.\n"); + } + rv = AddCert(slot, certHandle, name, + certutil.options[opt_Trust].arg, + &certDER, + certutil.commands[cmd_AddEmailCert].activated, &pwdata); + if (rv) + goto shutdown; + } + + if (certutil.commands[cmd_CertReq].activated || + certutil.commands[cmd_CreateNewCert].activated) { + SECItem *item = certutil.commands[cmd_CertReq].activated ? &certReqDER + : &certDER; + PRInt32 written = PR_Write(outFile, item->data, item->len); + if (written < 0 || (PRUint32)written != item->len) { + rv = SECFailure; + } + } + +shutdown: + if (slot) { + PK11_FreeSlot(slot); + } + if (privkey) { + SECKEY_DestroyPrivateKey(privkey); + } + if (pubkey) { + SECKEY_DestroyPublicKey(pubkey); + } + if (subject) { + CERT_DestroyName(subject); + } + if (name) { + PL_strfree(name); + } + if (newName) { + PL_strfree(newName); + } + if (inFile && inFile != PR_STDIN) { + PR_Close(inFile); + } + if (outFile && outFile != PR_STDOUT) { + PR_Close(outFile); + } + SECITEM_FreeItem(&certReqDER, PR_FALSE); + SECITEM_FreeItem(&certDER, PR_FALSE); + if (pwdata.data && pwdata.source == PW_PLAINTEXT) { + /* Allocated by a PL_strdup call in SECU_GetModulePassword. */ + PL_strfree(pwdata.data); + } + if (email) { + PL_strfree(email); + } + + /* Open the batch command file. + * + * - If -B option is specified, the contents in the + * command file will be interpreted as subsequent certutil + * commands to be executed in the current certutil process + * context after the current certutil command has been executed. + * - Each line in the command file consists of the command + * line arguments for certutil. + * - The -d option will be ignored if specified in the + * command file. + * - Quoting with double quote characters ("...") is supported + * to allow white space in a command line argument. The + * double quote character cannot be escaped and quoting cannot + * be nested in this version. + * - each line in the batch file is limited to 512 characters + */ + + if ((SECSuccess == rv) && certutil.commands[cmd_Batch].activated) { + FILE *batchFile = NULL; + char *nextcommand = NULL; + PRInt32 cmd_len = 0, buf_size = 0; + static const int increment = 512; + + if (!certutil.options[opt_InputFile].activated || + !certutil.options[opt_InputFile].arg) { + PR_fprintf(PR_STDERR, + "%s: no batch input file specified.\n", + progName); + return 255; + } + batchFile = fopen(certutil.options[opt_InputFile].arg, "r"); + if (!batchFile) { + PR_fprintf(PR_STDERR, + "%s: unable to open \"%s\" for reading (%ld, %ld).\n", + progName, certutil.options[opt_InputFile].arg, + PR_GetError(), PR_GetOSError()); + return 255; + } + /* read and execute command-lines in a loop */ + while (SECSuccess == rv) { + PRBool invalid = PR_FALSE; + int newargc = 2; + char *space = NULL; + char *nextarg = NULL; + char **newargv = NULL; + char *crlf; + + if (cmd_len + increment > buf_size) { + char *new_buf; + buf_size += increment; + new_buf = PORT_Realloc(nextcommand, buf_size); + if (!new_buf) { + PR_fprintf(PR_STDERR, "%s: PORT_Realloc(%ld) failed\n", + progName, buf_size); + break; + } + nextcommand = new_buf; + nextcommand[cmd_len] = '\0'; + } + if (!fgets(nextcommand + cmd_len, buf_size - cmd_len, batchFile)) { + break; + } + crlf = PORT_Strrchr(nextcommand, '\n'); + if (crlf) { + *crlf = '\0'; + } + cmd_len = strlen(nextcommand); + if (cmd_len && nextcommand[cmd_len - 1] == '\\') { + nextcommand[--cmd_len] = '\0'; + continue; + } + + /* we now need to split the command into argc / argv format */ + + newargv = PORT_Alloc(sizeof(char *) * (newargc + 1)); + newargv[0] = progName; + newargv[1] = nextcommand; + nextarg = nextcommand; + while ((space = PORT_Strpbrk(nextarg, " \f\n\r\t\v"))) { + while (isspace(*space)) { + *space = '\0'; + space++; + } + if (*space == '\0') { + break; + } else if (*space != '\"') { + nextarg = space; + } else { + char *closingquote = strchr(space + 1, '\"'); + if (closingquote) { + *closingquote = '\0'; + space++; + nextarg = closingquote + 1; + } else { + invalid = PR_TRUE; + nextarg = space; + } + } + newargc++; + newargv = PORT_Realloc(newargv, sizeof(char *) * (newargc + 1)); + newargv[newargc - 1] = space; + } + newargv[newargc] = NULL; + + /* invoke next command */ + if (PR_TRUE == invalid) { + PR_fprintf(PR_STDERR, "Missing closing quote in batch command :\n%s\nNot executed.\n", + nextcommand); + rv = SECFailure; + } else { + if (0 != certutil_main(newargc, newargv, PR_FALSE)) + rv = SECFailure; + } + PORT_Free(newargv); + cmd_len = 0; + nextcommand[0] = '\0'; + } + PORT_Free(nextcommand); + fclose(batchFile); + } + + if ((initialized == PR_TRUE) && NSS_Shutdown() != SECSuccess) { + exit(1); + } + if (rv == SECSuccess) { + return 0; + } else { + return 255; + } +} + +int +main(int argc, char **argv) +{ + int rv = certutil_main(argc, argv, PR_TRUE); + PL_ArenaFinish(); + PR_Cleanup(); + return rv; +} diff --git a/security/nss/cmd/certutil/certutil.gyp b/security/nss/cmd/certutil/certutil.gyp new file mode 100644 index 0000000000..d8f1b5d4c9 --- /dev/null +++ b/security/nss/cmd/certutil/certutil.gyp @@ -0,0 +1,32 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +{ + 'includes': [ + '../../coreconf/config.gypi', + '../../cmd/platlibs.gypi' + ], + 'targets': [ + { + 'target_name': 'certutil', + 'type': 'executable', + 'sources': [ + 'certext.c', + 'certutil.c', + 'keystuff.c' + ], + 'dependencies': [ + '<(DEPTH)/exports.gyp:dbm_exports', + '<(DEPTH)/exports.gyp:nss_exports' + ] + } + ], + 'target_defaults': { + 'defines': [ + 'NSPR20' + ] + }, + 'variables': { + 'module': 'nss' + } +} \ No newline at end of file diff --git a/security/nss/cmd/certutil/certutil.h b/security/nss/cmd/certutil/certutil.h new file mode 100644 index 0000000000..565587264d --- /dev/null +++ b/security/nss/cmd/certutil/certutil.h @@ -0,0 +1,57 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef _CERTUTIL_H +#define _CERTUTIL_H + +extern SECKEYPrivateKey * +CERTUTIL_GeneratePrivateKey(KeyType keytype, + PK11SlotInfo *slot, + int rsasize, + int publicExponent, + char *noise, + SECKEYPublicKey **pubkeyp, + char *pqgFile, + PK11AttrFlags attrFlags, + CK_FLAGS opFlagsOn, + CK_FLAGS opFlagsOff, + secuPWData *pwdata); + +extern char *progName; + +enum certutilExtns { + ext_keyUsage = 0, + ext_basicConstraint, + ext_authorityKeyID, + ext_CRLDistPts, + ext_NSCertType, + ext_extKeyUsage, + ext_authInfoAcc, + ext_subjInfoAcc, + ext_certPolicies, + ext_policyMappings, + ext_policyConstr, + ext_inhibitAnyPolicy, + ext_subjectKeyID, + ext_nameConstraints, + ext_subjectAltName, + ext_End +}; + +typedef struct ExtensionEntryStr { + PRBool activated; + const char *arg; +} ExtensionEntry; + +typedef ExtensionEntry certutilExtnList[ext_End]; + +extern SECStatus +AddExtensions(void *extHandle, const char *emailAddrs, const char *dnsNames, + certutilExtnList extList, const char *extGeneric); + +extern SECStatus +GetOidFromString(PLArenaPool *arena, SECItem *to, + const char *from, size_t fromLen); + +#endif /* _CERTUTIL_H */ diff --git a/security/nss/cmd/certutil/keystuff.c b/security/nss/cmd/certutil/keystuff.c new file mode 100644 index 0000000000..9b96bce911 --- /dev/null +++ b/security/nss/cmd/certutil/keystuff.c @@ -0,0 +1,595 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include +#include +#include "secutil.h" + +#if defined(XP_UNIX) +#include +#include +#include +#endif + +#if defined(XP_WIN) || defined(XP_PC) +#include +#include +#endif + +#include "nspr.h" +#include "prtypes.h" +#include "prtime.h" +#include "prlong.h" + +#include "pk11func.h" + +#define NUM_KEYSTROKES 120 +#define RAND_BUF_SIZE 60 + +#define ERROR_BREAK \ + rv = SECFailure; \ + break; + +const SEC_ASN1Template SECKEY_PQGParamsTemplate[] = { + { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(SECKEYPQGParams) }, + { SEC_ASN1_INTEGER, offsetof(SECKEYPQGParams, prime) }, + { SEC_ASN1_INTEGER, offsetof(SECKEYPQGParams, subPrime) }, + { SEC_ASN1_INTEGER, offsetof(SECKEYPQGParams, base) }, + { 0 } +}; + +/* returns 0 for success, -1 for failure (EOF encountered) */ +static int +UpdateRNG(void) +{ + char randbuf[RAND_BUF_SIZE]; +#ifdef XP_UNIX + int fd; +#endif + int c; + int rv = 0; + size_t count; +#ifdef XP_UNIX + cc_t orig_cc_min; + cc_t orig_cc_time; + tcflag_t orig_lflag; + struct termios tio; +#endif + char meter[] = { + "\r| |" + }; + +#define FPS fprintf(stderr, + FPS "\n"); + FPS "A random seed must be generated that will be used in the\n"); + FPS "creation of your key. One of the easiest ways to create a\n"); + FPS "random seed is to use the timing of keystrokes on a keyboard.\n"); + FPS "\n"); + FPS "To begin, type keys on the keyboard until this progress meter\n"); + FPS "is full. DO NOT USE THE AUTOREPEAT FUNCTION ON YOUR KEYBOARD!\n"); + FPS "\n"); + FPS "\n"); + FPS "Continue typing until the progress meter is full:\n\n"); + FPS "%s", meter); + FPS "\r|"); + +#if defined(XP_UNIX) + /* turn off echo on stdin & return on 1 char instead of NL */ + fd = fileno(stdin); + + tcgetattr(fd, &tio); + orig_lflag = tio.c_lflag; + orig_cc_min = tio.c_cc[VMIN]; + orig_cc_time = tio.c_cc[VTIME]; + tio.c_lflag &= ~ECHO; + tio.c_lflag &= ~ICANON; + tio.c_cc[VMIN] = 1; + tio.c_cc[VTIME] = 0; + tcsetattr(fd, TCSAFLUSH, &tio); +#endif + + /* Get random noise from keyboard strokes */ + count = 0; + while (count < sizeof randbuf) { +#if defined(XP_UNIX) + c = getc(stdin); +#else + c = getch(); +#endif + if (c == EOF) { + rv = -1; + break; + } + randbuf[count] = c; + if (count == 0 || c != randbuf[count - 1]) { + count++; + FPS "*"); + } + } + PK11_RandomUpdate(randbuf, sizeof randbuf); + memset(randbuf, 0, sizeof randbuf); + + FPS "\n\n"); + FPS "Finished. Press enter to continue: "); + while ((c = getc(stdin)) != '\n' && c != EOF) + ; + if (c == EOF) + rv = -1; + FPS "\n"); + +#undef FPS + +#if defined(XP_UNIX) + /* set back termio the way it was */ + tio.c_lflag = orig_lflag; + tio.c_cc[VMIN] = orig_cc_min; + tio.c_cc[VTIME] = orig_cc_time; + tcsetattr(fd, TCSAFLUSH, &tio); +#endif + return rv; +} + +static const unsigned char P[] = { 0, + 0xc6, 0x2a, 0x47, 0x73, 0xea, 0x78, 0xfa, 0x65, + 0x47, 0x69, 0x39, 0x10, 0x08, 0x55, 0x6a, 0xdd, + 0xbf, 0x77, 0xe1, 0x9a, 0x69, 0x73, 0xba, 0x66, + 0x37, 0x08, 0x93, 0x9e, 0xdb, 0x5d, 0x01, 0x08, + 0xb8, 0x3a, 0x73, 0xe9, 0x85, 0x5f, 0xa7, 0x2b, + 0x63, 0x7f, 0xd0, 0xc6, 0x4c, 0xdc, 0xfc, 0x8b, + 0xa6, 0x03, 0xc9, 0x9c, 0x80, 0x5e, 0xec, 0xc6, + 0x21, 0x23, 0xf7, 0x8e, 0xa4, 0x7b, 0x77, 0x83, + 0x02, 0x44, 0xf8, 0x05, 0xd7, 0x36, 0x52, 0x13, + 0x57, 0x78, 0x97, 0xf3, 0x7b, 0xcf, 0x1f, 0xc9, + 0x2a, 0xa4, 0x71, 0x9d, 0xa8, 0xd8, 0x5d, 0xc5, + 0x3b, 0x64, 0x3a, 0x72, 0x60, 0x62, 0xb0, 0xb8, + 0xf3, 0xb1, 0xe7, 0xb9, 0x76, 0xdf, 0x74, 0xbe, + 0x87, 0x6a, 0xd2, 0xf1, 0xa9, 0x44, 0x8b, 0x63, + 0x76, 0x4f, 0x5d, 0x21, 0x63, 0xb5, 0x4f, 0x3c, + 0x7b, 0x61, 0xb2, 0xf3, 0xea, 0xc5, 0xd8, 0xef, + 0x30, 0x50, 0x59, 0x33, 0x61, 0xc0, 0xf3, 0x6e, + 0x21, 0xcf, 0x15, 0x35, 0x4a, 0x87, 0x2b, 0xc3, + 0xf6, 0x5a, 0x1f, 0x24, 0x22, 0xc5, 0xeb, 0x47, + 0x34, 0x4a, 0x1b, 0xb5, 0x2e, 0x71, 0x52, 0x8f, + 0x2d, 0x7d, 0xa9, 0x96, 0x8a, 0x7c, 0x61, 0xdb, + 0xc0, 0xdc, 0xf1, 0xca, 0x28, 0x69, 0x1c, 0x97, + 0xad, 0xea, 0x0d, 0x9e, 0x02, 0xe6, 0xe5, 0x7d, + 0xad, 0xe0, 0x42, 0x91, 0x4d, 0xfa, 0xe2, 0x81, + 0x16, 0x2b, 0xc2, 0x96, 0x3b, 0x32, 0x8c, 0x20, + 0x69, 0x8b, 0x5b, 0x17, 0x3c, 0xf9, 0x13, 0x6c, + 0x98, 0x27, 0x1c, 0xca, 0xcf, 0x33, 0xaa, 0x93, + 0x21, 0xaf, 0x17, 0x6e, 0x5e, 0x00, 0x37, 0xd9, + 0x34, 0x8a, 0x47, 0xd2, 0x1c, 0x67, 0x32, 0x60, + 0xb6, 0xc7, 0xb0, 0xfd, 0x32, 0x90, 0x93, 0x32, + 0xaa, 0x11, 0xba, 0x23, 0x19, 0x39, 0x6a, 0x42, + 0x7c, 0x1f, 0xb7, 0x28, 0xdb, 0x64, 0xad, 0xd9 }; +static const unsigned char Q[] = { 0, + 0xe6, 0xa3, 0xc9, 0xc6, 0x51, 0x92, 0x8b, 0xb3, + 0x98, 0x8f, 0x97, 0xb8, 0x31, 0x0d, 0x4a, 0x03, + 0x1e, 0xba, 0x4e, 0xe6, 0xc8, 0x90, 0x98, 0x1d, + 0x3a, 0x95, 0xf4, 0xf1 }; +static const unsigned char G[] = { + 0x70, 0x32, 0x58, 0x5d, 0xb3, 0xbf, 0xc3, 0x62, + 0x63, 0x0b, 0xf8, 0xa5, 0xe1, 0xed, 0xeb, 0x79, + 0xac, 0x18, 0x41, 0x64, 0xb3, 0xda, 0x4c, 0xa7, + 0x92, 0x63, 0xb1, 0x33, 0x7c, 0xcb, 0x43, 0xdc, + 0x1f, 0x38, 0x63, 0x5e, 0x0e, 0x6d, 0x45, 0xd1, + 0xc9, 0x67, 0xf3, 0xcf, 0x3d, 0x2d, 0x16, 0x4e, + 0x92, 0x16, 0x06, 0x59, 0x29, 0x89, 0x6f, 0x54, + 0xff, 0xc5, 0x71, 0xc8, 0x3a, 0x95, 0x84, 0xb6, + 0x7e, 0x7b, 0x1e, 0x8b, 0x47, 0x9d, 0x7a, 0x3a, + 0x36, 0x9b, 0x70, 0x2f, 0xd1, 0xbd, 0xef, 0xe8, + 0x3a, 0x41, 0xd4, 0xf3, 0x1f, 0x81, 0xc7, 0x1f, + 0x96, 0x7c, 0x30, 0xab, 0xf4, 0x7a, 0xac, 0x93, + 0xed, 0x6f, 0x67, 0xb0, 0xc9, 0x5b, 0xf3, 0x83, + 0x9d, 0xa0, 0xd7, 0xb9, 0x01, 0xed, 0x28, 0xae, + 0x1c, 0x6e, 0x2e, 0x48, 0xac, 0x9f, 0x7d, 0xf3, + 0x00, 0x48, 0xee, 0x0e, 0xfb, 0x7e, 0x5e, 0xcb, + 0xf5, 0x39, 0xd8, 0x92, 0x90, 0x61, 0x2d, 0x1e, + 0x3c, 0xd3, 0x55, 0x0d, 0x34, 0xd1, 0x81, 0xc4, + 0x89, 0xea, 0x94, 0x2b, 0x56, 0x33, 0x73, 0x58, + 0x48, 0xbf, 0x23, 0x72, 0x19, 0x5f, 0x19, 0xac, + 0xff, 0x09, 0xc8, 0xcd, 0xab, 0x71, 0xef, 0x9e, + 0x20, 0xfd, 0xe3, 0xb8, 0x27, 0x9e, 0x65, 0xb1, + 0x85, 0xcd, 0x88, 0xfe, 0xd4, 0xd7, 0x64, 0x4d, + 0xe1, 0xe8, 0xa6, 0xe5, 0x96, 0xc8, 0x5d, 0x9c, + 0xc6, 0x70, 0x6b, 0xba, 0x77, 0x4e, 0x90, 0x4a, + 0xb0, 0x96, 0xc5, 0xa0, 0x9e, 0x2c, 0x01, 0x03, + 0xbe, 0xbd, 0x71, 0xba, 0x0a, 0x6f, 0x9f, 0xe5, + 0xdb, 0x04, 0x08, 0xf2, 0x9e, 0x0f, 0x1b, 0xac, + 0xcd, 0xbb, 0x65, 0x12, 0xcf, 0x77, 0xc9, 0x7d, + 0xbe, 0x94, 0x4b, 0x9c, 0x5b, 0xde, 0x0d, 0xfa, + 0x57, 0xdd, 0x77, 0x32, 0xf0, 0x5b, 0x34, 0xfd, + 0x19, 0x95, 0x33, 0x60, 0x87, 0xe2, 0xa2, 0xf4 +}; + +/* P, Q, G have been generated using the NSS makepqg utility: + * makepqg -l 2048 -g 224 -r + * (see also: bug 1170322) + * + * h: 1 (0x1) + * SEED: + * d2:0b:c5:63:1b:af:dc:36:b7:7c:b9:3e:36:01:a0:8f: + * 0e:be:d0:38:e4:78:d5:3c:7c:9e:a9:9a:d2:0b:c5:63: + * 1b:af:dc:36:b7:7c:b9:3e:36:01:a0:8f:0e:be:d0:38: + * e4:78:d5:3c:7c:9e:c7:70:d2:0b:c5:63:1b:af:dc:36: + * b7:7c:b9:3e:36:01:a0:8f:0e:be:d0:38:e4:78:d5:3c: + * 7c:9e:aa:3e + * g: 672 + * counter: 0 + */ + +static const SECKEYPQGParams default_pqg_params = { + NULL, + { 0, (unsigned char *)P, sizeof(P) }, + { 0, (unsigned char *)Q, sizeof(Q) }, + { 0, (unsigned char *)G, sizeof(G) } +}; + +static SECKEYPQGParams * +decode_pqg_params(const char *str) +{ + char *buf; + unsigned int len; + PLArenaPool *arena; + SECKEYPQGParams *params; + SECStatus status; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena == NULL) + return NULL; + + params = PORT_ArenaZAlloc(arena, sizeof(SECKEYPQGParams)); + if (params == NULL) + goto loser; + params->arena = arena; + + buf = (char *)ATOB_AsciiToData(str, &len); + if ((buf == NULL) || (len == 0)) + goto loser; + + status = SEC_ASN1Decode(arena, params, SECKEY_PQGParamsTemplate, buf, len); + if (status != SECSuccess) + goto loser; + + return params; + +loser: + if (arena != NULL) + PORT_FreeArena(arena, PR_FALSE); + return NULL; +} + +void +CERTUTIL_DestroyParamsPQG(SECKEYPQGParams *params) +{ + if (params->arena) { + PORT_FreeArena(params->arena, PR_FALSE); + } +} + +static int +pqg_prime_bits(const SECKEYPQGParams *params) +{ + int primeBits = 0; + + if (params != NULL) { + int i; + for (i = 0; params->prime.data[i] == 0; i++) { + /* empty */; + } + primeBits = (params->prime.len - i) * 8; + } + + return primeBits; +} + +static char * +getPQGString(const char *filename) +{ + unsigned char *buf = NULL; + PRFileDesc *src; + PRInt32 numBytes; + PRStatus prStatus; + PRFileInfo info; + + src = PR_Open(filename, PR_RDONLY, 0); + if (!src) { + fprintf(stderr, "Failed to open PQG file %s\n", filename); + return NULL; + } + + prStatus = PR_GetOpenFileInfo(src, &info); + + if (prStatus == PR_SUCCESS) { + buf = (unsigned char *)PORT_Alloc(info.size + 1); + } + if (!buf) { + PR_Close(src); + fprintf(stderr, "Failed to read PQG file %s\n", filename); + return NULL; + } + + numBytes = PR_Read(src, buf, info.size); + PR_Close(src); + if (numBytes != info.size) { + PORT_Free(buf); + fprintf(stderr, "Failed to read PQG file %s\n", filename); + PORT_SetError(SEC_ERROR_IO); + return NULL; + } + + if (buf[numBytes - 1] == '\n') + numBytes--; + if (buf[numBytes - 1] == '\r') + numBytes--; + buf[numBytes] = 0; + + return (char *)buf; +} + +static SECKEYPQGParams * +getpqgfromfile(int keyBits, const char *pqgFile) +{ + char *end, *str, *pqgString; + SECKEYPQGParams *params = NULL; + + str = pqgString = getPQGString(pqgFile); + if (!str) + return NULL; + + do { + end = PORT_Strchr(str, ','); + if (end) + *end = '\0'; + params = decode_pqg_params(str); + if (params) { + int primeBits = pqg_prime_bits(params); + if (keyBits == primeBits) + break; + CERTUTIL_DestroyParamsPQG(params); + params = NULL; + } + if (end) + str = end + 1; + } while (end); + + PORT_Free(pqgString); + return params; +} + +static SECStatus +CERTUTIL_FileForRNG(const char *noise) +{ + char buf[2048]; + PRFileDesc *fd; + PRInt32 count; + + fd = PR_Open(noise, PR_RDONLY, 0); + if (!fd) { + fprintf(stderr, "failed to open noise file."); + return SECFailure; + } + + do { + count = PR_Read(fd, buf, sizeof(buf)); + if (count > 0) { + PK11_RandomUpdate(buf, count); + } + } while (count > 0); + + PR_Close(fd); + return SECSuccess; +} + +typedef struct curveNameTagPairStr { + char *curveName; + 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 SECKEYECParams * +getECParams(const char *curve) +{ + SECKEYECParams *ecparams; + SECOidData *oidData = NULL; + SECOidTag curveOidTag = SEC_OID_UNKNOWN; /* default */ + int i, numCurves; + + if (curve != NULL) { + numCurves = sizeof(nameTagPair) / sizeof(CurveNameTagPair); + for (i = 0; ((i < numCurves) && (curveOidTag == SEC_OID_UNKNOWN)); + i++) { + if (PL_strcmp(curve, nameTagPair[i].curveName) == 0) + curveOidTag = nameTagPair[i].curveOidTag; + } + } + + /* Return NULL if curve name is not recognized */ + if ((curveOidTag == SEC_OID_UNKNOWN) || + (oidData = SECOID_FindOIDByTag(curveOidTag)) == NULL) { + fprintf(stderr, "Unrecognized elliptic curve %s\n", curve); + return NULL; + } + + ecparams = SECITEM_AllocItem(NULL, NULL, (2 + oidData->oid.len)); + + /* + * ecparams->data needs to contain the ASN encoding of an object ID (OID) + * representing the named curve. The actual OID is in + * oidData->oid.data so we simply prepend 0x06 and OID length + */ + ecparams->data[0] = SEC_ASN1_OBJECT_ID; + ecparams->data[1] = oidData->oid.len; + memcpy(ecparams->data + 2, oidData->oid.data, oidData->oid.len); + + return ecparams; +} + +SECKEYPrivateKey * +CERTUTIL_GeneratePrivateKey(KeyType keytype, PK11SlotInfo *slot, int size, + int publicExponent, const char *noise, + SECKEYPublicKey **pubkeyp, const char *pqgFile, + PK11AttrFlags attrFlags, CK_FLAGS opFlagsOn, + CK_FLAGS opFlagsOff, secuPWData *pwdata) +{ + CK_MECHANISM_TYPE mechanism; + PK11RSAGenParams rsaparams; + SECKEYPQGParams *dsaparams = NULL; + void *params; + SECKEYPrivateKey *privKey = NULL; + + if (slot == NULL) + return NULL; + + if (PK11_Authenticate(slot, PR_TRUE, pwdata) != SECSuccess) + return NULL; + + /* + * Do some random-number initialization. + */ + + if (noise) { + SECStatus rv = CERTUTIL_FileForRNG(noise); + if (rv != SECSuccess) { + PORT_SetError(PR_END_OF_FILE_ERROR); /* XXX */ + return NULL; + } + } else { + int rv = UpdateRNG(); + if (rv) { + PORT_SetError(PR_END_OF_FILE_ERROR); + return NULL; + } + } + + switch (keytype) { + case rsaKey: + rsaparams.keySizeInBits = size; + rsaparams.pe = publicExponent; + mechanism = CKM_RSA_PKCS_KEY_PAIR_GEN; + params = &rsaparams; + break; + case dsaKey: + mechanism = CKM_DSA_KEY_PAIR_GEN; + if (pqgFile) { + dsaparams = getpqgfromfile(size, pqgFile); + if (dsaparams == NULL) + return NULL; + params = dsaparams; + } else { + /* cast away const, and don't set dsaparams */ + params = (void *)&default_pqg_params; + } + break; + case ecKey: + mechanism = CKM_EC_KEY_PAIR_GEN; + /* For EC keys, PQGFile determines EC parameters */ + if ((params = (void *)getECParams(pqgFile)) == NULL) + return NULL; + break; + default: + return NULL; + } + + fprintf(stderr, "\n\n"); + fprintf(stderr, "Generating key. This may take a few moments...\n\n"); + + privKey = PK11_GenerateKeyPairWithOpFlags(slot, mechanism, params, pubkeyp, + attrFlags, opFlagsOn, opFlagsOn | opFlagsOff, + pwdata /*wincx*/); + /* free up the params */ + switch (keytype) { + case dsaKey: + if (dsaparams) + CERTUTIL_DestroyParamsPQG(dsaparams); + break; + case ecKey: + SECITEM_FreeItem((SECItem *)params, PR_TRUE); + break; + default: /* nothing to free */ + break; + } + return privKey; +} diff --git a/security/nss/cmd/certutil/manifest.mn b/security/nss/cmd/certutil/manifest.mn new file mode 100644 index 0000000000..c0bce4c7e6 --- /dev/null +++ b/security/nss/cmd/certutil/manifest.mn @@ -0,0 +1,25 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +CORE_DEPTH = ../.. + +DEFINES += -DNSPR20 + +# MODULE public and private header directories are implicitly REQUIRED. +MODULE = nss + +CSRCS = \ + certext.c \ + certutil.c \ + keystuff.c \ + $(NULL) + +# The MODULE is always implicitly required. +# Listing it here in REQUIRES makes it appear twice in the cc command line. +REQUIRES = dbm seccmd + +PROGRAM = certutil + +#USE_STATIC_LIBS = 1 diff --git a/security/nss/cmd/chktest/Makefile b/security/nss/cmd/chktest/Makefile new file mode 100644 index 0000000000..3ffa387472 --- /dev/null +++ b/security/nss/cmd/chktest/Makefile @@ -0,0 +1,47 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + +include ../platrules.mk diff --git a/security/nss/cmd/chktest/chktest.c b/security/nss/cmd/chktest/chktest.c new file mode 100644 index 0000000000..a33d184570 --- /dev/null +++ b/security/nss/cmd/chktest/chktest.c @@ -0,0 +1,45 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#include +#include + +#include "blapi.h" +#include "secutil.h" + +static int +Usage() +{ + fprintf(stderr, "Usage: chktest \n"); + fprintf(stderr, " Will test for valid chk file.\n"); + fprintf(stderr, " Will print SUCCESS or FAILURE.\n"); + exit(1); +} + +int +main(int argc, char **argv) +{ + SECStatus rv = SECFailure; + PRBool good_result = PR_FALSE; + + if (argc != 2) + return Usage(); + + rv = RNG_RNGInit(); + if (rv != SECSuccess) { + SECU_PrintPRandOSError(""); + return -1; + } + rv = BL_Init(); + if (rv != SECSuccess) { + SECU_PrintPRandOSError(""); + return -1; + } + RNG_SystemInfoForRNG(); + + good_result = BLAPI_SHVerifyFile(argv[1]); + printf("%s\n", + (good_result ? "SUCCESS" : "FAILURE")); + return (good_result) ? SECSuccess : SECFailure; +} diff --git a/security/nss/cmd/chktest/chktest.gyp b/security/nss/cmd/chktest/chktest.gyp new file mode 100644 index 0000000000..15abbcc938 --- /dev/null +++ b/security/nss/cmd/chktest/chktest.gyp @@ -0,0 +1,32 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +{ + 'includes': [ + '../../coreconf/config.gypi', + '../../cmd/platlibs.gypi' + ], + 'targets': [ + { + 'target_name': 'chktest', + 'type': 'executable', + 'sources': [ + 'chktest.c' + ], + 'dependencies': [ + '<(DEPTH)/exports.gyp:dbm_exports', + '<(DEPTH)/exports.gyp:nss_exports', + '<(DEPTH)/lib/sqlite/sqlite.gyp:sqlite3' + ] + } + ], + 'target_defaults': { + 'defines': [ + 'NSS_USE_STATIC_LIBS' + ] + }, + 'variables': { + 'module': 'nss', + 'use_static_libs': 1 + } +} \ No newline at end of file diff --git a/security/nss/cmd/chktest/manifest.mn b/security/nss/cmd/chktest/manifest.mn new file mode 100644 index 0000000000..e74e1d73d0 --- /dev/null +++ b/security/nss/cmd/chktest/manifest.mn @@ -0,0 +1,21 @@ +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +CORE_DEPTH = ../.. + +MODULE = nss + +#REQUIRES = seccmd dbm softoken +REQUIRES = seccmd dbm + +#INCLUDES += -I$(CORE_DEPTH)/nss/lib/softoken + +PROGRAM = chktest + +USE_STATIC_LIBS = 1 + +CSRCS = \ + chktest.c \ + $(NULL) + diff --git a/security/nss/cmd/crlutil/Makefile b/security/nss/cmd/crlutil/Makefile new file mode 100644 index 0000000000..a61ae1c4c3 --- /dev/null +++ b/security/nss/cmd/crlutil/Makefile @@ -0,0 +1,53 @@ +#! gmake +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +####################################################################### +# (1) Include initial platform-independent assignments (MANDATORY). # +####################################################################### + +include manifest.mn + +####################################################################### +# (2) Include "global" configuration information. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/config.mk + +####################################################################### +# (3) Include "component" configuration information. (OPTIONAL) # +####################################################################### + +####################################################################### +# (4) Include "local" platform-dependent assignments (OPTIONAL). # +####################################################################### + +include ../platlibs.mk + +####################################################################### +# (5) Execute "global" rules. (OPTIONAL) # +####################################################################### + +include $(CORE_DEPTH)/coreconf/rules.mk + +####################################################################### +# (6) Execute "component" rules. (OPTIONAL) # +####################################################################### + + + +####################################################################### +# (7) Execute "local" rules. (OPTIONAL). # +####################################################################### + +# +# crlgen_lex can be generated on linux by flex or solaris by lex +# +crlgen_lex: + ${LEX} -t crlgen_lex_orig.l > crlgen_lex_fix.c + sed -f crlgen_lex_fix.sed < crlgen_lex_fix.c > crlgen_lex.c + rm -f crlgen_lex_fix.c + +include ../platrules.mk diff --git a/security/nss/cmd/crlutil/crlgen.c b/security/nss/cmd/crlutil/crlgen.c new file mode 100644 index 0000000000..fce5e2a601 --- /dev/null +++ b/security/nss/cmd/crlutil/crlgen.c @@ -0,0 +1,1541 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* +** crlgen.c +** +** utility for managing certificates revocation lists generation +** +*/ + +#include +#include + +#include "nspr.h" +#include "plgetopt.h" +#include "nss.h" +#include "secutil.h" +#include "cert.h" +#include "certi.h" +#include "certdb.h" +#include "pk11func.h" +#include "crlgen.h" + +/* Destroys extHandle and data. data was create on heap. + * extHandle creaded by CERT_StartCRLEntryExtensions. entry + * was allocated on arena.*/ +static void +destroyEntryData(CRLGENEntryData *data) +{ + if (!data) + return; + PORT_Assert(data->entry); + if (data->extHandle) + CERT_FinishExtensions(data->extHandle); + PORT_Free(data); +} + +/* Prints error messages along with line number */ +void +crlgen_PrintError(int line, char *msg, ...) +{ + va_list args; + + va_start(args, msg); + + fprintf(stderr, "crlgen: (line: %d) ", line); + vfprintf(stderr, msg, args); + + va_end(args); +} +/* Finds CRLGENEntryData in hashtable according PRUint64 value + * - certId : cert serial number*/ +static CRLGENEntryData * +crlgen_FindEntry(CRLGENGeneratorData *crlGenData, SECItem *certId) +{ + if (!crlGenData->entryDataHashTable || !certId) + return NULL; + return (CRLGENEntryData *) + PL_HashTableLookup(crlGenData->entryDataHashTable, + certId); +} + +/* Removes CRLGENEntryData from hashtable according to certId + * - certId : cert serial number*/ +static SECStatus +crlgen_RmEntry(CRLGENGeneratorData *crlGenData, SECItem *certId) +{ + CRLGENEntryData *data = NULL; + SECStatus rv = SECSuccess; + + if (!crlGenData->entryDataHashTable) { + return SECSuccess; + } + + data = crlgen_FindEntry(crlGenData, certId); + if (!data) { + return SECSuccess; + } + + if (!PL_HashTableRemove(crlGenData->entryDataHashTable, certId)) { + rv = SECFailure; + } + + destroyEntryData(data); + return rv; +} + +/* Stores CRLGENEntryData in hashtable according to certId + * - certId : cert serial number*/ +static CRLGENEntryData * +crlgen_PlaceAnEntry(CRLGENGeneratorData *crlGenData, + CERTCrlEntry *entry, SECItem *certId) +{ + CRLGENEntryData *newData = NULL; + + PORT_Assert(crlGenData && crlGenData->entryDataHashTable && + entry); + if (!crlGenData || !crlGenData->entryDataHashTable || !entry) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return NULL; + } + + newData = PORT_ZNew(CRLGENEntryData); + if (!newData) { + return NULL; + } + newData->entry = entry; + newData->certId = certId; + if (!PL_HashTableAdd(crlGenData->entryDataHashTable, + newData->certId, newData)) { + crlgen_PrintError(crlGenData->parsedLineNum, + "Can not add entryData structure\n"); + return NULL; + } + return newData; +} + +/* Use this structure to keep pointer when commiting entries extensions */ +struct commitData { + int pos; + CERTCrlEntry **entries; +}; + +/* HT PL_HashTableEnumerateEntries callback. Sorts hashtable entries of the + * table he. Returns value through arg parameter*/ +static PRIntn PR_CALLBACK +crlgen_CommitEntryData(PLHashEntry *he, PRIntn i, void *arg) +{ + CRLGENEntryData *data = NULL; + + PORT_Assert(he); + if (!he) { + return HT_ENUMERATE_NEXT; + } + data = (CRLGENEntryData *)he->value; + + PORT_Assert(data); + PORT_Assert(arg); + + if (data) { + struct commitData *dt = (struct commitData *)arg; + dt->entries[dt->pos++] = data->entry; + destroyEntryData(data); + } + return HT_ENUMERATE_NEXT; +} + +/* Copy char * datainto allocated in arena SECItem */ +static SECStatus +crlgen_SetString(PLArenaPool *arena, const char *dataIn, SECItem *value) +{ + SECItem item; + + PORT_Assert(arena && dataIn); + if (!arena || !dataIn) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + item.data = (void *)dataIn; + item.len = PORT_Strlen(dataIn); + + return SECITEM_CopyItem(arena, value, &item); +} + +/* Creates CERTGeneralName from parsed data for the Authority Key Extension */ +static CERTGeneralName * +crlgen_GetGeneralName(PLArenaPool *arena, CRLGENGeneratorData *crlGenData, + const char *data) +{ + CERTGeneralName *namesList = NULL; + CERTGeneralName *current; + CERTGeneralName *tail = NULL; + SECStatus rv = SECSuccess; + const char *nextChunk = NULL; + const char *currData = NULL; + int intValue; + char buffer[512]; + void *mark; + + if (!data) + return NULL; + PORT_Assert(arena); + if (!arena) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return NULL; + } + + mark = PORT_ArenaMark(arena); + + nextChunk = data; + currData = data; + do { + int nameLen = 0; + char name[128]; + const char *sepPrt = NULL; + nextChunk = PORT_Strchr(currData, '|'); + if (!nextChunk) + nextChunk = data + strlen(data); + sepPrt = PORT_Strchr(currData, ':'); + if (sepPrt == NULL || sepPrt >= nextChunk) { + *buffer = '\0'; + sepPrt = nextChunk; + } else { + PORT_Memcpy(buffer, sepPrt + 1, + (nextChunk - sepPrt - 1)); + buffer[nextChunk - sepPrt - 1] = '\0'; + } + nameLen = PR_MIN(sepPrt - currData, sizeof(name) - 1); + PORT_Memcpy(name, currData, nameLen); + name[nameLen] = '\0'; + currData = nextChunk + 1; + + if (!PORT_Strcmp(name, "otherName")) + intValue = certOtherName; + else if (!PORT_Strcmp(name, "rfc822Name")) + intValue = certRFC822Name; + else if (!PORT_Strcmp(name, "dnsName")) + intValue = certDNSName; + else if (!PORT_Strcmp(name, "x400Address")) + intValue = certX400Address; + else if (!PORT_Strcmp(name, "directoryName")) + intValue = certDirectoryName; + else if (!PORT_Strcmp(name, "ediPartyName")) + intValue = certEDIPartyName; + else if (!PORT_Strcmp(name, "URI")) + intValue = certURI; + else if (!PORT_Strcmp(name, "ipAddress")) + intValue = certIPAddress; + else if (!PORT_Strcmp(name, "registerID")) + intValue = certRegisterID; + else + intValue = -1; + + if (intValue >= certOtherName && intValue <= certRegisterID) { + if (namesList == NULL) { + namesList = current = tail = PORT_ArenaZNew(arena, + CERTGeneralName); + } else { + current = PORT_ArenaZNew(arena, CERTGeneralName); + } + if (current == NULL) { + rv = SECFailure; + break; + } + } else { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + break; + } + current->type = intValue; + switch (current->type) { + case certURI: + case certDNSName: + case certRFC822Name: + current->name.other.data = PORT_ArenaAlloc(arena, strlen(buffer)); + if (current->name.other.data == NULL) { + rv = SECFailure; + break; + } + PORT_Memcpy(current->name.other.data, buffer, + current->name.other.len = strlen(buffer)); + break; + + case certEDIPartyName: + case certIPAddress: + case certOtherName: + case certRegisterID: + case certX400Address: { + + current->name.other.data = PORT_ArenaAlloc(arena, strlen(buffer) + 2); + if (current->name.other.data == NULL) { + rv = SECFailure; + break; + } + + PORT_Memcpy(current->name.other.data + 2, buffer, strlen(buffer)); + /* This may not be accurate for all cases.For now, use this tag type */ + current->name.other.data[0] = (char)(((current->type - 1) & 0x1f) | 0x80); + current->name.other.data[1] = (char)strlen(buffer); + current->name.other.len = strlen(buffer) + 2; + break; + } + + case certDirectoryName: { + CERTName *directoryName = NULL; + + directoryName = CERT_AsciiToName(buffer); + if (!directoryName) { + rv = SECFailure; + break; + } + + rv = CERT_CopyName(arena, ¤t->name.directoryName, directoryName); + CERT_DestroyName(directoryName); + + break; + } + } + if (rv != SECSuccess) + break; + current->l.next = &(namesList->l); + current->l.prev = &(tail->l); + tail->l.next = &(current->l); + tail = current; + + } while (nextChunk != data + strlen(data)); + + if (rv != SECSuccess) { + PORT_ArenaRelease(arena, mark); + namesList = NULL; + } + return (namesList); +} + +/* Creates CERTGeneralName from parsed data for the Authority Key Extension */ +static CERTGeneralName * +crlgen_DistinguishedName(PLArenaPool *arena, CRLGENGeneratorData *crlGenData, + const char *data) +{ + CERTName *directoryName = NULL; + CERTGeneralName *current; + SECStatus rv = SECFailure; + void *mark; + + if (!data) + return NULL; + PORT_Assert(arena); + if (!arena) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return NULL; + } + + mark = PORT_ArenaMark(arena); + + current = PORT_ArenaZNew(arena, CERTGeneralName); + if (current == NULL) { + goto loser; + } + current->type = certDirectoryName; + current->l.next = ¤t->l; + current->l.prev = ¤t->l; + + directoryName = CERT_AsciiToName((char *)data); + if (!directoryName) { + goto loser; + } + + rv = CERT_CopyName(arena, ¤t->name.directoryName, directoryName); + CERT_DestroyName(directoryName); + +loser: + if (rv != SECSuccess) { + PORT_SetError(rv); + PORT_ArenaRelease(arena, mark); + current = NULL; + } + return (current); +} + +/* Adding Authority Key ID extension to extension handle. */ +static SECStatus +crlgen_AddAuthKeyID(CRLGENGeneratorData *crlGenData, + const char **dataArr) +{ + void *extHandle = NULL; + CERTAuthKeyID *authKeyID = NULL; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + + PORT_Assert(dataArr && crlGenData); + if (!crlGenData || !dataArr) { + return SECFailure; + } + + extHandle = crlGenData->crlExtHandle; + + if (!dataArr[0] || !dataArr[1] || !dataArr[2]) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of parameters.\n"); + return SECFailure; + } + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + return SECFailure; + } + + authKeyID = PORT_ArenaZNew(arena, CERTAuthKeyID); + if (authKeyID == NULL) { + rv = SECFailure; + goto loser; + } + + if (dataArr[3] == NULL) { + rv = crlgen_SetString(arena, dataArr[2], &authKeyID->keyID); + if (rv != SECSuccess) + goto loser; + } else { + rv = crlgen_SetString(arena, dataArr[3], + &authKeyID->authCertSerialNumber); + if (rv != SECSuccess) + goto loser; + + authKeyID->authCertIssuer = + crlgen_DistinguishedName(arena, crlGenData, dataArr[2]); + if (authKeyID->authCertIssuer == NULL && SECFailure == PORT_GetError()) { + crlgen_PrintError(crlGenData->parsedLineNum, "syntax error.\n"); + rv = SECFailure; + goto loser; + } + } + + rv = + SECU_EncodeAndAddExtensionValue(arena, extHandle, authKeyID, + (*dataArr[1] == '1') ? PR_TRUE : PR_FALSE, + SEC_OID_X509_AUTH_KEY_ID, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeAuthKeyID); +loser: + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +/* Creates and add Subject Alternative Names extension */ +static SECStatus +crlgen_AddIssuerAltNames(CRLGENGeneratorData *crlGenData, + const char **dataArr) +{ + CERTGeneralName *nameList = NULL; + PLArenaPool *arena = NULL; + void *extHandle = NULL; + SECStatus rv = SECSuccess; + + PORT_Assert(dataArr && crlGenData); + if (!crlGenData || !dataArr) { + return SECFailure; + } + + if (!dataArr || !dataArr[0] || !dataArr[1] || !dataArr[2]) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + return SECFailure; + } + + PORT_Assert(dataArr && crlGenData); + if (!crlGenData || !dataArr) { + return SECFailure; + } + + extHandle = crlGenData->crlExtHandle; + + if (!dataArr[0] || !dataArr[1] || !dataArr[2]) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of parameters.\n"); + return SECFailure; + } + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) { + return SECFailure; + } + + nameList = crlgen_GetGeneralName(arena, crlGenData, dataArr[2]); + if (nameList == NULL) { + crlgen_PrintError(crlGenData->parsedLineNum, "syntax error.\n"); + rv = SECFailure; + goto loser; + } + + rv = + SECU_EncodeAndAddExtensionValue(arena, extHandle, nameList, + (*dataArr[1] == '1') ? PR_TRUE : PR_FALSE, + SEC_OID_X509_ISSUER_ALT_NAME, + (EXTEN_EXT_VALUE_ENCODER)CERT_EncodeAltNameExtension); +loser: + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +/* Creates and adds CRLNumber extension to extension handle. + * Since, this is CRL extension, extension handle is the one + * related to CRL extensions */ +static SECStatus +crlgen_AddCrlNumber(CRLGENGeneratorData *crlGenData, const char **dataArr) +{ + PLArenaPool *arena = NULL; + SECItem encodedItem; + void *dummy; + SECStatus rv = SECFailure; + int code = 0; + + PORT_Assert(dataArr && crlGenData); + if (!crlGenData || !dataArr) { + goto loser; + } + + if (!dataArr[0] || !dataArr[1] || !dataArr[2]) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + goto loser; + } + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena == NULL) { + goto loser; + } + + code = atoi(dataArr[2]); + if (code == 0 && *dataArr[2] != '0') { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + goto loser; + } + + dummy = SEC_ASN1EncodeInteger(arena, &encodedItem, code); + if (!dummy) { + rv = SECFailure; + goto loser; + } + + rv = CERT_AddExtension(crlGenData->crlExtHandle, SEC_OID_X509_CRL_NUMBER, + &encodedItem, + (*dataArr[1] == '1') ? PR_TRUE : PR_FALSE, + PR_TRUE); + +loser: + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +/* Creates Cert Revocation Reason code extension. Encodes it and + * returns as SECItem structure */ +static SECItem * +crlgen_CreateReasonCode(PLArenaPool *arena, const char **dataArr, + int *extCode) +{ + SECItem *encodedItem; + void *dummy; + void *mark = NULL; + int code = 0; + + PORT_Assert(arena && dataArr); + if (!arena || !dataArr) { + goto loser; + } + + mark = PORT_ArenaMark(arena); + + encodedItem = PORT_ArenaZNew(arena, SECItem); + if (encodedItem == NULL) { + goto loser; + } + + if (dataArr[2] == NULL) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + goto loser; + } + + code = atoi(dataArr[2]); + /* aACompromise(10) is the last possible of the values + * for the Reason Core Extension */ + if ((code == 0 && *dataArr[2] != '0') || code > 10) { + + PORT_SetError(SEC_ERROR_INVALID_ARGS); + goto loser; + } + + dummy = SEC_ASN1EncodeInteger(arena, encodedItem, code); + if (!dummy) { + goto loser; + } + + *extCode = SEC_OID_X509_REASON_CODE; + return encodedItem; + +loser: + if (mark) { + PORT_ArenaRelease(arena, mark); + } + return NULL; +} + +/* Creates Cert Invalidity Date extension. Encodes it and + * returns as SECItem structure */ +static SECItem * +crlgen_CreateInvalidityDate(PLArenaPool *arena, const char **dataArr, + int *extCode) +{ + SECItem *encodedItem; + int length = 0; + void *mark = NULL; + + PORT_Assert(arena && dataArr); + if (!arena || !dataArr) { + goto loser; + } + + mark = PORT_ArenaMark(arena); + + encodedItem = PORT_ArenaZNew(arena, SECItem); + if (encodedItem == NULL) { + goto loser; + } + + length = PORT_Strlen(dataArr[2]); + + encodedItem->type = siGeneralizedTime; + encodedItem->data = PORT_ArenaAlloc(arena, length); + if (!encodedItem->data) { + goto loser; + } + + PORT_Memcpy(encodedItem->data, dataArr[2], (encodedItem->len = length) * sizeof(char)); + + *extCode = SEC_OID_X509_INVALID_DATE; + return encodedItem; + +loser: + if (mark) { + PORT_ArenaRelease(arena, mark); + } + return NULL; +} + +/* Creates(by calling extCreator function) and adds extension to a set + * of already added certs. Uses values of rangeFrom and rangeTo from + * CRLGENCrlGenCtl structure for identifying the inclusive set of certs */ +static SECStatus +crlgen_AddEntryExtension(CRLGENGeneratorData *crlGenData, + const char **dataArr, char *extName, + SECItem *(*extCreator)(PLArenaPool *arena, + const char **dataArr, + int *extCode)) +{ + PRUint64 i = 0; + SECStatus rv = SECFailure; + int extCode = 0; + PRUint64 lastRange; + SECItem *ext = NULL; + PLArenaPool *arena = NULL; + + PORT_Assert(crlGenData && dataArr); + if (!crlGenData || !dataArr) { + goto loser; + } + + if (!dataArr[0] || !dataArr[1]) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + } + + lastRange = crlGenData->rangeTo - crlGenData->rangeFrom + 1; + + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena == NULL) { + goto loser; + } + + ext = extCreator(arena, dataArr, &extCode); + if (ext == NULL) { + crlgen_PrintError(crlGenData->parsedLineNum, + "got error while creating extension: %s\n", + extName); + goto loser; + } + + for (i = 0; i < lastRange; i++) { + CRLGENEntryData *extData = NULL; + void *extHandle = NULL; + SECItem *certIdItem = + SEC_ASN1EncodeInteger(arena, NULL, + crlGenData->rangeFrom + i); + if (!certIdItem) { + rv = SECFailure; + goto loser; + } + + extData = crlgen_FindEntry(crlGenData, certIdItem); + if (!extData) { + crlgen_PrintError(crlGenData->parsedLineNum, + "can not add extension: crl entry " + "(serial number: %d) is not in the list yet.\n", + crlGenData->rangeFrom + i); + continue; + } + + extHandle = extData->extHandle; + if (extHandle == NULL) { + extHandle = extData->extHandle = + CERT_StartCRLEntryExtensions(&crlGenData->signCrl->crl, + (CERTCrlEntry *)extData->entry); + } + rv = CERT_AddExtension(extHandle, extCode, ext, + (*dataArr[1] == '1') ? PR_TRUE : PR_FALSE, + PR_TRUE); + if (rv == SECFailure) { + goto loser; + } + } + +loser: + if (arena) + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +/* Commits all added entries and their's extensions into CRL. */ +SECStatus +CRLGEN_CommitExtensionsAndEntries(CRLGENGeneratorData *crlGenData) +{ + int size = 0; + CERTCrl *crl; + PLArenaPool *arena; + SECStatus rv = SECSuccess; + void *mark; + + PORT_Assert(crlGenData && crlGenData->signCrl && crlGenData->signCrl->arena); + if (!crlGenData || !crlGenData->signCrl || !crlGenData->signCrl->arena) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + arena = crlGenData->signCrl->arena; + crl = &crlGenData->signCrl->crl; + + mark = PORT_ArenaMark(arena); + + if (crlGenData->crlExtHandle) + CERT_FinishExtensions(crlGenData->crlExtHandle); + + size = crlGenData->entryDataHashTable->nentries; + crl->entries = NULL; + if (size) { + crl->entries = PORT_ArenaZNewArray(arena, CERTCrlEntry *, size + 1); + if (!crl->entries) { + rv = SECFailure; + } else { + struct commitData dt; + dt.entries = crl->entries; + dt.pos = 0; + PL_HashTableEnumerateEntries(crlGenData->entryDataHashTable, + &crlgen_CommitEntryData, &dt); + /* Last should be NULL */ + crl->entries[size] = NULL; + } + } + + if (rv != SECSuccess) + PORT_ArenaRelease(arena, mark); + return rv; +} + +/* Initializes extHandle with data from extensions array */ +static SECStatus +crlgen_InitExtensionHandle(void *extHandle, + CERTCertExtension **extensions) +{ + CERTCertExtension *extension = NULL; + + if (!extensions) + return SECSuccess; + + PORT_Assert(extHandle != NULL); + if (!extHandle) { + return SECFailure; + } + + extension = *extensions; + while (extension) { + SECOidTag oidTag = SECOID_FindOIDTag(&extension->id); + /* shell we skip unknown extensions? */ + CERT_AddExtension(extHandle, oidTag, &extension->value, + (extension->critical.len != 0) ? PR_TRUE : PR_FALSE, + PR_FALSE); + extension = *(++extensions); + } + return SECSuccess; +} + +/* Used for initialization of extension handles for crl and certs + * extensions from existing CRL data then modifying existing CRL.*/ +SECStatus +CRLGEN_ExtHandleInit(CRLGENGeneratorData *crlGenData) +{ + CERTCrl *crl = NULL; + PRUint64 maxSN = 0; + + PORT_Assert(crlGenData && crlGenData->signCrl && + crlGenData->entryDataHashTable); + if (!crlGenData || !crlGenData->signCrl || + !crlGenData->entryDataHashTable) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + crl = &crlGenData->signCrl->crl; + crlGenData->crlExtHandle = CERT_StartCRLExtensions(crl); + crlgen_InitExtensionHandle(crlGenData->crlExtHandle, + crl->extensions); + crl->extensions = NULL; + + if (crl->entries) { + CERTCrlEntry **entry = crl->entries; + while (*entry) { + PRUint64 sn = DER_GetInteger(&(*entry)->serialNumber); + CRLGENEntryData *extData = + crlgen_PlaceAnEntry(crlGenData, *entry, &(*entry)->serialNumber); + if ((*entry)->extensions) { + extData->extHandle = + CERT_StartCRLEntryExtensions(&crlGenData->signCrl->crl, + (CERTCrlEntry *)extData->entry); + if (crlgen_InitExtensionHandle(extData->extHandle, + (*entry)->extensions) == SECFailure) + return SECFailure; + } + (*entry)->extensions = NULL; + entry++; + maxSN = PR_MAX(maxSN, sn); + } + } + + crlGenData->rangeFrom = crlGenData->rangeTo = maxSN + 1; + return SECSuccess; +} + +/***************************************************************************** + * Parser trigger functions start here + */ + +/* Sets new internal range value for add/rm certs.*/ +static SECStatus +crlgen_SetNewRangeField(CRLGENGeneratorData *crlGenData, char *value) +{ + long rangeFrom = 0, rangeTo = 0; + char *dashPos = NULL; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + if (value == NULL) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + return SECFailure; + } + + if ((dashPos = strchr(value, '-')) != NULL) { + char *rangeToS, *rangeFromS = value; + *dashPos = '\0'; + rangeFrom = atoi(rangeFromS); + *dashPos = '-'; + + rangeToS = (char *)(dashPos + 1); + rangeTo = atol(rangeToS); + } else { + rangeFrom = atol(value); + rangeTo = rangeFrom; + } + + if (rangeFrom < 1 || rangeTo < rangeFrom) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "bad cert id range: %s.\n", value); + return SECFailure; + } + + crlGenData->rangeFrom = rangeFrom; + crlGenData->rangeTo = rangeTo; + + return SECSuccess; +} + +/* Changes issuer subject field in CRL. By default this data is taken from + * issuer cert subject field.Not yet implemented */ +static SECStatus +crlgen_SetIssuerField(CRLGENGeneratorData *crlGenData, char *value) +{ + crlgen_PrintError(crlGenData->parsedLineNum, + "Can not change CRL issuer field.\n"); + return SECFailure; +} + +/* Encode and sets CRL thisUpdate and nextUpdate time fields*/ +static SECStatus +crlgen_SetTimeField(CRLGENGeneratorData *crlGenData, char *value, + PRBool setThisUpdate) +{ + CERTSignedCrl *signCrl; + PLArenaPool *arena; + CERTCrl *crl; + int length = 0; + SECItem *timeDest = NULL; + + PORT_Assert(crlGenData && crlGenData->signCrl && + crlGenData->signCrl->arena); + if (!crlGenData || !crlGenData->signCrl || !crlGenData->signCrl->arena) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + signCrl = crlGenData->signCrl; + arena = signCrl->arena; + crl = &signCrl->crl; + + if (value == NULL) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + return SECFailure; + } + length = PORT_Strlen(value); + + if (setThisUpdate == PR_TRUE) { + timeDest = &crl->lastUpdate; + } else { + timeDest = &crl->nextUpdate; + } + + timeDest->type = siGeneralizedTime; + timeDest->data = PORT_ArenaAlloc(arena, length); + if (!timeDest->data) { + return SECFailure; + } + PORT_Memcpy(timeDest->data, value, length); + timeDest->len = length; + + return SECSuccess; +} + +/* Adds new extension into CRL or added cert handles */ +static SECStatus +crlgen_AddExtension(CRLGENGeneratorData *crlGenData, const char **extData) +{ + PORT_Assert(crlGenData && crlGenData->crlExtHandle); + if (!crlGenData || !crlGenData->crlExtHandle) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + if (extData == NULL || *extData == NULL) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + return SECFailure; + } + if (!PORT_Strcmp(*extData, "authKeyId")) + return crlgen_AddAuthKeyID(crlGenData, extData); + else if (!PORT_Strcmp(*extData, "issuerAltNames")) + return crlgen_AddIssuerAltNames(crlGenData, extData); + else if (!PORT_Strcmp(*extData, "crlNumber")) + return crlgen_AddCrlNumber(crlGenData, extData); + else if (!PORT_Strcmp(*extData, "reasonCode")) + return crlgen_AddEntryExtension(crlGenData, extData, "reasonCode", + crlgen_CreateReasonCode); + else if (!PORT_Strcmp(*extData, "invalidityDate")) + return crlgen_AddEntryExtension(crlGenData, extData, "invalidityDate", + crlgen_CreateInvalidityDate); + else { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + return SECFailure; + } +} + +/* Created CRLGENEntryData for cert with serial number certId and + * adds it to entryDataHashTable. certId can be a single cert serial + * number or an inclusive rage of certs */ +static SECStatus +crlgen_AddCert(CRLGENGeneratorData *crlGenData, + char *certId, char *revocationDate) +{ + CERTSignedCrl *signCrl; + SECItem *certIdItem; + PLArenaPool *arena; + PRUint64 rangeFrom = 0, rangeTo = 0, i = 0; + int timeValLength = -1; + SECStatus rv = SECFailure; + void *mark; + + PORT_Assert(crlGenData && crlGenData->signCrl && + crlGenData->signCrl->arena); + if (!crlGenData || !crlGenData->signCrl || !crlGenData->signCrl->arena) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + signCrl = crlGenData->signCrl; + arena = signCrl->arena; + + if (!certId || !revocationDate) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "insufficient number of arguments.\n"); + return SECFailure; + } + + timeValLength = strlen(revocationDate); + + if (crlgen_SetNewRangeField(crlGenData, certId) == SECFailure && + certId) { + return SECFailure; + } + rangeFrom = crlGenData->rangeFrom; + rangeTo = crlGenData->rangeTo; + + for (i = 0; i < rangeTo - rangeFrom + 1; i++) { + CERTCrlEntry *entry; + mark = PORT_ArenaMark(arena); + entry = PORT_ArenaZNew(arena, CERTCrlEntry); + if (entry == NULL) { + goto loser; + } + + certIdItem = SEC_ASN1EncodeInteger(arena, &entry->serialNumber, + rangeFrom + i); + if (!certIdItem) { + goto loser; + } + + if (crlgen_FindEntry(crlGenData, certIdItem)) { + crlgen_PrintError(crlGenData->parsedLineNum, + "entry already exists. Use \"range\" " + "and \"rmcert\" before adding a new one with the " + "same serial number %ld\n", + rangeFrom + i); + goto loser; + } + + entry->serialNumber.type = siBuffer; + + entry->revocationDate.type = siGeneralizedTime; + + entry->revocationDate.data = + PORT_ArenaAlloc(arena, timeValLength); + if (entry->revocationDate.data == NULL) { + goto loser; + } + + PORT_Memcpy(entry->revocationDate.data, revocationDate, + timeValLength * sizeof(char)); + entry->revocationDate.len = timeValLength; + + entry->extensions = NULL; + if (!crlgen_PlaceAnEntry(crlGenData, entry, certIdItem)) { + goto loser; + } + mark = NULL; + } + + rv = SECSuccess; +loser: + if (mark) { + PORT_ArenaRelease(arena, mark); + } + return rv; +} + +/* Removes certs from entryDataHashTable which have certId serial number. + * certId can have value of a range of certs */ +static SECStatus +crlgen_RmCert(CRLGENGeneratorData *crlGenData, char *certId) +{ + PRUint64 i = 0; + + PORT_Assert(crlGenData && certId); + if (!crlGenData || !certId) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + if (crlgen_SetNewRangeField(crlGenData, certId) == SECFailure && + certId) { + return SECFailure; + } + + for (i = 0; i < crlGenData->rangeTo - crlGenData->rangeFrom + 1; i++) { + SECItem *certIdItem = SEC_ASN1EncodeInteger(NULL, NULL, + crlGenData->rangeFrom + i); + if (certIdItem) { + CRLGENEntryData *extData = + crlgen_FindEntry(crlGenData, certIdItem); + if (!extData) { + printf("Cert with id %s is not in the list\n", certId); + } else { + crlgen_RmEntry(crlGenData, certIdItem); + } + SECITEM_FreeItem(certIdItem, PR_TRUE); + } + } + + return SECSuccess; +} + +/************************************************************************* + * Lex Parser Helper functions are used to store parsed information + * in context related structures. Context(or state) is identified base on + * a type of a instruction parser currently is going through. New context + * is identified by first token in a line. It can be addcert context, + * addext context, etc. */ + +/* Updates CRL field depending on current context */ +static SECStatus +crlgen_updateCrlFn_field(CRLGENGeneratorData *crlGenData, void *str) +{ + CRLGENCrlField *fieldStr = (CRLGENCrlField *)str; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (crlGenData->contextId) { + case CRLGEN_ISSUER_CONTEXT: + crlgen_SetIssuerField(crlGenData, fieldStr->value); + break; + case CRLGEN_UPDATE_CONTEXT: + return crlgen_SetTimeField(crlGenData, fieldStr->value, PR_TRUE); + break; + case CRLGEN_NEXT_UPDATE_CONTEXT: + return crlgen_SetTimeField(crlGenData, fieldStr->value, PR_FALSE); + break; + case CRLGEN_CHANGE_RANGE_CONTEXT: + return crlgen_SetNewRangeField(crlGenData, fieldStr->value); + break; + default: + crlgen_PrintError(crlGenData->parsedLineNum, + "syntax error (unknow token type: %d)\n", + crlGenData->contextId); + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + return SECSuccess; +} + +/* Sets parsed data for CRL field update into temporary structure */ +static SECStatus +crlgen_setNextDataFn_field(CRLGENGeneratorData *crlGenData, void *str, + void *data, unsigned short dtype) +{ + CRLGENCrlField *fieldStr = (CRLGENCrlField *)str; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (crlGenData->contextId) { + case CRLGEN_CHANGE_RANGE_CONTEXT: + if (dtype != CRLGEN_TYPE_DIGIT && dtype != CRLGEN_TYPE_DIGIT_RANGE) { + crlgen_PrintError(crlGenData->parsedLineNum, + "range value should have " + "numeric or numeric range values.\n"); + return SECFailure; + } + break; + case CRLGEN_NEXT_UPDATE_CONTEXT: + case CRLGEN_UPDATE_CONTEXT: + if (dtype != CRLGEN_TYPE_ZDATE) { + crlgen_PrintError(crlGenData->parsedLineNum, + "bad formated date. Should be " + "YYYYMMDDHHMMSSZ.\n"); + return SECFailure; + } + break; + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "syntax error (unknow token type: %d).\n", + crlGenData->contextId, data); + return SECFailure; + } + fieldStr->value = PORT_Strdup(data); + if (!fieldStr->value) { + return SECFailure; + } + return SECSuccess; +} + +/* Triggers cert entries update depending on current context */ +static SECStatus +crlgen_updateCrlFn_cert(CRLGENGeneratorData *crlGenData, void *str) +{ + CRLGENCertEntry *certStr = (CRLGENCertEntry *)str; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (crlGenData->contextId) { + case CRLGEN_ADD_CERT_CONTEXT: + return crlgen_AddCert(crlGenData, certStr->certId, + certStr->revocationTime); + case CRLGEN_RM_CERT_CONTEXT: + return crlgen_RmCert(crlGenData, certStr->certId); + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "syntax error (unknow token type: %d).\n", + crlGenData->contextId); + return SECFailure; + } +} + +/* Sets parsed data for CRL entries update into temporary structure */ +static SECStatus +crlgen_setNextDataFn_cert(CRLGENGeneratorData *crlGenData, void *str, + void *data, unsigned short dtype) +{ + CRLGENCertEntry *certStr = (CRLGENCertEntry *)str; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (dtype) { + case CRLGEN_TYPE_DIGIT: + case CRLGEN_TYPE_DIGIT_RANGE: + certStr->certId = PORT_Strdup(data); + if (!certStr->certId) { + return SECFailure; + } + break; + case CRLGEN_TYPE_DATE: + case CRLGEN_TYPE_ZDATE: + certStr->revocationTime = PORT_Strdup(data); + if (!certStr->revocationTime) { + return SECFailure; + } + break; + default: + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "syntax error (unknow token type: %d).\n", + crlGenData->contextId); + return SECFailure; + } + return SECSuccess; +} + +/* Triggers cert entries/crl extension update */ +static SECStatus +crlgen_updateCrlFn_extension(CRLGENGeneratorData *crlGenData, void *str) +{ + CRLGENExtensionEntry *extStr = (CRLGENExtensionEntry *)str; + + return crlgen_AddExtension(crlGenData, (const char **)extStr->extData); +} + +/* Defines maximum number of fields extension may have */ +#define MAX_EXT_DATA_LENGTH 10 + +/* Sets parsed extension data for CRL entries/CRL extensions update + * into temporary structure */ +static SECStatus +crlgen_setNextDataFn_extension(CRLGENGeneratorData *crlGenData, void *str, + void *data, unsigned short dtype) +{ + CRLGENExtensionEntry *extStr = (CRLGENExtensionEntry *)str; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + if (extStr->extData == NULL) { + extStr->extData = PORT_ZNewArray(char *, MAX_EXT_DATA_LENGTH); + if (!extStr->extData) { + return SECFailure; + } + } + if (extStr->nextUpdatedData >= MAX_EXT_DATA_LENGTH) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + crlgen_PrintError(crlGenData->parsedLineNum, + "number of fields in extension " + "exceeded maximum allowed data length: %d.\n", + MAX_EXT_DATA_LENGTH); + return SECFailure; + } + extStr->extData[extStr->nextUpdatedData] = PORT_Strdup(data); + if (!extStr->extData[extStr->nextUpdatedData]) { + return SECFailure; + } + extStr->nextUpdatedData += 1; + + return SECSuccess; +} + +/**************************************************************************************** + * Top level functions are triggered directly by parser. + */ + +/* + * crl generation script parser recreates a temporary data staructure + * for each line it is going through. This function cleans temp structure. + */ +void +crlgen_destroyTempData(CRLGENGeneratorData *crlGenData) +{ + if (crlGenData->contextId != CRLGEN_UNKNOWN_CONTEXT) { + switch (crlGenData->contextId) { + case CRLGEN_ISSUER_CONTEXT: + case CRLGEN_UPDATE_CONTEXT: + case CRLGEN_NEXT_UPDATE_CONTEXT: + case CRLGEN_CHANGE_RANGE_CONTEXT: + if (crlGenData->crlField->value) + PORT_Free(crlGenData->crlField->value); + PORT_Free(crlGenData->crlField); + break; + case CRLGEN_ADD_CERT_CONTEXT: + case CRLGEN_RM_CERT_CONTEXT: + if (crlGenData->certEntry->certId) + PORT_Free(crlGenData->certEntry->certId); + if (crlGenData->certEntry->revocationTime) + PORT_Free(crlGenData->certEntry->revocationTime); + PORT_Free(crlGenData->certEntry); + break; + case CRLGEN_ADD_EXTENSION_CONTEXT: + if (crlGenData->extensionEntry->extData) { + int i = 0; + for (; i < crlGenData->extensionEntry->nextUpdatedData; i++) + PORT_Free(*(crlGenData->extensionEntry->extData + i)); + PORT_Free(crlGenData->extensionEntry->extData); + } + PORT_Free(crlGenData->extensionEntry); + break; + } + crlGenData->contextId = CRLGEN_UNKNOWN_CONTEXT; + } +} + +SECStatus +crlgen_updateCrl(CRLGENGeneratorData *crlGenData) +{ + SECStatus rv = SECSuccess; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (crlGenData->contextId) { + case CRLGEN_ISSUER_CONTEXT: + case CRLGEN_UPDATE_CONTEXT: + case CRLGEN_NEXT_UPDATE_CONTEXT: + case CRLGEN_CHANGE_RANGE_CONTEXT: + rv = crlGenData->crlField->updateCrlFn(crlGenData, crlGenData->crlField); + break; + case CRLGEN_RM_CERT_CONTEXT: + case CRLGEN_ADD_CERT_CONTEXT: + rv = crlGenData->certEntry->updateCrlFn(crlGenData, crlGenData->certEntry); + break; + case CRLGEN_ADD_EXTENSION_CONTEXT: + rv = crlGenData->extensionEntry->updateCrlFn(crlGenData, crlGenData->extensionEntry); + break; + case CRLGEN_UNKNOWN_CONTEXT: + break; + default: + crlgen_PrintError(crlGenData->parsedLineNum, + "unknown lang context type code: %d.\n", + crlGenData->contextId); + PORT_Assert(0); + return SECFailure; + } + /* Clrean structures after crl update */ + crlgen_destroyTempData(crlGenData); + + crlGenData->parsedLineNum += 1; + + return rv; +} + +SECStatus +crlgen_setNextData(CRLGENGeneratorData *crlGenData, void *data, + unsigned short dtype) +{ + SECStatus rv = SECSuccess; + + PORT_Assert(crlGenData); + if (!crlGenData) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (crlGenData->contextId) { + case CRLGEN_ISSUER_CONTEXT: + case CRLGEN_UPDATE_CONTEXT: + case CRLGEN_NEXT_UPDATE_CONTEXT: + case CRLGEN_CHANGE_RANGE_CONTEXT: + rv = crlGenData->crlField->setNextDataFn(crlGenData, crlGenData->crlField, + data, dtype); + break; + case CRLGEN_ADD_CERT_CONTEXT: + case CRLGEN_RM_CERT_CONTEXT: + rv = crlGenData->certEntry->setNextDataFn(crlGenData, crlGenData->certEntry, + data, dtype); + break; + case CRLGEN_ADD_EXTENSION_CONTEXT: + rv = + crlGenData->extensionEntry->setNextDataFn(crlGenData, crlGenData->extensionEntry, data, dtype); + break; + case CRLGEN_UNKNOWN_CONTEXT: + break; + default: + crlgen_PrintError(crlGenData->parsedLineNum, + "unknown context type: %d.\n", + crlGenData->contextId); + PORT_Assert(0); + return SECFailure; + } + return rv; +} + +SECStatus +crlgen_createNewLangStruct(CRLGENGeneratorData *crlGenData, + unsigned structType) +{ + PORT_Assert(crlGenData && + crlGenData->contextId == CRLGEN_UNKNOWN_CONTEXT); + if (!crlGenData || + crlGenData->contextId != CRLGEN_UNKNOWN_CONTEXT) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return SECFailure; + } + + switch (structType) { + case CRLGEN_ISSUER_CONTEXT: + case CRLGEN_UPDATE_CONTEXT: + case CRLGEN_NEXT_UPDATE_CONTEXT: + case CRLGEN_CHANGE_RANGE_CONTEXT: + crlGenData->crlField = PORT_New(CRLGENCrlField); + if (!crlGenData->crlField) { + return SECFailure; + } + crlGenData->contextId = structType; + crlGenData->crlField->value = NULL; + crlGenData->crlField->updateCrlFn = &crlgen_updateCrlFn_field; + crlGenData->crlField->setNextDataFn = &crlgen_setNextDataFn_field; + break; + case CRLGEN_RM_CERT_CONTEXT: + case CRLGEN_ADD_CERT_CONTEXT: + crlGenData->certEntry = PORT_New(CRLGENCertEntry); + if (!crlGenData->certEntry) { + return SECFailure; + } + crlGenData->contextId = structType; + crlGenData->certEntry->certId = 0; + crlGenData->certEntry->revocationTime = NULL; + crlGenData->certEntry->updateCrlFn = &crlgen_updateCrlFn_cert; + crlGenData->certEntry->setNextDataFn = &crlgen_setNextDataFn_cert; + break; + case CRLGEN_ADD_EXTENSION_CONTEXT: + crlGenData->extensionEntry = PORT_New(CRLGENExtensionEntry); + if (!crlGenData->extensionEntry) { + return SECFailure; + } + crlGenData->contextId = structType; + crlGenData->extensionEntry->extData = NULL; + crlGenData->extensionEntry->nextUpdatedData = 0; + crlGenData->extensionEntry->updateCrlFn = + &crlgen_updateCrlFn_extension; + crlGenData->extensionEntry->setNextDataFn = + &crlgen_setNextDataFn_extension; + break; + case CRLGEN_UNKNOWN_CONTEXT: + break; + default: + crlgen_PrintError(crlGenData->parsedLineNum, + "unknown context type: %d.\n", structType); + PORT_Assert(0); + return SECFailure; + } + return SECSuccess; +} + +/* Parser initialization function */ +CRLGENGeneratorData * +CRLGEN_InitCrlGeneration(CERTSignedCrl *signCrl, PRFileDesc *src) +{ + CRLGENGeneratorData *crlGenData = NULL; + + PORT_Assert(signCrl && src); + if (!signCrl || !src) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + return NULL; + } + + crlGenData = PORT_ZNew(CRLGENGeneratorData); + if (!crlGenData) { + return NULL; + } + + crlGenData->entryDataHashTable = + PL_NewHashTable(0, SECITEM_Hash, SECITEM_HashCompare, + PL_CompareValues, NULL, NULL); + if (!crlGenData->entryDataHashTable) { + PORT_Free(crlGenData); + return NULL; + } + + crlGenData->src = src; + crlGenData->parsedLineNum = 1; + crlGenData->contextId = CRLGEN_UNKNOWN_CONTEXT; + crlGenData->signCrl = signCrl; + crlGenData->rangeFrom = 0; + crlGenData->rangeTo = 0; + crlGenData->crlExtHandle = NULL; + + PORT_SetError(0); + + return crlGenData; +} + +void +CRLGEN_FinalizeCrlGeneration(CRLGENGeneratorData *crlGenData) +{ + if (!crlGenData) + return; + if (crlGenData->src) + PR_Close(crlGenData->src); + PL_HashTableDestroy(crlGenData->entryDataHashTable); + PORT_Free(crlGenData); +} diff --git a/security/nss/cmd/crlutil/crlgen.h b/security/nss/cmd/crlutil/crlgen.h new file mode 100644 index 0000000000..3ec792108b --- /dev/null +++ b/security/nss/cmd/crlutil/crlgen.h @@ -0,0 +1,178 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef _CRLGEN_H_ +#define _CRLGEN_H_ + +#include "prio.h" +#include "prprf.h" +#include "plhash.h" +#include "seccomon.h" +#include "certt.h" +#include "secoidt.h" + +#define CRLGEN_UNKNOWN_CONTEXT 0 +#define CRLGEN_ISSUER_CONTEXT 1 +#define CRLGEN_UPDATE_CONTEXT 2 +#define CRLGEN_NEXT_UPDATE_CONTEXT 3 +#define CRLGEN_ADD_EXTENSION_CONTEXT 4 +#define CRLGEN_ADD_CERT_CONTEXT 6 +#define CRLGEN_CHANGE_RANGE_CONTEXT 7 +#define CRLGEN_RM_CERT_CONTEXT 8 + +#define CRLGEN_TYPE_DATE 0 +#define CRLGEN_TYPE_ZDATE 1 +#define CRLGEN_TYPE_DIGIT 2 +#define CRLGEN_TYPE_DIGIT_RANGE 3 +#define CRLGEN_TYPE_OID 4 +#define CRLGEN_TYPE_STRING 5 +#define CRLGEN_TYPE_ID 6 + +typedef struct CRLGENGeneratorDataStr CRLGENGeneratorData; +typedef struct CRLGENEntryDataStr CRLGENEntryData; +typedef struct CRLGENExtensionEntryStr CRLGENExtensionEntry; +typedef struct CRLGENCertEntrySrt CRLGENCertEntry; +typedef struct CRLGENCrlFieldStr CRLGENCrlField; +typedef struct CRLGENEntriesSortedDataStr CRLGENEntriesSortedData; + +/* Exported functions */ + +/* Used for initialization of extension handles for crl and certs + * extensions from existing CRL data then modifying existing CRL.*/ +extern SECStatus CRLGEN_ExtHandleInit(CRLGENGeneratorData *crlGenData); + +/* Commits all added entries and their's extensions into CRL. */ +extern SECStatus CRLGEN_CommitExtensionsAndEntries(CRLGENGeneratorData *crlGenData); + +/* Lunches the crl generation script parse */ +extern SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *crlGenData); + +/* Closes crl generation script file and frees crlGenData */ +extern void CRLGEN_FinalizeCrlGeneration(CRLGENGeneratorData *crlGenData); + +/* Parser initialization function. Creates CRLGENGeneratorData structure + * for the current thread */ +extern CRLGENGeneratorData *CRLGEN_InitCrlGeneration(CERTSignedCrl *newCrl, + PRFileDesc *src); + +/* This lock is defined in crlgen_lex.c(derived from crlgen_lex.l). + * It controls access to invocation of yylex, allows to parse one + * script at a time */ +extern void CRLGEN_InitCrlGenParserLock(); +extern void CRLGEN_DestroyCrlGenParserLock(); + +/* The following function types are used to define functions for each of + * CRLGENExtensionEntryStr, CRLGENCertEntrySrt, CRLGENCrlFieldStr to + * provide functionality needed for these structures*/ +typedef SECStatus updateCrlFn_t(CRLGENGeneratorData *crlGenData, void *str); +typedef SECStatus setNextDataFn_t(CRLGENGeneratorData *crlGenData, void *str, + void *data, unsigned short dtype); +typedef SECStatus createNewLangStructFn_t(CRLGENGeneratorData *crlGenData, + void *str, unsigned i); + +/* Sets reports failure to parser if anything goes wrong */ +extern void crlgen_setFailure(CRLGENGeneratorData *str, char *); + +/* Collects data in to one of the current data structure that corresponds + * to the correct context type. This function gets called after each token + * is found for a particular line */ +extern SECStatus crlgen_setNextData(CRLGENGeneratorData *str, void *data, + unsigned short dtype); + +/* initiates crl update with collected data. This function is called at the + * end of each line */ +extern SECStatus crlgen_updateCrl(CRLGENGeneratorData *str); + +/* Creates new context structure depending on token that was parsed + * at the beginning of a line */ +extern SECStatus crlgen_createNewLangStruct(CRLGENGeneratorData *str, + unsigned structType); + +/* CRLGENExtensionEntry is used to store addext request data for either + * CRL extensions or CRL entry extensions. The differentiation between + * is based on order and type of extension been added. + * - extData : all data in request staring from name of the extension are + * in saved here. + * - nextUpdatedData: counter of elements added to extData + */ +struct CRLGENExtensionEntryStr { + char **extData; + int nextUpdatedData; + updateCrlFn_t *updateCrlFn; + setNextDataFn_t *setNextDataFn; +}; + +/* CRLGENCeryestEntry is used to store addcert request data + * - certId : certificate id or range of certificate with dash as a delimiter + * All certs from range will be inclusively added to crl + * - revocationTime: revocation time of cert(s) + */ +struct CRLGENCertEntrySrt { + char *certId; + char *revocationTime; + updateCrlFn_t *updateCrlFn; + setNextDataFn_t *setNextDataFn; +}; + +/* CRLGENCrlField is used to store crl fields record like update time, next + * update time, etc. + * - value: value of the parsed field data*/ +struct CRLGENCrlFieldStr { + char *value; + updateCrlFn_t *updateCrlFn; + setNextDataFn_t *setNextDataFn; +}; + +/* Can not create entries extension until completely done with parsing. + * Therefore need to keep joined data + * - certId : serial number of certificate + * - extHandle: head pointer to a list of extensions that belong to + * entry + * - entry : CERTCrlEntry structure pointer*/ +struct CRLGENEntryDataStr { + SECItem *certId; + void *extHandle; + CERTCrlEntry *entry; +}; + +/* Crl generator/parser main structure. Keeps info regarding current state of + * parser(context, status), parser helper functions pointers, parsed data and + * generated data. + * - contextId : current parsing context. Context in this parser environment + * defines what type of crl operations parser is going through + * in the current line of crl generation script. + * setting or new cert or an extension addition, etc. + * - createNewLangStructFn: pointer to top level function which creates + * data structures according contextId + * - setNextDataFn : pointer to top level function which sets new parsed data + * in temporary structure + * - updateCrlFn : pointer to top level function which triggers actual + * crl update functions with gathered data + * - union : data union create according to contextId + * - rangeFrom, rangeTo : holds last range in which certs was added + * - newCrl : pointer to CERTSignedCrl newly created crl + * - crlExtHandle : pointer to crl extension handle + * - entryDataHashTable: hash of CRLGENEntryData. + * key: cert serial number + * data: CRLGENEntryData pointer + * - parserStatus : current status of parser. Triggers parser to abort when + * set to SECFailure + * - src : PRFileDesc structure pointer of crl generator config file + * - parsedLineNum : currently parsing line. Keeping it to report errors */ +struct CRLGENGeneratorDataStr { + unsigned short contextId; + CRLGENCrlField *crlField; + CRLGENCertEntry *certEntry; + CRLGENExtensionEntry *extensionEntry; + PRUint64 rangeFrom; + PRUint64 rangeTo; + CERTSignedCrl *signCrl; + void *crlExtHandle; + PLHashTable *entryDataHashTable; + + PRFileDesc *src; + int parsedLineNum; +}; + +#endif /* _CRLGEN_H_ */ diff --git a/security/nss/cmd/crlutil/crlgen_lex.c b/security/nss/cmd/crlutil/crlgen_lex.c new file mode 100644 index 0000000000..d5950ff91f --- /dev/null +++ b/security/nss/cmd/crlutil/crlgen_lex.c @@ -0,0 +1,1773 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* A lexical scanner generated by flex */ + +#define FLEX_SCANNER +#define YY_FLEX_MAJOR_VERSION 2 +#define YY_FLEX_MINOR_VERSION 5 + +#include +#ifdef _WIN32 +#include +#else +#include +#endif + +/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ +#ifdef c_plusplus +#ifndef __cplusplus +#define __cplusplus +#endif +#endif + +#ifdef __cplusplus + +#include + +/* Use prototypes in function declarations. */ +#define YY_USE_PROTOS + +/* The "const" storage-class-modifier is valid. */ +#define YY_USE_CONST + +#else /* ! __cplusplus */ + +#if __STDC__ + +#define YY_USE_PROTOS +#define YY_USE_CONST + +#endif /* __STDC__ */ +#endif /* ! __cplusplus */ + +#ifdef __TURBOC__ +#pragma warn - rch +#pragma warn - use +#include +#include +#define YY_USE_CONST +#define YY_USE_PROTOS +#endif + +#ifdef YY_USE_CONST +#define yyconst const +#else +#define yyconst +#endif + +#ifdef YY_USE_PROTOS +#define YY_PROTO(proto) proto +#else +#define YY_PROTO(proto) () +#endif + +/* Returned upon end-of-file. */ +#define YY_NULL 0 + +/* Promotes a possibly negative, possibly signed char to an unsigned + * integer for use as an array index. If the signed char is negative, + * we want to instead treat it as an 8-bit unsigned char, hence the + * double cast. + */ +#define YY_SC_TO_UI(c) ((unsigned int)(unsigned char)c) + +/* Enter a start condition. This macro really ought to take a parameter, + * but we do it the disgusting crufty way forced on us by the ()-less + * definition of BEGIN. + */ +#define BEGIN yy_start = 1 + 2 * + +/* Translate the current start state into a value that can be later handed + * to BEGIN to return to the state. The YYSTATE alias is for lex + * compatibility. + */ +#define YY_START ((yy_start - 1) / 2) +#define YYSTATE YY_START + +/* Action number for EOF rule of a given start state. */ +#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) + +/* Special action meaning "start processing a new file". */ +#define YY_NEW_FILE yyrestart(yyin) + +#define YY_END_OF_BUFFER_CHAR 0 + +/* Size of default input buffer. */ +#define YY_BUF_SIZE 16384 + +typedef struct yy_buffer_state *YY_BUFFER_STATE; + +extern int yyleng; +extern FILE *yyin, *yyout; + +#define EOB_ACT_CONTINUE_SCAN 0 +#define EOB_ACT_END_OF_FILE 1 +#define EOB_ACT_LAST_MATCH 2 + +/* The funky do-while in the following #define is used to turn the definition + * int a single C statement (which needs a semi-colon terminator). This + * avoids problems with code like: + * + * if ( condition_holds ) + * yyless( 5 ); + * else + * do_something_else(); + * + * Prior to using the do-while the compiler would get upset at the + * "else" because it interpreted the "if" statement as being all + * done when it reached the ';' after the yyless() call. + */ + +/* Return all but the first 'n' matched characters back to the input stream. */ + +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + *yy_cp = yy_hold_char; \ + YY_RESTORE_YY_MORE_OFFSET \ + yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + YY_DO_BEFORE_ACTION; /* set up yytext again */ \ + } while (0) + +#define unput(c) yyunput(c, yytext_ptr) + +/* The following is because we cannot portably get our hands on size_t + * (without autoconf's help, which isn't available because we want + * flex-generated scanners to compile on their own). + */ +typedef unsigned int yy_size_t; + +struct yy_buffer_state { + FILE *yy_input_file; + + char *yy_ch_buf; /* input buffer */ + char *yy_buf_pos; /* current position in input buffer */ + + /* Size of input buffer in bytes, not including room for EOB + * characters. + */ + yy_size_t yy_buf_size; + + /* Number of characters read into yy_ch_buf, not including EOB + * characters. + */ + int yy_n_chars; + + /* Whether we "own" the buffer - i.e., we know we created it, + * and can realloc() it to grow it, and should free() it to + * delete it. + */ + int yy_is_our_buffer; + + /* Whether this is an "interactive" input source; if so, and + * if we're using stdio for input, then we want to use getc() + * instead of fread(), to make sure we stop fetching input after + * each newline. + */ + int yy_is_interactive; + + /* Whether we're considered to be at the beginning of a line. + * If so, '^' rules will be active on the next match, otherwise + * not. + */ + int yy_at_bol; + + /* Whether to try to fill the input buffer when we reach the + * end of it. + */ + int yy_fill_buffer; + + int yy_buffer_status; +#define YY_BUFFER_NEW 0 +#define YY_BUFFER_NORMAL 1 +/* When an EOF's been seen but there's still some text to process + * then we mark the buffer as YY_EOF_PENDING, to indicate that we + * shouldn't try reading from the input source any more. We might + * still have a bunch of tokens to match, though, because of + * possible backing-up. + * + * When we actually see the EOF, we change the status to "new" + * (via yyrestart()), so that the user can continue scanning by + * just pointing yyin at a new input file. + */ +#define YY_BUFFER_EOF_PENDING 2 +}; + +static YY_BUFFER_STATE yy_current_buffer = 0; + +/* We provide macros for accessing buffer states in case in the + * future we want to put the buffer states in a more general + * "scanner state". + */ +#define YY_CURRENT_BUFFER yy_current_buffer + +/* yy_hold_char holds the character lost when yytext is formed. */ +static char yy_hold_char; + +static int yy_n_chars; /* number of characters read into yy_ch_buf */ + +int yyleng; + +/* Points to current character in buffer. */ +static char *yy_c_buf_p = (char *)0; +static int yy_init = 1; /* whether we need to initialize */ +static int yy_start = 0; /* start state number */ + +/* Flag which is used to allow yywrap()'s to do buffer switches + * instead of setting up a fresh yyin. A bit of a hack ... + */ +static int yy_did_buffer_switch_on_eof; + +void yyrestart YY_PROTO((FILE * input_file)); + +void yy_switch_to_buffer YY_PROTO((YY_BUFFER_STATE new_buffer)); +void yy_load_buffer_state YY_PROTO((void)); +YY_BUFFER_STATE yy_create_buffer YY_PROTO((FILE * file, int size)); +void yy_delete_buffer YY_PROTO((YY_BUFFER_STATE b)); +void yy_init_buffer YY_PROTO((YY_BUFFER_STATE b, FILE *file)); +void yy_flush_buffer YY_PROTO((YY_BUFFER_STATE b)); +#define YY_FLUSH_BUFFER yy_flush_buffer(yy_current_buffer) + +YY_BUFFER_STATE yy_scan_buffer YY_PROTO((char *base, yy_size_t size)); +YY_BUFFER_STATE yy_scan_string YY_PROTO((yyconst char *yy_str)); +YY_BUFFER_STATE yy_scan_bytes YY_PROTO((yyconst char *bytes, int len)); + +static void *yy_flex_alloc YY_PROTO((yy_size_t)); +static void *yy_flex_realloc YY_PROTO((void *, yy_size_t)); +static void yy_flex_free YY_PROTO((void *)); + +#define yy_new_buffer yy_create_buffer + +#define yy_set_interactive(is_interactive) \ + { \ + if (!yy_current_buffer) \ + yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); \ + yy_current_buffer->yy_is_interactive = is_interactive; \ + } + +#define yy_set_bol(at_bol) \ + { \ + if (!yy_current_buffer) \ + yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); \ + yy_current_buffer->yy_at_bol = at_bol; \ + } + +#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) + +typedef unsigned char YY_CHAR; +FILE *yyin = (FILE *)0, *yyout = (FILE *)0; +typedef int yy_state_type; +extern char *yytext; +#define yytext_ptr yytext + +static yy_state_type yy_get_previous_state YY_PROTO((void)); +static yy_state_type yy_try_NUL_trans YY_PROTO((yy_state_type current_state)); +static int yy_get_next_buffer YY_PROTO((void)); +static void yy_fatal_error YY_PROTO((yyconst char msg[])); + +/* Done after the current pattern has been matched and before the + * corresponding action - sets up yytext. + */ +#define YY_DO_BEFORE_ACTION \ + yytext_ptr = yy_bp; \ + yytext_ptr -= yy_more_len; \ + yyleng = (int)(yy_cp - yytext_ptr); \ + yy_hold_char = *yy_cp; \ + *yy_cp = '\0'; \ + yy_c_buf_p = yy_cp; + +#define YY_NUM_RULES 17 +#define YY_END_OF_BUFFER 18 +/* clang-format off */ +static yyconst short int yy_accept[67] = + { 0, + 0, 0, 18, 16, 14, 15, 16, 11, 12, 2, + 10, 9, 9, 9, 9, 9, 13, 14, 15, 11, + 12, 0, 12, 2, 9, 9, 9, 9, 9, 13, + 3, 4, 2, 9, 9, 9, 9, 2, 9, 9, + 9, 9, 2, 2, 9, 9, 8, 9, 2, 5, + 9, 6, 2, 9, 2, 9, 2, 9, 2, 7, + 2, 2, 2, 2, 1, 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, 6, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 7, 8, 1, 9, 9, 10, + 11, 12, 12, 12, 13, 13, 13, 14, 1, 1, + 15, 1, 1, 1, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, + 1, 1, 1, 1, 1, 1, 18, 16, 16, 19, + + 20, 16, 21, 16, 22, 16, 16, 16, 16, 23, + 16, 24, 16, 25, 26, 27, 28, 16, 16, 29, + 16, 16, 1, 14, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 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[30] = + { 0, + 1, 1, 2, 1, 3, 1, 1, 4, 5, 5, + 5, 5, 5, 4, 1, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 4, 4, 4 + } ; + +static yyconst short int yy_base[72] = + { 0, + 0, 149, 154, 205, 138, 205, 103, 0, 0, 23, + 205, 29, 30, 31, 32, 33, 0, 99, 205, 0, + 0, 0, 50, 55, 34, 61, 41, 63, 64, 0, + 0, 0, 79, 65, 68, 86, 66, 99, 105, 88, + 106, 90, 118, 76, 107, 110, 89, 125, 43, 91, + 127, 128, 138, 144, 113, 129, 154, 160, 160, 130, + 172, 166, 177, 144, 0, 205, 190, 192, 194, 199, + 76 + } ; + +static yyconst short int yy_def[72] = + { 0, + 66, 1, 66, 66, 66, 66, 66, 67, 68, 68, + 66, 69, 69, 69, 69, 69, 70, 66, 66, 67, + 68, 71, 68, 10, 69, 69, 69, 69, 69, 70, + 71, 23, 10, 69, 69, 69, 69, 10, 69, 69, + 69, 69, 10, 38, 69, 69, 69, 69, 38, 69, + 69, 69, 38, 69, 38, 69, 38, 69, 38, 69, + 38, 38, 38, 38, 68, 0, 66, 66, 66, 66, + 66 + } ; + +static yyconst short int yy_nxt[235] = + { 0, + 4, 5, 6, 7, 8, 4, 4, 9, 10, 10, + 10, 10, 10, 9, 11, 12, 12, 12, 12, 12, + 12, 13, 14, 12, 15, 12, 12, 16, 12, 22, + 23, 24, 24, 24, 24, 24, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 28, + 27, 53, 53, 53, 21, 26, 29, 32, 32, 32, + 32, 32, 32, 33, 33, 33, 33, 33, 21, 35, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 31, 21, 37, 42, 44, 36, 34, 38, 38, 38, + 38, 38, 39, 21, 40, 21, 21, 21, 21, 21, + + 18, 21, 21, 21, 21, 19, 41, 43, 44, 44, + 44, 44, 21, 21, 21, 46, 48, 21, 21, 21, + 21, 57, 57, 21, 45, 47, 49, 49, 49, 49, + 49, 50, 21, 51, 21, 21, 21, 21, 21, 18, + 21, 21, 21, 21, 52, 54, 55, 55, 55, 55, + 55, 21, 44, 66, 17, 58, 66, 21, 66, 66, + 65, 56, 59, 59, 59, 59, 59, 21, 61, 61, + 61, 61, 66, 21, 63, 63, 63, 63, 66, 60, + 62, 62, 62, 62, 62, 64, 64, 64, 64, 64, + 20, 20, 66, 20, 20, 21, 21, 25, 25, 30, + + 66, 30, 30, 30, 3, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66 + } ; + +static yyconst short int yy_chk[235] = + { 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, + 10, 10, 10, 10, 10, 10, 12, 13, 14, 15, + 16, 25, 12, 13, 14, 15, 16, 25, 27, 15, + 14, 49, 49, 49, 27, 13, 16, 23, 23, 23, + 23, 23, 23, 24, 24, 24, 24, 24, 26, 27, + 28, 29, 34, 37, 26, 35, 28, 29, 34, 37, + 71, 35, 29, 37, 44, 28, 26, 33, 33, 33, + 33, 33, 34, 36, 35, 40, 47, 42, 50, 36, + + 18, 40, 47, 42, 50, 7, 36, 38, 38, 38, + 38, 38, 39, 41, 45, 40, 42, 46, 39, 41, + 45, 55, 55, 46, 39, 41, 43, 43, 43, 43, + 43, 45, 48, 46, 51, 52, 56, 60, 48, 5, + 51, 52, 56, 60, 48, 51, 53, 53, 53, 53, + 53, 54, 64, 3, 2, 56, 0, 54, 0, 0, + 64, 54, 57, 57, 57, 57, 57, 58, 59, 59, + 59, 59, 0, 58, 62, 62, 62, 62, 0, 58, + 61, 61, 61, 61, 61, 63, 63, 63, 63, 63, + 67, 67, 0, 67, 67, 68, 68, 69, 69, 70, + + 0, 70, 70, 70, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 66, 66 + } ; +/* clang-format on */ + +static yy_state_type yy_last_accepting_state; +static char *yy_last_accepting_cpos; + +/* The intent behind this definition is that it'll catch + * any uses of REJECT which flex missed. + */ +#define REJECT reject_used_but_not_detected +static int yy_more_flag = 0; +static int yy_more_len = 0; +#define yymore() (yy_more_flag = 1) +#define YY_MORE_ADJ yy_more_len +#define YY_RESTORE_YY_MORE_OFFSET +char *yytext; +#line 1 "crlgen_lex_orig.l" +#define INITIAL 0 +#line 2 "crlgen_lex_orig.l" + +#include "crlgen.h" + +static SECStatus parserStatus = SECSuccess; +static CRLGENGeneratorData *parserData; +static PRFileDesc *src; + +#define YY_INPUT(buf, result, max_size) \ + if (parserStatus != SECFailure) { \ + if (((result = PR_Read(src, buf, max_size)) == 0) && \ + ferror(yyin)) \ + return SECFailure; \ + } else { \ + return SECFailure; \ + } + +/* Macros after this point can all be overridden by user definitions in + * section 1. + */ + +#ifndef YY_SKIP_YYWRAP +#ifdef __cplusplus +extern "C" int yywrap YY_PROTO((void)); +#else +extern int yywrap YY_PROTO((void)); +#endif +#endif + +#ifndef YY_NO_UNPUT +static void yyunput YY_PROTO((int c, char *buf_ptr)); +#endif + +#ifndef yytext_ptr +static void yy_flex_strncpy YY_PROTO((char *, yyconst char *, int)); +#endif + +#ifdef YY_NEED_STRLEN +static int yy_flex_strlen YY_PROTO((yyconst char *)); +#endif + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int yyinput YY_PROTO((void)); +#else +static int input YY_PROTO((void)); +#endif +#endif + +#if YY_STACK_USED +static int yy_start_stack_ptr = 0; +static int yy_start_stack_depth = 0; +static int *yy_start_stack = 0; +#ifndef YY_NO_PUSH_STATE +static void yy_push_state YY_PROTO((int new_state)); +#endif +#ifndef YY_NO_POP_STATE +static void yy_pop_state YY_PROTO((void)); +#endif +#ifndef YY_NO_TOP_STATE +static int yy_top_state YY_PROTO((void)); +#endif + +#else +#define YY_NO_PUSH_STATE 1 +#define YY_NO_POP_STATE 1 +#define YY_NO_TOP_STATE 1 +#endif + +#ifdef YY_MALLOC_DECL +YY_MALLOC_DECL +#else +#if __STDC__ +#ifndef __cplusplus +#include +#endif +#else +/* Just try to get by without declaring the routines. This will fail + * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) + * or sizeof(void*) != sizeof(int). + */ +#endif +#endif + +/* Amount of stuff to slurp up with each read. */ +#ifndef YY_READ_BUF_SIZE +#define YY_READ_BUF_SIZE 8192 +#endif + +/* Copy whatever the last rule matched to the standard output. */ + +#ifndef ECHO +/* This used to be an fputs(), but since the string might contain NUL's, + * we now use fwrite(). + */ +#define ECHO (void)fwrite(yytext, yyleng, 1, yyout) +#endif + +/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, + * is returned in "result". + */ +#ifndef YY_INPUT +#define YY_INPUT(buf, result, max_size) \ + if (yy_current_buffer->yy_is_interactive) { \ + int c = '*', n; \ + for (n = 0; n < max_size && \ + (c = getc(yyin)) != EOF && c != '\n'; \ + ++n) \ + buf[n] = (char)c; \ + if (c == '\n') \ + buf[n++] = (char)c; \ + if (c == EOF && ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); \ + result = n; \ + } else if (((result = fread(buf, 1, max_size, yyin)) == 0) && \ + ferror(yyin)) \ + YY_FATAL_ERROR("input in flex scanner failed"); +#endif + +/* No semi-colon after return; correct usage is to write "yyterminate();" - + * we don't want an extra ';' after the "return" because that will cause + * some compilers to complain about unreachable statements. + */ +#ifndef yyterminate +#define yyterminate() return YY_NULL +#endif + +/* Number of entries by which start-condition stack grows. */ +#ifndef YY_START_STACK_INCR +#define YY_START_STACK_INCR 25 +#endif + +/* Report a fatal error. */ +#ifndef YY_FATAL_ERROR +#define YY_FATAL_ERROR(msg) yy_fatal_error(msg) +#endif + +/* Default declaration of generated scanner - a define so the user can + * easily add parameters. + */ +#ifndef YY_DECL +#define YY_DECL int yylex YY_PROTO((void)) +#endif + +/* Code executed at the beginning of each rule, after yytext and yyleng + * have been set up. + */ +#ifndef YY_USER_ACTION +#define YY_USER_ACTION +#endif + +/* Code executed at the end of each rule. */ +#ifndef YY_BREAK +#define YY_BREAK break; +#endif + +#define YY_RULE_SETUP \ + if (yyleng > 0) \ + yy_current_buffer->yy_at_bol = \ + (yytext[yyleng - 1] == '\n'); \ + YY_USER_ACTION + +YY_DECL +{ + register yy_state_type yy_current_state; + register char *yy_cp = NULL, *yy_bp = NULL; + register int yy_act; + +#line 28 "crlgen_lex_orig.l" + + if (yy_init) { + yy_init = 0; + +#ifdef YY_USER_INIT + YY_USER_INIT; +#endif + + if (!yy_start) + yy_start = 1; /* first start state */ + + if (!yyin) + yyin = stdin; + + if (!yyout) + yyout = stdout; + + if (!yy_current_buffer) + yy_current_buffer = + yy_create_buffer(yyin, YY_BUF_SIZE); + + yy_load_buffer_state(); + } + + while (1) /* loops until end-of-file is reached */ + { + yy_more_len = 0; + if (yy_more_flag) { + yy_more_len = yy_c_buf_p - yytext_ptr; + yy_more_flag = 0; + } + yy_cp = yy_c_buf_p; + + /* Support of yytext. */ + *yy_cp = yy_hold_char; + + /* yy_bp points to the position in yy_ch_buf of the start of + * the current run. + */ + yy_bp = yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + yy_match: + do { + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + if (yy_accept[yy_current_state]) { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 67) + yy_c = yy_meta[(unsigned int)yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c]; + ++yy_cp; + } while (yy_base[yy_current_state] != 205); + + yy_find_action: + yy_act = yy_accept[yy_current_state]; + if (yy_act == 0) { /* have to back up */ + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + yy_act = yy_accept[yy_current_state]; + } + + YY_DO_BEFORE_ACTION; + + do_action: /* This label is used only to access EOF actions. */ + + switch (yy_act) { /* beginning of action switch */ + case 0: /* must back up */ + /* undo the effects of YY_DO_BEFORE_ACTION */ + *yy_cp = yy_hold_char; + yy_cp = yy_last_accepting_cpos; + yy_current_state = yy_last_accepting_state; + goto yy_find_action; + + case 1: + YY_RULE_SETUP +#line 30 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 2: + YY_RULE_SETUP +#line 36 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 3: + YY_RULE_SETUP +#line 42 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 4: + YY_RULE_SETUP +#line 48 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 5: + YY_RULE_SETUP +#line 54 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 6: + YY_RULE_SETUP +#line 60 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 7: + YY_RULE_SETUP +#line 65 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 8: + YY_RULE_SETUP +#line 71 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 9: + YY_RULE_SETUP +#line 77 "crlgen_lex_orig.l" + { + if (strcmp(yytext, "addcert") == + 0) { + parserStatus = + crlgen_createNewLangStruct(parserData, + CRLGEN_ADD_CERT_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } else if (strcmp(yytext, "rmcert") == + 0) { + parserStatus = + crlgen_createNewLangStruct(parserData, + CRLGEN_RM_CERT_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } else if (strcmp(yytext, "addext") == + 0) { + parserStatus = + crlgen_createNewLangStruct(parserData, + CRLGEN_ADD_EXTENSION_CONTEXT); + if (parserStatus != + SECSuccess) + return parserStatus; + } else { + parserStatus = + crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID); + if (parserStatus != + SECSuccess) + return parserStatus; + } + } + YY_BREAK + case 10: + YY_RULE_SETUP +#line 100 "crlgen_lex_orig.l" + + YY_BREAK + case 11: + YY_RULE_SETUP +#line 102 "crlgen_lex_orig.l" + { + if (yytext[yyleng - + 1] == + '\\') { + yymore(); + } else { + register int c; + c = + input(); + if (c != + '\"') { + printf("Error: Line ending \" is missing: %c\n", c); + unput(c); + } else { + parserStatus = + crlgen_setNextData(parserData, yytext + 1, + CRLGEN_TYPE_STRING); + if (parserStatus != + SECSuccess) + return parserStatus; + } + } + } + YY_BREAK + case 12: + YY_RULE_SETUP +#line 120 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 13: + YY_RULE_SETUP +#line 128 "crlgen_lex_orig.l" + /* eat up one-line comments */ {} + YY_BREAK + case 14: + YY_RULE_SETUP +#line 130 "crlgen_lex_orig.l" + { + } + YY_BREAK + case 15: + YY_RULE_SETUP +#line 132 "crlgen_lex_orig.l" + { + parserStatus = + crlgen_updateCrl(parserData); + if (parserStatus != + SECSuccess) + return parserStatus; + } + YY_BREAK + case 16: + YY_RULE_SETUP +#line 138 "crlgen_lex_orig.l" + { + fprintf(stderr, "Syntax error at line %d: unknown token %s\n", + parserData->parsedLineNum, yytext); + return SECFailure; + } + YY_BREAK + case 17: + YY_RULE_SETUP +#line 144 "crlgen_lex_orig.l" + ECHO; + YY_BREAK + case YY_STATE_EOF(INITIAL): + yyterminate(); + + case YY_END_OF_BUFFER: { + /* Amount of text matched not including the EOB char. */ + int yy_amount_of_matched_text = (int)(yy_cp - yytext_ptr) - 1; + + /* Undo the effects of YY_DO_BEFORE_ACTION. */ + *yy_cp = yy_hold_char; + YY_RESTORE_YY_MORE_OFFSET + + if (yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW) { + /* We're scanning a new file or input source. It's + * possible that this happened because the user + * just pointed yyin at a new source and called + * yylex(). If so, then we have to assure + * consistency between yy_current_buffer and our + * globals. Here is the right place to do so, because + * this is the first action (other than possibly a + * back-up) that will match for the new input source. + */ + yy_n_chars = yy_current_buffer->yy_n_chars; + yy_current_buffer->yy_input_file = yyin; + yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + } + + /* Note that here we test for yy_c_buf_p "<=" to the position + * of the first EOB in the buffer, since yy_c_buf_p will + * already have been incremented past the NUL character + * (since all states make transitions on EOB to the + * end-of-buffer state). Contrast this with the test + * in input(). + */ + if (yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars]) { /* This was really a NUL. */ + yy_state_type yy_next_state; + + yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + /* Okay, we're now positioned to make the NUL + * transition. We couldn't have + * yy_get_previous_state() go ahead and do it + * for us because it doesn't know how to deal + * with the possibility of jamming (and we don't + * want to build jamming into it because then it + * will run more slowly). + */ + + yy_next_state = yy_try_NUL_trans(yy_current_state); + + yy_bp = yytext_ptr + YY_MORE_ADJ; + + if (yy_next_state) { + /* Consume the NUL. */ + yy_cp = ++yy_c_buf_p; + yy_current_state = yy_next_state; + goto yy_match; + } + + else { + yy_cp = yy_c_buf_p; + goto yy_find_action; + } + } + + else + switch (yy_get_next_buffer()) { + case EOB_ACT_END_OF_FILE: { + yy_did_buffer_switch_on_eof = 0; + + if (yywrap()) { + /* Note: because we've taken care in + * yy_get_next_buffer() to have set up + * yytext, we can now set up + * yy_c_buf_p so that if some total + * hoser (like flex itself) wants to + * call the scanner after we return the + * YY_NULL, it'll still work - another + * YY_NULL will get returned. + */ + yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + + yy_act = YY_STATE_EOF(YY_START); + goto do_action; + } + + else { + if (!yy_did_buffer_switch_on_eof) + YY_NEW_FILE; + } + break; + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = + yytext_ptr + yy_amount_of_matched_text; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_match; + + case EOB_ACT_LAST_MATCH: + yy_c_buf_p = + &yy_current_buffer->yy_ch_buf[yy_n_chars]; + + yy_current_state = yy_get_previous_state(); + + yy_cp = yy_c_buf_p; + yy_bp = yytext_ptr + YY_MORE_ADJ; + goto yy_find_action; + } + break; + } + + default: + YY_FATAL_ERROR( + "fatal flex scanner internal error--no action found"); + } /* end of action switch */ + } /* end of scanning one token */ +} /* end of yylex */ + +/* yy_get_next_buffer - try to read in a new buffer + * + * Returns a code representing an action: + * EOB_ACT_LAST_MATCH - + * EOB_ACT_CONTINUE_SCAN - continue scanning from current position + * EOB_ACT_END_OF_FILE - end of file + */ + +static int +yy_get_next_buffer() +{ + register char *dest = yy_current_buffer->yy_ch_buf; + register char *source = yytext_ptr; + register int number_to_move, i; + int ret_val; + + if (yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1]) + YY_FATAL_ERROR( + "fatal flex scanner internal error--end of buffer missed"); + + if (yy_current_buffer->yy_fill_buffer == 0) { /* Don't try to fill the buffer, so this is an EOF. */ + if (yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1) { + /* We matched a single character, the EOB, so + * treat this as a final EOF. + */ + return EOB_ACT_END_OF_FILE; + } + + else { + /* We matched some text prior to the EOB, first + * process it. + */ + return EOB_ACT_LAST_MATCH; + } + } + + /* Try to read more data. */ + + /* First move last chars to start of buffer. */ + number_to_move = (int)(yy_c_buf_p - yytext_ptr) - 1; + + for (i = 0; i < number_to_move; ++i) + *(dest++) = *(source++); + + if (yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING) + /* don't do the read, it's not guaranteed to return an EOF, + * just force an EOF + */ + yy_current_buffer->yy_n_chars = yy_n_chars = 0; + + else { + int num_to_read = + yy_current_buffer->yy_buf_size - number_to_move - 1; + + while (num_to_read <= 0) { /* Not enough room in the buffer - grow it. */ +#ifdef YY_USES_REJECT + YY_FATAL_ERROR( + "input buffer overflow, can't enlarge buffer because scanner uses REJECT"); +#else + + /* just a shorter name for the current buffer */ + YY_BUFFER_STATE b = yy_current_buffer; + + int yy_c_buf_p_offset = + (int)(yy_c_buf_p - b->yy_ch_buf); + + if (b->yy_is_our_buffer) { + int new_size = b->yy_buf_size * 2; + + if (new_size <= 0) + b->yy_buf_size += b->yy_buf_size / 8; + else + b->yy_buf_size *= 2; + + b->yy_ch_buf = (char *) + /* Include room in for 2 EOB chars. */ + yy_flex_realloc((void *)b->yy_ch_buf, + b->yy_buf_size + 2); + } else + /* Can't grow it, we don't own it. */ + b->yy_ch_buf = 0; + + if (!b->yy_ch_buf) + YY_FATAL_ERROR( + "fatal error - scanner input buffer overflow"); + + yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + + num_to_read = yy_current_buffer->yy_buf_size - + number_to_move - 1; +#endif + } + + if (num_to_read > YY_READ_BUF_SIZE) + num_to_read = YY_READ_BUF_SIZE; + + /* Read in more data. */ + YY_INPUT((&yy_current_buffer->yy_ch_buf[number_to_move]), + yy_n_chars, num_to_read); + + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + if (yy_n_chars == 0) { + if (number_to_move == YY_MORE_ADJ) { + ret_val = EOB_ACT_END_OF_FILE; + yyrestart(yyin); + } + + else { + ret_val = EOB_ACT_LAST_MATCH; + yy_current_buffer->yy_buffer_status = + YY_BUFFER_EOF_PENDING; + } + } + + else + ret_val = EOB_ACT_CONTINUE_SCAN; + + yy_n_chars += number_to_move; + yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; + yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + + yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + + return ret_val; +} + +/* yy_get_previous_state - get the state just before the EOB char was reached */ + +static yy_state_type +yy_get_previous_state() +{ + register yy_state_type yy_current_state; + register char *yy_cp; + + yy_current_state = yy_start; + yy_current_state += YY_AT_BOL(); + + for (yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp) { + register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + if (yy_accept[yy_current_state]) { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 67) + yy_c = yy_meta[(unsigned int)yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c]; + } + + return yy_current_state; +} + +/* yy_try_NUL_trans - try to make a transition on the NUL character + * + * synopsis + * next_state = yy_try_NUL_trans( current_state ); + */ + +#ifdef YY_USE_PROTOS +static yy_state_type +yy_try_NUL_trans(yy_state_type yy_current_state) +#else +static yy_state_type yy_try_NUL_trans(yy_current_state) + yy_state_type yy_current_state; +#endif +{ + register int yy_is_jam; + register char *yy_cp = yy_c_buf_p; + + register YY_CHAR yy_c = 1; + if (yy_accept[yy_current_state]) { + yy_last_accepting_state = yy_current_state; + yy_last_accepting_cpos = yy_cp; + } + while (yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state) { + yy_current_state = (int)yy_def[yy_current_state]; + if (yy_current_state >= 67) + yy_c = yy_meta[(unsigned int)yy_c]; + } + yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int)yy_c]; + yy_is_jam = (yy_current_state == 66); + + return yy_is_jam ? 0 : yy_current_state; +} + +#ifndef YY_NO_UNPUT +#ifdef YY_USE_PROTOS +static void +yyunput(int c, register char *yy_bp) +#else +static void yyunput(c, yy_bp) int c; +register char *yy_bp; +#endif +{ + register char *yy_cp = yy_c_buf_p; + + /* undo effects of setting up yytext */ + *yy_cp = yy_hold_char; + + if (yy_cp < yy_current_buffer->yy_ch_buf + 2) { /* need to shift things up to make room */ + /* +2 for EOB chars. */ + register int number_to_move = yy_n_chars + 2; + register char *dest = &yy_current_buffer->yy_ch_buf[yy_current_buffer->yy_buf_size + + 2]; + register char *source = + &yy_current_buffer->yy_ch_buf[number_to_move]; + + while (source > yy_current_buffer->yy_ch_buf) + *--dest = *--source; + + yy_cp += (int)(dest - source); + yy_bp += (int)(dest - source); + yy_current_buffer->yy_n_chars = + yy_n_chars = yy_current_buffer->yy_buf_size; + + if (yy_cp < yy_current_buffer->yy_ch_buf + 2) + YY_FATAL_ERROR("flex scanner push-back overflow"); + } + + *--yy_cp = (char)c; + + yytext_ptr = yy_bp; + yy_hold_char = *yy_cp; + yy_c_buf_p = yy_cp; +} +#endif /* ifndef YY_NO_UNPUT */ + +#ifndef YY_NO_INPUT +#ifdef __cplusplus +static int +yyinput() +#else +static int +input() +#endif +{ + int c; + + *yy_c_buf_p = yy_hold_char; + + if (*yy_c_buf_p == YY_END_OF_BUFFER_CHAR) { + /* yy_c_buf_p now points to the character we want to return. + * If this occurs *before* the EOB characters, then it's a + * valid NUL; if not, then we've hit the end of the buffer. + */ + if (yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars]) + /* This was really a NUL. */ + *yy_c_buf_p = '\0'; + + else { /* need more input */ + int offset = yy_c_buf_p - yytext_ptr; + ++yy_c_buf_p; + + switch (yy_get_next_buffer()) { + case EOB_ACT_LAST_MATCH: + /* This happens because yy_g_n_b() + * sees that we've accumulated a + * token and flags that we need to + * try matching the token before + * proceeding. But for input(), + * there's no matching to consider. + * So convert the EOB_ACT_LAST_MATCH + * to EOB_ACT_END_OF_FILE. + */ + + /* Reset buffer status. */ + yyrestart(yyin); + + /* fall through */ + + case EOB_ACT_END_OF_FILE: { + if (yywrap()) + return EOF; + + if (!yy_did_buffer_switch_on_eof) + YY_NEW_FILE; +#ifdef __cplusplus + return yyinput(); +#else + return input(); +#endif + } + + case EOB_ACT_CONTINUE_SCAN: + yy_c_buf_p = yytext_ptr + offset; + break; + } + } + } + + c = *(unsigned char *)yy_c_buf_p; /* cast for 8-bit char's */ + *yy_c_buf_p = '\0'; /* preserve yytext */ + yy_hold_char = *++yy_c_buf_p; + + yy_current_buffer->yy_at_bol = (c == '\n'); + + return c; +} +#endif /* YY_NO_INPUT */ + +#ifdef YY_USE_PROTOS +void +yyrestart(FILE *input_file) +#else +void yyrestart(input_file) + FILE *input_file; +#endif +{ + if (!yy_current_buffer) + yy_current_buffer = yy_create_buffer(yyin, YY_BUF_SIZE); + + yy_init_buffer(yy_current_buffer, input_file); + yy_load_buffer_state(); +} + +#ifdef YY_USE_PROTOS +void +yy_switch_to_buffer(YY_BUFFER_STATE new_buffer) +#else +void yy_switch_to_buffer(new_buffer) + YY_BUFFER_STATE new_buffer; +#endif +{ + if (yy_current_buffer == new_buffer) + return; + + if (yy_current_buffer) { + /* Flush out information for old buffer. */ + *yy_c_buf_p = yy_hold_char; + yy_current_buffer->yy_buf_pos = yy_c_buf_p; + yy_current_buffer->yy_n_chars = yy_n_chars; + } + + yy_current_buffer = new_buffer; + yy_load_buffer_state(); + + /* We don't actually know whether we did this switch during + * EOF (yywrap()) processing, but the only time this flag + * is looked at is after yywrap() is called, so it's safe + * to go ahead and always set it. + */ + yy_did_buffer_switch_on_eof = 1; +} + +#ifdef YY_USE_PROTOS +void +yy_load_buffer_state(void) +#else +void +yy_load_buffer_state() +#endif +{ + yy_n_chars = yy_current_buffer->yy_n_chars; + yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; + yyin = yy_current_buffer->yy_input_file; + yy_hold_char = *yy_c_buf_p; +} + +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE +yy_create_buffer(FILE *file, int size) +#else +YY_BUFFER_STATE yy_create_buffer(file, size) + FILE *file; +int size; +#endif +{ + YY_BUFFER_STATE b; + + b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state)); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + + b->yy_buf_size = size; + + /* yy_ch_buf has to be 2 characters longer than the size given because + * we need to put in 2 end-of-buffer characters. + */ + b->yy_ch_buf = (char *)yy_flex_alloc(b->yy_buf_size + 2); + if (!b->yy_ch_buf) + YY_FATAL_ERROR("out of dynamic memory in yy_create_buffer()"); + + b->yy_is_our_buffer = 1; + + yy_init_buffer(b, file); + + return b; +} + +#ifdef YY_USE_PROTOS +void +yy_delete_buffer(YY_BUFFER_STATE b) +#else +void yy_delete_buffer(b) + YY_BUFFER_STATE b; +#endif +{ + if (!b) + return; + + if (b == yy_current_buffer) + yy_current_buffer = (YY_BUFFER_STATE)0; + + if (b->yy_is_our_buffer) + yy_flex_free((void *)b->yy_ch_buf); + + yy_flex_free((void *)b); +} + +#ifdef YY_USE_PROTOS +void +yy_init_buffer(YY_BUFFER_STATE b, FILE *file) +#else +void yy_init_buffer(b, file) + YY_BUFFER_STATE b; +FILE *file; +#endif + +{ + yy_flush_buffer(b); + + b->yy_input_file = file; + b->yy_fill_buffer = 1; + +#if YY_ALWAYS_INTERACTIVE + b->yy_is_interactive = 1; +#else +#if YY_NEVER_INTERACTIVE + b->yy_is_interactive = 0; +#else + b->yy_is_interactive = file ? (isatty(fileno(file)) > 0) : 0; +#endif +#endif +} + +#ifdef YY_USE_PROTOS +void +yy_flush_buffer(YY_BUFFER_STATE b) +#else +void yy_flush_buffer(b) + YY_BUFFER_STATE b; +#endif + +{ + if (!b) + return; + + b->yy_n_chars = 0; + + /* We always need two end-of-buffer characters. The first causes + * a transition to the end-of-buffer state. The second causes + * a jam in that state. + */ + b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; + b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; + + b->yy_buf_pos = &b->yy_ch_buf[0]; + + b->yy_at_bol = 1; + b->yy_buffer_status = YY_BUFFER_NEW; + + if (b == yy_current_buffer) + yy_load_buffer_state(); +} + +#ifndef YY_NO_SCAN_BUFFER +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE +yy_scan_buffer(char *base, yy_size_t size) +#else +YY_BUFFER_STATE yy_scan_buffer(base, size) char *base; +yy_size_t size; +#endif +{ + YY_BUFFER_STATE b; + + if (size < 2 || + base[size - 2] != YY_END_OF_BUFFER_CHAR || + base[size - 1] != YY_END_OF_BUFFER_CHAR) + /* They forgot to leave room for the EOB's. */ + return 0; + + b = (YY_BUFFER_STATE)yy_flex_alloc(sizeof(struct yy_buffer_state)); + if (!b) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_buffer()"); + + b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ + b->yy_buf_pos = b->yy_ch_buf = base; + b->yy_is_our_buffer = 0; + b->yy_input_file = 0; + b->yy_n_chars = b->yy_buf_size; + b->yy_is_interactive = 0; + b->yy_at_bol = 1; + b->yy_fill_buffer = 0; + b->yy_buffer_status = YY_BUFFER_NEW; + + yy_switch_to_buffer(b); + + return b; +} +#endif + +#ifndef YY_NO_SCAN_STRING +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE +yy_scan_string(yyconst char *yy_str) +#else +YY_BUFFER_STATE yy_scan_string(yy_str) + yyconst char *yy_str; +#endif +{ + int len; + for (len = 0; yy_str[len]; ++len) + ; + + return yy_scan_bytes(yy_str, len); +} +#endif + +#ifndef YY_NO_SCAN_BYTES +#ifdef YY_USE_PROTOS +YY_BUFFER_STATE +yy_scan_bytes(yyconst char *bytes, int len) +#else +YY_BUFFER_STATE yy_scan_bytes(bytes, len) + yyconst char *bytes; +int len; +#endif +{ + YY_BUFFER_STATE b; + char *buf; + yy_size_t n; + int i; + + /* Get memory for full buffer, including space for trailing EOB's. */ + n = len + 2; + buf = (char *)yy_flex_alloc(n); + if (!buf) + YY_FATAL_ERROR("out of dynamic memory in yy_scan_bytes()"); + + for (i = 0; i < len; ++i) + buf[i] = bytes[i]; + + buf[len] = buf[len + 1] = YY_END_OF_BUFFER_CHAR; + + b = yy_scan_buffer(buf, n); + if (!b) + YY_FATAL_ERROR("bad buffer in yy_scan_bytes()"); + + /* It's okay to grow etc. this buffer, and we should throw it + * away when we're done. + */ + b->yy_is_our_buffer = 1; + + return b; +} +#endif + +#ifndef YY_NO_PUSH_STATE +#ifdef YY_USE_PROTOS +static void +yy_push_state(int new_state) +#else +static void yy_push_state(new_state) int new_state; +#endif +{ + if (yy_start_stack_ptr >= yy_start_stack_depth) { + yy_size_t new_size; + + yy_start_stack_depth += YY_START_STACK_INCR; + new_size = yy_start_stack_depth * sizeof(int); + + if (!yy_start_stack) + yy_start_stack = (int *)yy_flex_alloc(new_size); + + else + yy_start_stack = (int *)yy_flex_realloc( + (void *)yy_start_stack, new_size); + + if (!yy_start_stack) + YY_FATAL_ERROR( + "out of memory expanding start-condition stack"); + } + + yy_start_stack[yy_start_stack_ptr++] = YY_START; + + BEGIN(new_state); +} +#endif + +#ifndef YY_NO_POP_STATE +static void +yy_pop_state() +{ + if (--yy_start_stack_ptr < 0) + YY_FATAL_ERROR("start-condition stack underflow"); + + BEGIN(yy_start_stack[yy_start_stack_ptr]); +} +#endif + +#ifndef YY_NO_TOP_STATE +static int +yy_top_state() +{ + return yy_start_stack[yy_start_stack_ptr - 1]; +} +#endif + +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 +#endif + +#ifdef YY_USE_PROTOS +static void +yy_fatal_error(yyconst char msg[]) +#else +static void yy_fatal_error(msg) char msg[]; +#endif +{ + (void)fprintf(stderr, "%s\n", msg); + exit(YY_EXIT_FAILURE); +} + +/* Redefine yyless() so it works in section 3 code. */ + +#undef yyless +#define yyless(n) \ + do { \ + /* Undo effects of setting up yytext. */ \ + yytext[yyleng] = yy_hold_char; \ + yy_c_buf_p = yytext + n; \ + yy_hold_char = *yy_c_buf_p; \ + *yy_c_buf_p = '\0'; \ + yyleng = n; \ + } while (0) + +/* Internal utility routines. */ + +#ifndef yytext_ptr +#ifdef YY_USE_PROTOS +static void +yy_flex_strncpy(char *s1, yyconst char *s2, int n) +#else +static void yy_flex_strncpy(s1, s2, n) char *s1; +yyconst char *s2; +int n; +#endif +{ + register int i; + for (i = 0; i < n; ++i) + s1[i] = s2[i]; +} +#endif + +#ifdef YY_NEED_STRLEN +#ifdef YY_USE_PROTOS +static int +yy_flex_strlen(yyconst char *s) +#else +static int yy_flex_strlen(s) + yyconst char *s; +#endif +{ + register int n; + for (n = 0; s[n]; ++n) + ; + + return n; +} +#endif + +#ifdef YY_USE_PROTOS +static void * +yy_flex_alloc(yy_size_t size) +#else +static void *yy_flex_alloc(size) + yy_size_t size; +#endif +{ + return (void *)malloc(size); +} + +#ifdef YY_USE_PROTOS +static void * +yy_flex_realloc(void *ptr, yy_size_t size) +#else +static void *yy_flex_realloc(ptr, size) void *ptr; +yy_size_t size; +#endif +{ + /* The cast to (char *) in the following accommodates both + * implementations that use char* generic pointers, and those + * that use void* generic pointers. It works with the latter + * because both ANSI C and C++ allow castless assignment from + * any pointer type to void*, and deal with argument conversions + * as though doing an assignment. + */ + return (void *)realloc((char *)ptr, size); +} + +#ifdef YY_USE_PROTOS +static void +yy_flex_free(void *ptr) +#else +static void yy_flex_free(ptr) void *ptr; +#endif +{ + free(ptr); +} + +#if YY_MAIN +int +main() +{ + yylex(); + return 0; +} +#endif +#line 144 "crlgen_lex_orig.l" + +#include "prlock.h" + +static PRLock *parserInvocationLock; + +void +CRLGEN_InitCrlGenParserLock() +{ + parserInvocationLock = PR_NewLock(); +} + +void +CRLGEN_DestroyCrlGenParserLock() +{ + PR_DestroyLock(parserInvocationLock); +} + +SECStatus +CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData) +{ + SECStatus rv; + + PR_Lock(parserInvocationLock); + + parserStatus = SECSuccess; + parserData = parserCtlData; + src = parserCtlData->src; + + rv = yylex(); + + PR_Unlock(parserInvocationLock); + + return rv; +} + +int +yywrap() +{ + return 1; +} diff --git a/security/nss/cmd/crlutil/crlgen_lex_fix.sed b/security/nss/cmd/crlutil/crlgen_lex_fix.sed new file mode 100644 index 0000000000..603dd2d1be --- /dev/null +++ b/security/nss/cmd/crlutil/crlgen_lex_fix.sed @@ -0,0 +1,6 @@ +// { + i #ifdef _WIN32 + i #include + i #else + a #endif +} diff --git a/security/nss/cmd/crlutil/crlgen_lex_orig.l b/security/nss/cmd/crlutil/crlgen_lex_orig.l new file mode 100644 index 0000000000..a412e9892e --- /dev/null +++ b/security/nss/cmd/crlutil/crlgen_lex_orig.l @@ -0,0 +1,181 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +%{ + +#include "crlgen.h" + +static SECStatus parserStatus = SECSuccess; +static CRLGENGeneratorData *parserData; +static PRFileDesc *src; + +#define YY_INPUT(buf,result,max_size) \ + if ( parserStatus != SECFailure) { \ + if (((result = PR_Read(src, buf, max_size)) == 0) && \ + ferror( yyin )) \ + return SECFailure; \ + } else { return SECFailure; } + + +%} + +%a 5000 +DIGIT [0-9]+ +DIGIT_RANGE [0-9]+-[0-9]+ +ID [a-zA-Z][a-zA-Z0-9]* +OID [0-9]+\.[\.0-9]+ +DATE [0-9]{4}[01][0-9][0-3][0-9][0-2][0-9][0-6][0-9][0-6][0-9] +ZDATE [0-9]{4}[01][0-9][0-3][0-9][0-2][0-9][0-6][0-9][0-6][0-9]Z +N_SP_STRING [a-zA-Z0-9\:\|\.]+ + +%% + +{ZDATE} { +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ZDATE); +if (parserStatus != SECSuccess) + return parserStatus; +} + +{DIGIT} { +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT); +if (parserStatus != SECSuccess) + return parserStatus; +} + +{DIGIT_RANGE} { +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_DIGIT_RANGE); +if (parserStatus != SECSuccess) + return parserStatus; +} + +{OID} { +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_OID); +if (parserStatus != SECSuccess) + return parserStatus; +} + +issuer { +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_ISSUER_CONTEXT); +if (parserStatus != SECSuccess) + return parserStatus; +} + +update { +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_UPDATE_CONTEXT); +if (parserStatus != SECSuccess) + return parserStatus; +} +nextupdate { +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_NEXT_UPDATE_CONTEXT); +if (parserStatus != SECSuccess) + return parserStatus; +} + +range { +parserStatus = crlgen_createNewLangStruct(parserData, CRLGEN_CHANGE_RANGE_CONTEXT); +if (parserStatus != SECSuccess) + return parserStatus; +} + +{ID} { +if (strcmp(yytext, "addcert") == 0) { + parserStatus = crlgen_createNewLangStruct(parserData, + CRLGEN_ADD_CERT_CONTEXT); + if (parserStatus != SECSuccess) + return parserStatus; +} else if (strcmp(yytext, "rmcert") == 0) { + parserStatus = crlgen_createNewLangStruct(parserData, + CRLGEN_RM_CERT_CONTEXT); + if (parserStatus != SECSuccess) + return parserStatus; +} else if (strcmp(yytext, "addext") == 0) { + parserStatus = crlgen_createNewLangStruct(parserData, + CRLGEN_ADD_EXTENSION_CONTEXT); + if (parserStatus != SECSuccess) + return parserStatus; +} else { + parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_ID); + if (parserStatus != SECSuccess) + return parserStatus; +} +} + +"=" + +\"[^\"]* { +if (yytext[yyleng-1] == '\\') { + yymore(); +} else { + register int c; + c = input(); + if (c != '\"') { + printf( "Error: Line ending \" is missing: %c\n", c); + unput(c); + } else { + parserStatus = crlgen_setNextData(parserData, yytext + 1, + CRLGEN_TYPE_STRING); + if (parserStatus != SECSuccess) + return parserStatus; + } +} +} + +{N_SP_STRING} { +parserStatus = crlgen_setNextData(parserData, yytext, CRLGEN_TYPE_STRING); +if (parserStatus != SECSuccess) + return parserStatus; +} + + + +^#[^\n]* /* eat up one-line comments */ {} + +[ \t]+ {} + +(\n|\r\n) { +parserStatus = crlgen_updateCrl(parserData); +if (parserStatus != SECSuccess) + return parserStatus; +} + +. { + fprintf(stderr, "Syntax error at line %d: unknown token %s\n", + parserData->parsedLineNum, yytext); + return SECFailure; +} + +%% +#include "prlock.h" + +static PRLock *parserInvocationLock; + +void CRLGEN_InitCrlGenParserLock() +{ + parserInvocationLock = PR_NewLock(); +} + +void CRLGEN_DestroyCrlGenParserLock() +{ + PR_DestroyLock(parserInvocationLock); +} + + +SECStatus CRLGEN_StartCrlGen(CRLGENGeneratorData *parserCtlData) +{ + SECStatus rv; + + PR_Lock(parserInvocationLock); + + parserStatus = SECSuccess; + parserData = parserCtlData; + src = parserCtlData->src; + + rv = yylex(); + + PR_Unlock(parserInvocationLock); + + return rv; +} + +int yywrap() {return 1;} diff --git a/security/nss/cmd/crlutil/crlutil.c b/security/nss/cmd/crlutil/crlutil.c new file mode 100644 index 0000000000..89ac46c737 --- /dev/null +++ b/security/nss/cmd/crlutil/crlutil.c @@ -0,0 +1,1144 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* +** certutil.c +** +** utility for managing certificates and the cert database +** +*/ +/* test only */ + +#include "nspr.h" +#include "plgetopt.h" +#include "secutil.h" +#include "cert.h" +#include "certi.h" +#include "certdb.h" +#include "nss.h" +#include "pk11func.h" +#include "crlgen.h" + +#define SEC_CERT_DB_EXISTS 0 +#define SEC_CREATE_CERT_DB 1 + +static char *progName; + +static CERTSignedCrl * +FindCRL(CERTCertDBHandle *certHandle, char *name, int type) +{ + CERTSignedCrl *crl = NULL; + CERTCertificate *cert = NULL; + SECItem derName; + + derName.data = NULL; + derName.len = 0; + + cert = CERT_FindCertByNicknameOrEmailAddr(certHandle, name); + if (!cert) { + CERTName *certName = NULL; + PLArenaPool *arena = NULL; + SECStatus rv = SECSuccess; + + certName = CERT_AsciiToName(name); + if (certName) { + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (arena) { + SECItem *nameItem = + SEC_ASN1EncodeItem(arena, NULL, (void *)certName, + SEC_ASN1_GET(CERT_NameTemplate)); + if (nameItem) { + rv = SECITEM_CopyItem(NULL, &derName, nameItem); + } + PORT_FreeArena(arena, PR_FALSE); + } + CERT_DestroyName(certName); + } + + if (rv != SECSuccess) { + SECU_PrintError(progName, "SECITEM_CopyItem failed, out of memory"); + return ((CERTSignedCrl *)NULL); + } + + if (!derName.len || !derName.data) { + SECU_PrintError(progName, "could not find certificate named '%s'", name); + return ((CERTSignedCrl *)NULL); + } + } else { + SECStatus rv = SECITEM_CopyItem(NULL, &derName, &cert->derSubject); + CERT_DestroyCertificate(cert); + if (rv != SECSuccess) { + return ((CERTSignedCrl *)NULL); + } + } + + crl = SEC_FindCrlByName(certHandle, &derName, type); + if (crl == NULL) + SECU_PrintError(progName, "could not find %s's CRL", name); + if (derName.data) { + SECITEM_FreeItem(&derName, PR_FALSE); + } + return (crl); +} + +static SECStatus +DisplayCRL(CERTCertDBHandle *certHandle, char *nickName, int crlType) +{ + CERTSignedCrl *crl = NULL; + + crl = FindCRL(certHandle, nickName, crlType); + + if (crl) { + SECU_PrintCRLInfo(stdout, &crl->crl, "CRL Info:\n", 0); + SEC_DestroyCrl(crl); + return SECSuccess; + } + return SECFailure; +} + +static void +ListCRLNames(CERTCertDBHandle *certHandle, int crlType, PRBool deletecrls) +{ + CERTCrlHeadNode *crlList = NULL; + CERTCrlNode *crlNode = NULL; + CERTName *name = NULL; + PLArenaPool *arena = NULL; + SECStatus rv; + + do { + arena = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE); + if (arena == NULL) { + fprintf(stderr, "%s: fail to allocate memory\n", progName); + break; + } + + name = PORT_ArenaZAlloc(arena, sizeof(*name)); + if (name == NULL) { + fprintf(stderr, "%s: fail to allocate memory\n", progName); + break; + } + name->arena = arena; + + rv = SEC_LookupCrls(certHandle, &crlList, crlType); + if (rv != SECSuccess) { + fprintf(stderr, "%s: fail to look up CRLs (%s)\n", progName, + SECU_Strerror(PORT_GetError())); + break; + } + + /* just in case */ + if (!crlList) + break; + + crlNode = crlList->first; + + fprintf(stdout, "\n"); + fprintf(stdout, "\n%-40s %-5s\n\n", "CRL names", "CRL Type"); + while (crlNode) { + char *asciiname = NULL; + CERTCertificate *cert = NULL; + if (crlNode->crl && crlNode->crl->crl.derName.data != NULL) { + cert = CERT_FindCertByName(certHandle, + &crlNode->crl->crl.derName); + if (!cert) { + SECU_PrintError(progName, "could not find signing " + "certificate in database"); + } + } + if (cert) { + char *certName = NULL; + if (cert->nickname && PORT_Strlen(cert->nickname) > 0) { + certName = cert->nickname; + } else if (cert->emailAddr && PORT_Strlen(cert->emailAddr) > 0) { + certName = cert->emailAddr; + } + if (certName) { + asciiname = PORT_Strdup(certName); + } + CERT_DestroyCertificate(cert); + } + + if (!asciiname) { + name = &crlNode->crl->crl.name; + if (!name) { + SECU_PrintError(progName, "fail to get the CRL " + "issuer name"); + continue; + } + asciiname = CERT_NameToAscii(name); + } + fprintf(stdout, "%-40s %-5s\n", asciiname, "CRL"); + if (asciiname) { + PORT_Free(asciiname); + } + if (PR_TRUE == deletecrls) { + CERTSignedCrl *acrl = NULL; + SECItem *issuer = &crlNode->crl->crl.derName; + acrl = SEC_FindCrlByName(certHandle, issuer, crlType); + if (acrl) { + SEC_DeletePermCRL(acrl); + SEC_DestroyCrl(acrl); + } + } + crlNode = crlNode->next; + } + + } while (0); + if (crlList) + PORT_FreeArena(crlList->arena, PR_FALSE); + PORT_FreeArena(arena, PR_FALSE); +} + +static SECStatus +ListCRL(CERTCertDBHandle *certHandle, char *nickName, int crlType) +{ + if (nickName == NULL) { + ListCRLNames(certHandle, crlType, PR_FALSE); + return SECSuccess; + } + + return DisplayCRL(certHandle, nickName, crlType); +} + +static SECStatus +DeleteCRL(CERTCertDBHandle *certHandle, char *name, int type) +{ + CERTSignedCrl *crl = NULL; + SECStatus rv = SECFailure; + + crl = FindCRL(certHandle, name, type); + if (!crl) { + SECU_PrintError(progName, "could not find the issuer %s's CRL", name); + return SECFailure; + } + rv = SEC_DeletePermCRL(crl); + SEC_DestroyCrl(crl); + if (rv != SECSuccess) { + SECU_PrintError(progName, "fail to delete the issuer %s's CRL " + "from the perm database (reason: %s)", + name, SECU_Strerror(PORT_GetError())); + return SECFailure; + } + return (rv); +} + +SECStatus +ImportCRL(CERTCertDBHandle *certHandle, char *url, int type, + PRFileDesc *inFile, PRInt32 importOptions, PRInt32 decodeOptions, + secuPWData *pwdata) +{ + CERTSignedCrl *crl = NULL; + SECItem crlDER; + PK11SlotInfo *slot = NULL; + int rv; + + crlDER.data = NULL; + + /* Read in the entire file specified with the -f argument */ + rv = SECU_ReadDERFromFile(&crlDER, inFile, PR_FALSE, PR_FALSE); + if (rv != SECSuccess) { + SECU_PrintError(progName, "unable to read input file"); + return (SECFailure); + } + + decodeOptions |= CRL_DECODE_DONT_COPY_DER; + + slot = PK11_GetInternalKeySlot(); + + if (PK11_NeedLogin(slot)) { + rv = PK11_Authenticate(slot, PR_TRUE, pwdata); + if (rv != SECSuccess) + goto loser; + } + + crl = PK11_ImportCRL(slot, &crlDER, url, type, + NULL, importOptions, NULL, decodeOptions); + + if (!crl) { + const char *errString; + + rv = SECFailure; + errString = SECU_Strerror(PORT_GetError()); + if (errString && PORT_Strlen(errString) == 0) + SECU_PrintError(progName, + "CRL is not imported (error: input CRL is not up to date.)"); + else + SECU_PrintError(progName, "unable to import CRL"); + } else { + SEC_DestroyCrl(crl); + } +loser: + if (slot) { + PK11_FreeSlot(slot); + } + SECITEM_FreeItem(&crlDER, PR_FALSE); + return (rv); +} + +SECStatus +DumpCRL(PRFileDesc *inFile) +{ + int rv; + PLArenaPool *arena = NULL; + CERTSignedCrl *newCrl = NULL; + + SECItem crlDER; + crlDER.data = NULL; + + /* Read in the entire file specified with the -f argument */ + rv = SECU_ReadDERFromFile(&crlDER, inFile, PR_FALSE, PR_FALSE); + if (rv != SECSuccess) { + SECU_PrintError(progName, "unable to read input file"); + return (SECFailure); + } + + rv = SEC_ERROR_NO_MEMORY; + arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); + if (!arena) + return rv; + + newCrl = CERT_DecodeDERCrlWithFlags(arena, &crlDER, SEC_CRL_TYPE, + CRL_DECODE_DEFAULT_OPTIONS); + if (!newCrl) + return SECFailure; + + SECU_PrintCRLInfo(stdout, &newCrl->crl, "CRL file contents", 0); + + PORT_FreeArena(arena, PR_FALSE); + return rv; +} + +static CERTCertificate * +FindSigningCert(CERTCertDBHandle *certHandle, CERTSignedCrl *signCrl, + char *certNickName) +{ + CERTCertificate *cert = NULL, *certTemp = NULL; + SECStatus rv = SECFailure; + CERTAuthKeyID *authorityKeyID = NULL; + SECItem *subject = NULL; + + PORT_Assert(certHandle != NULL); + if (!certHandle || (!signCrl && !certNickName)) { + SECU_PrintError(progName, "invalid args for function " + "FindSigningCert \n"); + return NULL; + } + + if (signCrl) { +#if 0 + authorityKeyID = SECU_FindCRLAuthKeyIDExten(tmpArena, scrl); +#endif + subject = &signCrl->crl.derName; + } else { + certTemp = CERT_FindCertByNickname(certHandle, certNickName); + if (!certTemp) { + SECU_PrintError(progName, "could not find certificate \"%s\" " + "in database", + certNickName); + goto loser; + } + subject = &certTemp->derSubject; + } + + cert = SECU_FindCrlIssuer(certHandle, subject, authorityKeyID, PR_Now()); + if (!cert) { + SECU_PrintError(progName, "could not find signing certificate " + "in database"); + goto loser; + } else { + rv = SECSuccess; + } + +loser: + if (certTemp) + CERT_DestroyCertificate(certTemp); + if (cert && rv != SECSuccess) + CERT_DestroyCertificate(cert); + return cert; +} + +static CERTSignedCrl * +CreateModifiedCRLCopy(PLArenaPool *arena, CERTCertDBHandle *certHandle, + CERTCertificate **cert, char *certNickName, + PRFileDesc *inFile, PRInt32 decodeOptions, + PRInt32 importOptions, secuPWData *pwdata) +{ + SECItem crlDER = { 0, NULL, 0 }; + CERTSignedCrl *signCrl = NULL; + CERTSignedCrl *modCrl = NULL; + PLArenaPool *modArena = NULL; + SECStatus rv = SECSuccess; + + if (!arena || !certHandle || !certNickName) { + PORT_SetError(SEC_ERROR_INVALID_ARGS); + SECU_PrintError(progName, "CreateModifiedCRLCopy: invalid args\n"); + return NULL; + } + + modArena = PORT_NewArena(SEC_ASN1_DEFAULT_ARENA_SIZE); + if (!modArena) { + SECU_PrintError(progName, "fail to allocate memory\n"); + return NULL; + } + + if (inFile != NULL) { + rv = SECU_ReadDERFromFile(&crlDER, inFile, PR_FALSE, PR_FALSE); + if (rv != SECSuccess) { + SECU_PrintError(progName, "unable to read input file"); + goto loser; + } + + decodeOptions |= CRL_DECODE_DONT_COPY_DER; + + modCrl = CERT_DecodeDERCrlWithFlags(modArena, &crlDER, SEC_CRL_TYPE, + decodeOptions); + if (!modCrl) { + SECU_PrintError(progName, "fail to decode CRL"); + goto loser; + } + + if (0 == (importOptions & CRL_IMPORT_BYPASS_CHECKS)) { + /* If caCert is a v2 certificate, make sure that it + * can be used for crl signing purpose */ + *cert = FindSigningCert(certHandle, modCrl, NULL); + if (!*cert) { + goto loser; + } + + rv = CERT_VerifySignedData(&modCrl->signatureWrap, *cert, + PR_Now(), pwdata); + if (rv != SECSuccess) { + SECU_PrintError(progName, "fail to verify signed data\n"); + goto loser; + } + } + } else { + modCrl = FindCRL(certHandle, certNickName, SEC_CRL_TYPE); + if (!modCrl) { + SECU_PrintError(progName, "fail to find crl %s in database\n", + certNickName); + goto loser; + } + } + + signCrl = PORT_ArenaZNew(arena, CERTSignedCrl); + if (signCrl == NULL) { + SECU_PrintError(progName, "fail to allocate memory\n"); + goto loser; + } + + rv = SECU_CopyCRL(arena, &signCrl->crl, &modCrl->crl); + if (rv != SECSuccess) { + SECU_PrintError(progName, "unable to dublicate crl for " + "modification."); + goto loser; + } + + /* Make sure the update time is current. It can be modified later + * by "update