Merge ~lucaskanashiro/ubuntu/+source/nss:merge-focal into ubuntu/+source/nss:ubuntu/devel
- Git
- lp:~lucaskanashiro/ubuntu/+source/nss
- merge-focal
- Merge into ubuntu/devel
Status: | Superseded | ||||||||
---|---|---|---|---|---|---|---|---|---|
Proposed branch: | ~lucaskanashiro/ubuntu/+source/nss:merge-focal | ||||||||
Merge into: | ubuntu/+source/nss:ubuntu/devel | ||||||||
Diff against target: |
212443 lines (+105527/-55021) (has conflicts) 243 files modified
debian/changelog (+21/-0) debian/libnss3.symbols (+1/-0) nss/.hg_archival.txt (+3/-3) nss/.taskcluster.yml (+1/-1) nss/Makefile (+1/-0) nss/automation/abi-check/expected-report-libnss3.so.txt (+31/-2) nss/automation/abi-check/expected-report-libsmime3.so.txt (+11/-0) nss/automation/abi-check/expected-report-libssl3.so.txt (+7/-19) nss/automation/abi-check/previous-nss-release (+1/-1) nss/automation/release/nspr-version.txt (+1/-1) nss/automation/taskcluster/docker-gcc-4.4/Dockerfile (+1/-0) nss/automation/taskcluster/docker-hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc (+143/-0) nss/automation/taskcluster/docker-hacl/Dockerfile (+2/-1) nss/automation/taskcluster/docker-hacl/setup.sh (+7/-3) nss/automation/taskcluster/graph/src/extend.js (+127/-28) nss/automation/taskcluster/graph/src/queue.js (+9/-1) nss/automation/taskcluster/graph/src/try_syntax.js (+12/-1) nss/automation/taskcluster/scripts/build.sh (+6/-0) nss/automation/taskcluster/scripts/build_gyp.sh (+7/-1) nss/automation/taskcluster/scripts/build_nspr.sh (+6/-0) nss/automation/taskcluster/scripts/build_softoken.sh (+3/-2) nss/automation/taskcluster/scripts/check_abi.sh (+6/-0) nss/automation/taskcluster/scripts/gen_coverage_report.sh (+6/-0) nss/automation/taskcluster/scripts/run_coverity.sh (+7/-1) nss/automation/taskcluster/scripts/run_scan_build.sh (+6/-0) nss/automation/taskcluster/windows/build.sh (+6/-0) nss/automation/taskcluster/windows/build_gyp.sh (+7/-1) nss/build.sh (+70/-40) nss/cmd/addbuiltin/addbuiltin.c (+62/-27) nss/cmd/httpserv/httpserv.c (+1/-1) nss/cmd/lib/Makefile (+1/-0) nss/cmd/lib/derprint.c (+3/-1) nss/cmd/lib/lib.gyp (+2/-1) nss/cmd/lib/manifest.mn (+2/-0) nss/cmd/lib/pk11table.c (+2/-0) nss/cmd/lib/secpwd.c (+1/-1) nss/cmd/lib/secutil.c (+208/-28) nss/cmd/lib/secutil.h (+14/-0) nss/cmd/p7env/p7env.c (+2/-2) nss/cmd/pk11importtest/pk11importtest.c (+3/-1) nss/cmd/pk11mode/pk11mode.c (+1/-1) nss/cmd/pk12util/pk12util.c (+1/-0) nss/cmd/platlibs.mk (+2/-2) nss/cmd/selfserv/selfserv.c (+36/-6) nss/cmd/shlibsign/shlibsign.c (+1/-1) nss/cmd/strsclnt/strsclnt.c (+34/-7) nss/cmd/symkeyutil/symkeyutil.c (+1/-1) nss/cmd/tstclnt/tstclnt.c (+38/-3) nss/cmd/vfyserv/vfyserv.c (+6/-1) nss/coreconf/UNIX.mk (+1/-3) nss/coreconf/WIN32.mk (+3/-10) nss/coreconf/config.gypi (+1/-0) nss/coreconf/nspr.sh (+18/-3) nss/cpputil/freebl_scoped_ptrs.h (+33/-0) nss/cpputil/nss_scoped_ptrs.h (+18/-17) nss/cpputil/scoped_ptrs_util.h (+5/-0) nss/cpputil/tls_parser.h (+1/-0) nss/fuzz/fuzz.gyp (+1/-0) nss/gtests/common/testvectors/curve25519-vectors.h (+63/-3) nss/gtests/common/testvectors/kw-vectors.h (+1940/-0) nss/gtests/der_gtest/der_quickder_unittest.cc (+38/-13) nss/gtests/freebl_gtest/cmac_unittests.cc (+187/-0) nss/gtests/freebl_gtest/freebl_gtest.gyp (+2/-0) nss/gtests/freebl_gtest/mpi_unittest.cc (+1/-1) nss/gtests/mozpkix_gtest/mozpkix_gtest.gyp (+1/-0) nss/gtests/mozpkix_gtest/pkixder_input_tests.cpp (+4/-2) nss/gtests/mozpkix_gtest/pkixder_universal_types_tests.cpp (+50/-0) nss/gtests/pk11_gtest/manifest.mn (+5/-1) nss/gtests/pk11_gtest/pk11_aes_cmac_unittest.cc (+91/-0) nss/gtests/pk11_gtest/pk11_aes_gcm_unittest.cc (+60/-49) nss/gtests/pk11_gtest/pk11_aeskeywrap_unittest.cc (+90/-100) nss/gtests/pk11_gtest/pk11_aeskeywrappad_unittest.cc (+415/-0) nss/gtests/pk11_gtest/pk11_cbc_unittest.cc (+217/-0) nss/gtests/pk11_gtest/pk11_curve25519_unittest.cc (+67/-23) nss/gtests/pk11_gtest/pk11_der_private_key_import_unittest.cc (+67/-15) nss/gtests/pk11_gtest/pk11_ecdsa_unittest.cc (+5/-0) nss/gtests/pk11_gtest/pk11_ecdsa_vectors.h (+32/-0) nss/gtests/pk11_gtest/pk11_find_certs_unittest.cc (+311/-111) nss/gtests/pk11_gtest/pk11_gtest.gyp (+8/-2) nss/gtests/pk11_gtest/pk11_import_unittest.cc (+25/-141) nss/gtests/pk11_gtest/pk11_key_unittest.cc (+80/-0) nss/gtests/pk11_gtest/pk11_keygen.cc (+143/-0) nss/gtests/pk11_gtest/pk11_keygen.h (+34/-0) nss/gtests/pk11_gtest/pk11_seed_cbc_unittest.cc (+71/-0) nss/gtests/pk11_gtest/pk11_signature_test.h (+3/-0) nss/gtests/softoken_gtest/manifest.mn (+10/-1) nss/gtests/softoken_gtest/softoken_gtest.cc (+187/-0) nss/gtests/softoken_gtest/softoken_gtest.gyp (+6/-0) nss/gtests/softoken_gtest/softoken_nssckbi_testlib_gtest.cc (+124/-0) nss/gtests/ssl_gtest/libssl_internals.c (+19/-0) nss/gtests/ssl_gtest/libssl_internals.h (+2/-1) nss/gtests/ssl_gtest/manifest.mn (+1/-0) nss/gtests/ssl_gtest/ssl_0rtt_unittest.cc (+41/-0) nss/gtests/ssl_gtest/ssl_auth_unittest.cc (+153/-8) nss/gtests/ssl_gtest/ssl_cert_ext_unittest.cc (+2/-2) nss/gtests/ssl_gtest/ssl_cipherorder_unittest.cc (+241/-0) nss/gtests/ssl_gtest/ssl_ciphersuite_unittest.cc (+19/-0) nss/gtests/ssl_gtest/ssl_extension_unittest.cc (+1/-1) nss/gtests/ssl_gtest/ssl_fuzz_unittest.cc (+1/-1) nss/gtests/ssl_gtest/ssl_gtest.gyp (+1/-0) nss/gtests/ssl_gtest/ssl_record_unittest.cc (+36/-0) nss/gtests/ssl_gtest/ssl_recordsize_unittest.cc (+3/-2) nss/gtests/ssl_gtest/ssl_renegotiation_unittest.cc (+23/-0) nss/gtests/ssl_gtest/ssl_resumption_unittest.cc (+105/-13) nss/gtests/ssl_gtest/tls_agent.cc (+21/-17) nss/gtests/ssl_gtest/tls_agent.h (+7/-6) nss/gtests/ssl_gtest/tls_esni_unittest.cc (+1/-1) nss/gtests/ssl_gtest/tls_subcerts_unittest.cc (+243/-33) nss/help.txt (+6/-0) nss/lib/certdb/certdb.c (+6/-20) nss/lib/certdb/certt.h (+15/-0) nss/lib/certdb/stanpcertdb.c (+11/-12) nss/lib/certhigh/certvfy.c (+43/-23) nss/lib/ckfw/builtins/README (+62/-1) nss/lib/ckfw/builtins/certdata.txt (+313/-630) nss/lib/ckfw/builtins/manifest.mn (+2/-0) nss/lib/ckfw/builtins/nssckbi.h (+2/-2) nss/lib/ckfw/builtins/testlib/Makefile (+52/-0) nss/lib/ckfw/builtins/testlib/builtins-testlib.gyp (+64/-0) nss/lib/ckfw/builtins/testlib/certdata-testlib.txt (+479/-0) nss/lib/ckfw/builtins/testlib/config.mk (+38/-0) nss/lib/ckfw/builtins/testlib/manifest.mn (+25/-0) nss/lib/ckfw/builtins/testlib/nssckbi-testlib.rc (+52/-0) nss/lib/ckfw/builtins/testlib/testcert_err_distrust.txt (+50/-0) nss/lib/ckfw/builtins/testlib/testcert_no_distrust.txt (+50/-0) nss/lib/ckfw/builtins/testlib/testcert_ok_distrust.txt (+50/-0) nss/lib/ckfw/manifest.mn (+1/-1) nss/lib/freebl/Makefile (+29/-1) nss/lib/freebl/aes-armv8.c (+1168/-0) nss/lib/freebl/aes-armv8.h (+103/-0) nss/lib/freebl/aeskeywrap.c (+2/-1) nss/lib/freebl/blapi.h (+1/-0) nss/lib/freebl/blinit.c (+49/-1) nss/lib/freebl/chacha20poly1305.c (+5/-0) nss/lib/freebl/cmac.c (+322/-0) nss/lib/freebl/cmac.h (+47/-0) nss/lib/freebl/ctr.c (+12/-0) nss/lib/freebl/drbg.c (+90/-9) nss/lib/freebl/ec.c (+1/-1) nss/lib/freebl/ecl/curve25519_32.c (+4/-0) nss/lib/freebl/exports.gyp (+1/-0) nss/lib/freebl/freebl.gyp (+68/-0) nss/lib/freebl/freebl_base.gypi (+1/-0) nss/lib/freebl/gcm-aarch64.c (+96/-0) nss/lib/freebl/gcm.c (+27/-2) nss/lib/freebl/gcm.h (+6/-0) nss/lib/freebl/intel-aes.h (+3/-3) nss/lib/freebl/intel-gcm-wrap.c (+31/-0) nss/lib/freebl/ldvector.c (+10/-1) nss/lib/freebl/loader.c (+51/-0) nss/lib/freebl/loader.h (+15/-1) nss/lib/freebl/manifest.mn (+3/-0) nss/lib/freebl/mpi/README (+1/-0) nss/lib/freebl/mpi/mpcpucache.c (+1/-1) nss/lib/freebl/mpi/mpi.c (+30/-12) nss/lib/freebl/mpi/mpi.h (+10/-1) nss/lib/freebl/pqg.c (+4/-4) nss/lib/freebl/rijndael.c (+17/-4) nss/lib/freebl/rsapkcs.c (+13/-10) nss/lib/freebl/seed.c (+26/-7) nss/lib/freebl/verified/FStar.c (+1/-1) nss/lib/freebl/verified/FStar.h (+1/-1) nss/lib/freebl/verified/Hacl_Chacha20.c (+1/-1) nss/lib/freebl/verified/Hacl_Chacha20.h (+1/-1) nss/lib/freebl/verified/Hacl_Chacha20_Vec128.c (+1/-1) nss/lib/freebl/verified/Hacl_Chacha20_Vec128.h (+1/-1) nss/lib/freebl/verified/Hacl_Curve25519.c (+1/-1) nss/lib/freebl/verified/Hacl_Curve25519.h (+1/-1) nss/lib/freebl/verified/Hacl_Poly1305_32.c (+1/-1) nss/lib/freebl/verified/Hacl_Poly1305_32.h (+1/-1) nss/lib/freebl/verified/Hacl_Poly1305_64.c (+1/-1) nss/lib/freebl/verified/Hacl_Poly1305_64.h (+1/-1) nss/lib/freebl/verified/kremlib.h (+1/-1) nss/lib/freebl/verified/kremlib_base.h (+1/-1) nss/lib/freebl/verified/vec128.h (+1/-1) nss/lib/jar/jarfile.c (+26/-18) nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_ldapdefaultclient.c (+3/-2) nss/lib/mozpkix/include/pkix/pkixder.h (+11/-0) nss/lib/mozpkix/lib/pkixcert.cpp (+7/-12) nss/lib/mozpkix/test-lib/pkixtestnss.cpp (+6/-5) nss/lib/nss/nss.def (+7/-1) nss/lib/nss/nss.h (+2/-2) nss/lib/pk11wrap/debug_module.c (+2/-0) nss/lib/pk11wrap/pk11cert.c (+87/-0) nss/lib/pk11wrap/pk11load.c (+4/-6) nss/lib/pk11wrap/pk11mech.c (+4/-0) nss/lib/pk11wrap/pk11pk12.c (+4/-0) nss/lib/pk11wrap/pk11pub.h (+8/-0) nss/lib/pki/pki3hack.c (+42/-13) nss/lib/smime/cmssiginfo.c (+82/-25) nss/lib/softoken/fipstokn.c (+24/-4) nss/lib/softoken/legacydb/lgattr.c (+1/-1) nss/lib/softoken/pkcs11.c (+18/-8) nss/lib/softoken/pkcs11c.c (+323/-69) nss/lib/softoken/pkcs11i.h (+2/-2) nss/lib/softoken/pkcs11u.c (+5/-18) nss/lib/softoken/sdb.c (+1/-1) nss/lib/softoken/softkver.h (+2/-2) nss/lib/softoken/tlsprf.c (+1/-1) nss/lib/sqlite/Makefile (+2/-0) nss/lib/sqlite/README (+1/-1) nss/lib/sqlite/sqlite.gyp (+9/-1) nss/lib/sqlite/sqlite3.c (+90169/-52437) nss/lib/sqlite/sqlite3.h (+3773/-611) nss/lib/ssl/ssl3con.c (+283/-154) nss/lib/ssl/ssl3ext.c (+3/-0) nss/lib/ssl/ssl3exthandle.c (+8/-3) nss/lib/ssl/sslexp.h (+39/-0) nss/lib/ssl/sslimpl.h (+10/-6) nss/lib/ssl/sslsock.c (+115/-0) nss/lib/ssl/sslt.h (+7/-1) nss/lib/ssl/tls13con.c (+23/-16) nss/lib/ssl/tls13esni.c (+1/-1) nss/lib/ssl/tls13subcerts.c (+184/-11) nss/lib/util/nssutil.h (+2/-2) nss/lib/util/pkcs11n.h (+2/-0) nss/lib/util/pkcs11t.h (+3/-0) nss/lib/util/quickder.c (+1/-1) nss/lib/util/utilmod.c (+4/-1) nss/mach (+11/-3) nss/nss.gyp (+3/-0) nss/tests/all.sh (+3/-9) nss/tests/cert/cert.sh (+1/-1) nss/tests/common/certsetup.sh (+9/-2) nss/tests/common/cleanup.sh (+9/-2) nss/tests/fips/cavs_scripts/aes.sh (+2/-0) nss/tests/fips/cavs_scripts/aesgcm.sh (+2/-0) nss/tests/fips/cavs_scripts/dsa.sh (+2/-0) nss/tests/fips/cavs_scripts/ecdsa.sh (+2/-0) nss/tests/fips/cavs_scripts/hmac.sh (+3/-0) nss/tests/fips/cavs_scripts/ike.sh (+2/-0) nss/tests/fips/cavs_scripts/kas.sh (+2/-0) nss/tests/fips/cavs_scripts/rng.sh (+3/-0) nss/tests/fips/cavs_scripts/rsa.sh (+2/-0) nss/tests/fips/cavs_scripts/sha.sh (+2/-0) nss/tests/fips/cavs_scripts/tdea.sh (+2/-0) nss/tests/fips/cavs_scripts/tls.sh (+3/-0) nss/tests/policy/policy.sh (+1/-1) nss/tests/smime/smime.sh (+213/-22) nss/tests/ssl/ssl.sh (+64/-9) nss/tests/ssl_gtests/ssl_gtests.sh (+1/-0) nss/tests/tlsfuzzer/config.json.in (+20/-0) nss/tests/tlsfuzzer/tlsfuzzer.sh (+3/-3) Conflict in debian/changelog |
||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Canonical Server | Pending | ||
Canonical Server Core Reviewers | Pending | ||
Review via email: mp+374996@code.launchpad.net |
This proposal has been superseded by a proposal from 2019-11-04.
Commit message
Description of the change
Merge version 2:3.47-1 from Debian. The delta from version 2:3.45-1ubuntu2 was applied on top of this new release:
* d/libnss3.links: make freebl3 available as library
* d/control: add dh-exec to Build-Depends
* d/rules: make mkdir tolerate debian/tmp existing (due to dh-exec)
* Disable reading fips_enabled flag in FIPS mode. libnss is not a FIPS certified library.
According to upstream release notes the library in this new release is compatible with the version we have in the archive, so the version bump should not be a problem.
Unmerged commits
- 3d3a453... by Lucas Kanashiro
-
update-maintainer
- 21cd5df... by Lucas Kanashiro
-
reconstruct-
changelog - fb66659... by Lucas Kanashiro
-
merge-changelogs
- 40d0445... by Lucas Kanashiro
-
- Disable reading fips_enabled flag in FIPS mode. libnss is
not a FIPS certified library. (LP: #1837734) - 4ad6ffe... by Lucas Kanashiro
-
- d/rules: make mkdir tolerate debian/tmp existing (due to dh-exec)
- b59cfb2... by Lucas Kanashiro
-
- d/control: add dh-exec to Build-Depends
- 459c5ba... by Lucas Kanashiro
-
- d/libnss3.links: make freebl3 available as library (LP: #1744328)
- 02f7959... by Mike Hommey <email address hidden>
-
Import patches-unapplied version 2:3.47-1 to debian/sid
Imported using git-ubuntu import.
Changelog parent: f4b87b1e16a7e93
b79bb7b251d3b51 f01766f2ae New changelog entries:
* New upstream release.
* debian/libnss3. symbols: Add NSS_3_47 symbol version.
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index 27fda7e..7e08155 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,24 @@ | |||
6 | 1 | <<<<<<< debian/changelog | ||
7 | 2 | ======= | ||
8 | 3 | nss (2:3.47-1ubuntu1) focal; urgency=medium | ||
9 | 4 | |||
10 | 5 | * Merge with Debian unstable. Remaining changes: | ||
11 | 6 | - d/libnss3.links: make freebl3 available as library (LP #1744328) | ||
12 | 7 | - d/control: add dh-exec to Build-Depends | ||
13 | 8 | - d/rules: make mkdir tolerate debian/tmp existing (due to dh-exec) | ||
14 | 9 | - Disable reading fips_enabled flag in FIPS mode. libnss is | ||
15 | 10 | not a FIPS certified library. (LP #1837734) | ||
16 | 11 | |||
17 | 12 | -- Lucas Kanashiro <lucas.kanashiro@canonical.com> Thu, 31 Oct 2019 16:18:35 -0300 | ||
18 | 13 | |||
19 | 14 | nss (2:3.47-1) unstable; urgency=medium | ||
20 | 15 | |||
21 | 16 | * New upstream release. | ||
22 | 17 | * debian/libnss3.symbols: Add NSS_3_47 symbol version. | ||
23 | 18 | |||
24 | 19 | -- Mike Hommey <glandium@debian.org> Wed, 23 Oct 2019 11:19:59 +0900 | ||
25 | 20 | |||
26 | 21 | >>>>>>> debian/changelog | ||
27 | 1 | nss (2:3.45-1ubuntu2) eoan; urgency=medium | 22 | nss (2:3.45-1ubuntu2) eoan; urgency=medium |
28 | 2 | 23 | ||
29 | 3 | * Disable reading fips_enabled flag in FIPS mode. libnss is | 24 | * Disable reading fips_enabled flag in FIPS mode. libnss is |
30 | diff --git a/debian/libnss3.symbols b/debian/libnss3.symbols | |||
31 | index e4da3e8..4bc778e 100644 | |||
32 | --- a/debian/libnss3.symbols | |||
33 | +++ b/debian/libnss3.symbols | |||
34 | @@ -59,6 +59,7 @@ libnss3.so libnss3 #MINVER# | |||
35 | 59 | (symver)NSS_3.43 2:3.44.0 | 59 | (symver)NSS_3.43 2:3.44.0 |
36 | 60 | (symver)NSS_3.44 2:3.44.0 | 60 | (symver)NSS_3.44 2:3.44.0 |
37 | 61 | (symver)NSS_3.45 2:3.45 | 61 | (symver)NSS_3.45 2:3.45 |
38 | 62 | (symver)NSS_3.47 2:3.47 | ||
39 | 62 | (symver)NSS_3.5 2:3.13.4-2~ | 63 | (symver)NSS_3.5 2:3.13.4-2~ |
40 | 63 | (symver)NSS_3.6 2:3.13.4-2~ | 64 | (symver)NSS_3.6 2:3.13.4-2~ |
41 | 64 | (symver)NSS_3.7 2:3.13.4-2~ | 65 | (symver)NSS_3.7 2:3.13.4-2~ |
42 | diff --git a/nss/.hg_archival.txt b/nss/.hg_archival.txt | |||
43 | index 7c3f115..032d2c2 100644 | |||
44 | --- a/nss/.hg_archival.txt | |||
45 | +++ b/nss/.hg_archival.txt | |||
46 | @@ -1,4 +1,4 @@ | |||
47 | 1 | repo: 9949429068caa6bb8827a8ceeaa7c605d722f47f | 1 | repo: 9949429068caa6bb8827a8ceeaa7c605d722f47f |
51 | 2 | node: 93ad9d963f4c773ea210b20af50198331ccd8639 | 2 | node: 7ccb4ade557739620b060c173d8660c502e53034 |
52 | 3 | branch: NSS_3_45_BRANCH | 3 | branch: NSS_3_47_BRANCH |
53 | 4 | tag: NSS_3_45_RTM | 4 | tag: NSS_3_47_RTM |
54 | diff --git a/nss/.taskcluster.yml b/nss/.taskcluster.yml | |||
55 | index 4d5117e..05bade9 100644 | |||
56 | --- a/nss/.taskcluster.yml | |||
57 | +++ b/nss/.taskcluster.yml | |||
58 | @@ -55,7 +55,7 @@ tasks: | |||
59 | 55 | image: djmitche/nss-decision:0.0.3 | 55 | image: djmitche/nss-decision:0.0.3 |
60 | 56 | 56 | ||
61 | 57 | env: | 57 | env: |
63 | 58 | TC_OWNER: "${push.owner}" | 58 | TC_OWNER: "${ownerEmail}" |
64 | 59 | TC_SOURCE: "${repository.url}" | 59 | TC_SOURCE: "${repository.url}" |
65 | 60 | TC_PROJECT: ${repository.project} | 60 | TC_PROJECT: ${repository.project} |
66 | 61 | TC_SCHEDULER_ID: "${schedulerId}" | 61 | TC_SCHEDULER_ID: "${schedulerId}" |
67 | diff --git a/nss/Makefile b/nss/Makefile | |||
68 | index 4a80ebd..2dc8de1 100644 | |||
69 | --- a/nss/Makefile | |||
70 | +++ b/nss/Makefile | |||
71 | @@ -135,6 +135,7 @@ endif | |||
72 | 135 | 135 | ||
73 | 136 | build_nspr: $(NSPR_CONFIG_STATUS) | 136 | build_nspr: $(NSPR_CONFIG_STATUS) |
74 | 137 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) | 137 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) |
75 | 138 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME)/pr/tests | ||
76 | 138 | 139 | ||
77 | 139 | install_nspr: build_nspr | 140 | install_nspr: build_nspr |
78 | 140 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install | 141 | $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install |
79 | diff --git a/nss/automation/abi-check/expected-report-libnss3.so.txt b/nss/automation/abi-check/expected-report-libnss3.so.txt | |||
80 | index 76d0de6..ee06510 100644 | |||
81 | --- a/nss/automation/abi-check/expected-report-libnss3.so.txt | |||
82 | +++ b/nss/automation/abi-check/expected-report-libnss3.so.txt | |||
83 | @@ -1,4 +1,33 @@ | |||
84 | 1 | |||
85 | 2 | 1 Added function: | 1 | 1 Added function: |
86 | 3 | 2 | ||
88 | 4 | 'function SECStatus PK11_FindRawCertsWithSubject(PK11SlotInfo*, SECItem*, CERTCertificateList**)' {PK11_FindRawCertsWithSubject@@NSS_3.45} | 3 | 'function CERTCertList* PK11_GetCertsMatchingPrivateKey(SECKEYPrivateKey*)' {PK11_GetCertsMatchingPrivateKey@@NSS_3.47} |
89 | 4 | |||
90 | 5 | 3 functions with some indirect sub-type change: | ||
91 | 6 | |||
92 | 7 | [C]'function SECStatus CERT_AddCertToListHead(CERTCertList*, CERTCertificate*)' at certdb.c:2631:1 has some indirect sub-type changes: | ||
93 | 8 | parameter 2 of type 'CERTCertificate*' has sub-type changes: | ||
94 | 9 | in pointed to type 'typedef CERTCertificate' at certt.h:39:1: | ||
95 | 10 | underlying type 'struct CERTCertificateStr' at certt.h:189:1 changed: | ||
96 | 11 | type size changed from 6016 to 6080 (in bits) | ||
97 | 12 | 1 data member insertion: | ||
98 | 13 | 'CERTCertDistrust* CERTCertificateStr::distrust', at offset 6016 (in bits) at certt.h:296:1 | ||
99 | 14 | no data member changes (2 filtered); | ||
100 | 15 | |||
101 | 16 | [C]'function SECStatus CERT_CacheOCSPResponseFromSideChannel(CERTCertDBHandle*, CERTCertificate*, PRTime, const SECItem*, void*)' at ocsp.c:5102:1 has some indirect sub-type changes: | ||
102 | 17 | parameter 2 of type 'CERTCertificate*' has sub-type changes: | ||
103 | 18 | in pointed to type 'typedef CERTCertificate' at certt.h:39:1: | ||
104 | 19 | underlying type 'struct CERTCertificateStr' at certt.h:189:1 changed: | ||
105 | 20 | type size changed from 6016 to 6080 (in bits) | ||
106 | 21 | 1 data member insertion: | ||
107 | 22 | 'CERTCertDistrust* CERTCertificateStr::distrust', at offset 6016 (in bits) at certt.h:296:1 | ||
108 | 23 | no data member change (1 filtered); | ||
109 | 24 | |||
110 | 25 | [C]'function CERTCertificateList* CERT_CertChainFromCert(CERTCertificate*, SECCertUsage, PRBool)' at certhigh.c:1030:1 has some indirect sub-type changes: | ||
111 | 26 | parameter 1 of type 'CERTCertificate*' has sub-type changes: | ||
112 | 27 | in pointed to type 'typedef CERTCertificate' at certt.h:39:1: | ||
113 | 28 | underlying type 'struct CERTCertificateStr' at certt.h:189:1 changed: | ||
114 | 29 | type size changed from 6016 to 6080 (in bits) | ||
115 | 30 | 1 data member insertion: | ||
116 | 31 | 'CERTCertDistrust* CERTCertificateStr::distrust', at offset 6016 (in bits) at certt.h:296:1 | ||
117 | 32 | no data member changes (2 filtered); | ||
118 | 33 | |||
119 | diff --git a/nss/automation/abi-check/expected-report-libsmime3.so.txt b/nss/automation/abi-check/expected-report-libsmime3.so.txt | |||
120 | index e69de29..b57a98a 100644 | |||
121 | --- a/nss/automation/abi-check/expected-report-libsmime3.so.txt | |||
122 | +++ b/nss/automation/abi-check/expected-report-libsmime3.so.txt | |||
123 | @@ -0,0 +1,11 @@ | |||
124 | 1 | 1 function with some indirect sub-type change: | ||
125 | 2 | |||
126 | 3 | [C]'function CERTCertificate* CERT_ConvertAndDecodeCertificate(char*)' at certread.c:219:1 has some indirect sub-type changes: | ||
127 | 4 | return type changed: | ||
128 | 5 | in pointed to type 'typedef CERTCertificate' at certt.h:39:1: | ||
129 | 6 | underlying type 'struct CERTCertificateStr' at certt.h:189:1 changed: | ||
130 | 7 | type size changed from 6016 to 6080 (in bits) | ||
131 | 8 | 1 data member insertion: | ||
132 | 9 | 'CERTCertDistrust* CERTCertificateStr::distrust', at offset 6016 (in bits) at certt.h:296:1 | ||
133 | 10 | |||
134 | 11 | |||
135 | diff --git a/nss/automation/abi-check/expected-report-libssl3.so.txt b/nss/automation/abi-check/expected-report-libssl3.so.txt | |||
136 | index 9f2f796..2c3aff4 100644 | |||
137 | --- a/nss/automation/abi-check/expected-report-libssl3.so.txt | |||
138 | +++ b/nss/automation/abi-check/expected-report-libssl3.so.txt | |||
139 | @@ -1,22 +1,10 @@ | |||
140 | 1 | 1 function with some indirect sub-type change: | ||
141 | 1 | 2 | ||
159 | 2 | 2 functions with some indirect sub-type change: | 3 | [C]'function SECStatus NSS_CmpCertChainWCANames(CERTCertificate*, CERTDistNames*)' at cmpcert.c:25:1 has some indirect sub-type changes: |
160 | 3 | 4 | parameter 1 of type 'CERTCertificate*' has sub-type changes: | |
161 | 4 | [C]'function SECStatus SSL_ConfigServerCert(PRFileDesc*, CERTCertificate*, SECKEYPrivateKey*, const SSLExtraServerCertData*, unsigned int)' at sslcert.c:640:1 has some indirect sub-type changes: | 5 | in pointed to type 'typedef CERTCertificate' at certt.h:39:1: |
162 | 5 | parameter 4 of type 'const SSLExtraServerCertData*' has sub-type changes: | 6 | underlying type 'struct CERTCertificateStr' at certt.h:189:1 changed: |
163 | 6 | in pointed to type 'const SSLExtraServerCertData': | 7 | type size changed from 6016 to 6080 (in bits) |
147 | 7 | in unqualified underlying type 'typedef SSLExtraServerCertData' at sslt.h:291:1: | ||
148 | 8 | underlying type 'struct SSLExtraServerCertDataStr' at sslt.h:256:1 changed: | ||
149 | 9 | type size changed from 256 to 384 (in bits) | ||
150 | 10 | 2 data member insertions: | ||
151 | 11 | 'const SECItem* SSLExtraServerCertDataStr::delegCred', at offset 256 (in bits) at sslt.h:283:1 | ||
152 | 12 | 'const SECKEYPrivateKey* SSLExtraServerCertDataStr::delegCredPrivKey', at offset 320 (in bits) at sslt.h:290:1 | ||
153 | 13 | |||
154 | 14 | [C]'function SECStatus SSL_GetChannelInfo(PRFileDesc*, SSLChannelInfo*, PRUintn)' at sslinfo.c:13:1 has some indirect sub-type changes: | ||
155 | 15 | parameter 2 of type 'SSLChannelInfo*' has sub-type changes: | ||
156 | 16 | in pointed to type 'typedef SSLChannelInfo' at sslt.h:357:1: | ||
157 | 17 | underlying type 'struct SSLChannelInfoStr' at sslt.h:272:1 changed: | ||
158 | 18 | type size hasn't changed | ||
164 | 19 | 1 data member insertion: | 8 | 1 data member insertion: |
167 | 20 | 'PRBool SSLChannelInfoStr::peerDelegCred', at offset 928 (in bits) at sslt.h:353:1 | 9 | 'CERTCertDistrust* CERTCertificateStr::distrust', at offset 6016 (in bits) at certt.h:296:1 |
166 | 21 | |||
168 | 22 | 10 | ||
169 | diff --git a/nss/automation/abi-check/previous-nss-release b/nss/automation/abi-check/previous-nss-release | |||
170 | index c6d6c97..3215111 100644 | |||
171 | --- a/nss/automation/abi-check/previous-nss-release | |||
172 | +++ b/nss/automation/abi-check/previous-nss-release | |||
173 | @@ -1 +1 @@ | |||
175 | 1 | NSS_3_44_BRANCH | 1 | NSS_3_46_BRANCH |
176 | diff --git a/nss/automation/release/nspr-version.txt b/nss/automation/release/nspr-version.txt | |||
177 | index b91871c..7ae4833 100644 | |||
178 | --- a/nss/automation/release/nspr-version.txt | |||
179 | +++ b/nss/automation/release/nspr-version.txt | |||
180 | @@ -1,4 +1,4 @@ | |||
182 | 1 | 4.21 | 1 | 4.23 |
183 | 2 | 2 | ||
184 | 3 | # The first line of this file must contain the human readable NSPR | 3 | # The first line of this file must contain the human readable NSPR |
185 | 4 | # version number, which is the minimum required version of NSPR | 4 | # version number, which is the minimum required version of NSPR |
186 | diff --git a/nss/automation/taskcluster/docker-gcc-4.4/Dockerfile b/nss/automation/taskcluster/docker-gcc-4.4/Dockerfile | |||
187 | index 6953832..55344e5 100644 | |||
188 | --- a/nss/automation/taskcluster/docker-gcc-4.4/Dockerfile | |||
189 | +++ b/nss/automation/taskcluster/docker-gcc-4.4/Dockerfile | |||
190 | @@ -9,6 +9,7 @@ RUN apt-get update \ | |||
191 | 9 | gcc-4.4 \ | 9 | gcc-4.4 \ |
192 | 10 | locales \ | 10 | locales \ |
193 | 11 | make \ | 11 | make \ |
194 | 12 | patch \ | ||
195 | 12 | mercurial \ | 13 | mercurial \ |
196 | 13 | zlib1g-dev \ | 14 | zlib1g-dev \ |
197 | 14 | && rm -rf /var/lib/apt/lists/* \ | 15 | && rm -rf /var/lib/apt/lists/* \ |
198 | diff --git a/nss/automation/taskcluster/docker-hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc b/nss/automation/taskcluster/docker-hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc | |||
199 | 15 | new file mode 100644 | 16 | new file mode 100644 |
200 | index 0000000..513dcd4 | |||
201 | --- /dev/null | |||
202 | +++ b/nss/automation/taskcluster/docker-hacl/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc | |||
203 | @@ -0,0 +1,143 @@ | |||
204 | 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- | ||
205 | 2 | |||
206 | 3 | mQINBFS+1SABEACnmkESkY7eZq0GhDjbkWpKmURGk9+ycsfAhA44NqUvf4tk1GPM | ||
207 | 4 | 5SkJ/fYedYZJaDVhIp98fHgucD0O+vjOzghtgwtITusYjiPHPFBd/MN+MQqSEAP+ | ||
208 | 5 | LUa/kjHLjgyXxKhFUIDGVaDWL5tKOA7/AQKl1TyJ8lz89NHQoUHFsF/hu10+qhJe | ||
209 | 6 | V65d32MXFehIUSvegh8DrPuExrliSiORO4HOhuc6151dWA4YBWVg4rX5kfKrGMMT | ||
210 | 7 | pTWnSSZtgoRhkKW2Ey8cmZUqPuUJIfWyeNVu1e4SFtAivLvu/Ymz2WBJcNA1ZlTr | ||
211 | 8 | RCOR5SIRgZ453pQnI/Bzna2nnJ/TV1gGJIGRahj/ini0cs2x1CILfS/YJQ3rWGGo | ||
212 | 9 | OxwG0BVmPk0cmLVtyTq8gUPwxcPUd6WcBKhot3TDMlrffZACnQwQjlVjk5S1dEEz | ||
213 | 10 | atUfpEuNitU9WOM4jr/gjv36ZNCOWm95YwLhsuci/NddBN8HXhyvs+zYTVZEXa2W | ||
214 | 11 | l/FqOdQsQqZBcJjjWckGKhESdd7934+cesGD3O8KaeSGxww7slJrS0+6QJ8oBoAB | ||
215 | 12 | P/WCn/y2AiY2syEKp3wYIGJyAbsm542zMZ4nc7pYfSu49mcyhQQICmqN5QvOyYUx | ||
216 | 13 | OSqwbAOUNtlOyeRLZNIKoXtTqWDEu5aEiDROTw6Rkq+dIcxPNgOLdeQ3HwARAQAB | ||
217 | 14 | tCFIYW5zIFdlbm5ib3JnIDxoYW5zQGNocm9taXVtLm9yZz6JARwEEAECAAYFAlT2 | ||
218 | 15 | MQAACgkQVfXNcLtaBWnDKgf/fjusXk+kh1zuyn5eOCe16+2vV1lmXZrDIGdJtXDW | ||
219 | 16 | ZtHKele1Yv1BA3kUi5tKQi+VOOrvHL0+TMjFWFiCy1sYJS9qgkS08kReI2nAnhZ7 | ||
220 | 17 | INdqEVxtVk1TTOhtYjOPy6txwujoICuPv5F4rHVhn1LPKGTLtYD2LOwf/8eKYQox | ||
221 | 18 | 51gaJ8dNxpcHE/iFOIDXdebJPufo3EhqDRihchxb8AVLhrNss7pGGG/tVfichmHK | ||
222 | 19 | djPT2KfSh14pq1ahFOz0zH4nmTu7CCLnLAdRBHuhL8HVDbi0vKBtCiSmQggdxvoj | ||
223 | 20 | u+hpXiiDFQoCjLh0zVCwtFqWDZbnKMTBNNF26aTmQ+2fiYkBMwQQAQgAHRYhBB/m | ||
224 | 21 | NI7eqCWiKXDlxI3TBA8SPMP0BQJbcLU1AAoJEI3TBA8SPMP021sH/jD1m7azNCN6 | ||
225 | 22 | DVL1iDJT6uIIYCTylygH5XI46CRoWaz/LwdFnUqWHHTcQxJ5pIkWV9KF+SIgMT42 | ||
226 | 23 | brdZZmNvvSdX0odjFKqj5UR6w+wDN+uZ6Q40zu4pNoNzbk7pRpbFf1XIfGB1liyu | ||
227 | 24 | m28EJ58IXu/0AV7FiDAHGGBqppK/cwQN8pGLwmz1n6YELtXeFmtOGnusO6iLYOE7 | ||
228 | 25 | 3ByFCCqJB6twT5+7dDqFYqqQJgQ6jDTy19dDZ1vDhDttL+2Rn0OYXqPw7gy/1D2p | ||
229 | 26 | Y1cM9PgPBsR4EXhbtV0uKUNomk8tM/HnGMFT0KirI/tSwEP3v9g5YH992mrvNuIV | ||
230 | 27 | TkyQn0jGeMeJATMEEAEIAB0WIQRswFHTwdmkr54mDFjT45SsdE4uuwUCW3haCQAK | ||
231 | 28 | CRDT45SsdE4uu4JjCACppkreiMrpJSREKbUscdOvFxFRYzkTFeSCwX9Ih7r5ENpa | ||
232 | 29 | zjczfIqCCfWzioV6y4K0V04y8CXt/5S5a9vfW801pBUdF9nG4X8YbUn/xSe+8A9m | ||
233 | 30 | MsfDjMNcF7Cp5czVoSS4/4oHm9mQUMYQsn3AwwCPDKFORRRv5Eb0om9JawKtt++7 | ||
234 | 31 | ZW0fOgDkvOCm14SN0UtVc4mxTx6iyxdMDgrKinBZVjxEh5oeqUyXh5TYM+XyWFVh | ||
235 | 32 | /gDUvUWwLI0GUWNTyOyUQU1oPVp+sWqrEe1BXLVCKFVWaSTtgJtJ5FyP+z2uzRcv | ||
236 | 33 | aanPOj/ohHAo8VBq9QbefYVAkShNBEuJkATnXhcGiQEzBBABCAAdFiEEvlzFWRM6 | ||
237 | 34 | 4JjNAb2a+j2ZL9Cqr7wFAlkBCcIACgkQ+j2ZL9Cqr7yB9AgArj+0+i0DCo1nm4MF | ||
238 | 35 | TLnW1Y9GF/Hq/mBva1MhkT0j3BzENK3xgqrqac8KqupsporNEmJ0ZbZzilJdZImb | ||
239 | 36 | o4X5BFdmmnjMiGaH6GAiPqRBBHGvLV2r2pG467J4tOMWO3XipFRf7FibbfhAU1lV | ||
240 | 37 | /GLWYTSwLqwWwBE8u5rriEvDngWUJw2Yd4Yqwduef7O6F+JfsGPRXFomR3387II0 | ||
241 | 38 | 8AXo/C+P5cl64llaxV6BmkJhQ6ydL0/KwSkHVdlXugk1sPtV/qOyPQ5L1Ibqbsvh | ||
242 | 39 | lLq/jhHlUUNLFjlQ2lrS9bhHGw9OIHTMJvS8RDrk0yAmoHAyRWNgbFN7aA62vBhq | ||
243 | 40 | pcUVzokBMwQQAQgAHRYhBPZ+fW6ADyQOg+vIZ/9qyaZGTfCcBQJa+ZAwAAoJEP9q | ||
244 | 41 | yaZGTfCcKMgH/jRxGfYhhGnlMnDLAEpYC+TGSDLMgmg9cOZbonqyMv+7Kts+pV03 | ||
245 | 42 | KUr9SPV+VtGtOxRNiqwFt6V2MHcwPJfTXuH/bBW/HCCpr6UlOVWqIiCNK0Gnpcj5 | ||
246 | 43 | rRt5unjG9CwsgyaK9QPI8bGin/c6m8BjwmEdfJ01ATLiUb8WuDHQy9OCyrEAnzSq | ||
247 | 44 | FD5ZtFmAFxvzm2x1nwb5HPuqkOqbRatp8aRJzTxIeSJPpgLw0PawHKGN3Ckp7REc | ||
248 | 45 | g26P1spkPe7SIVRsobH3al4uw7mgs7wiDWN3t8CdmuHAzmB2UrsR84JMTb45GboO | ||
249 | 46 | Bc1CX8xZcHyNaDEpyWHav+P8nZqwfBm+cLiJAjMEEAEIAB0WIQSawVDb4dGOtiX0 | ||
250 | 47 | +gWyD0lU8+/LPwUCW/4O9QAKCRCyD0lU8+/LPyI7EACWtj0GEb1VT02gKwtKwgFn | ||
251 | 48 | RJ2pz8vYm188wgJwCJaL04d2D/VwE0jMvmfH80hSKgSLPAVMG06RIOb/tGhHsQKU | ||
252 | 49 | zBlHiAFmfjlJo1FC/Mp44RrERRsFAWBg0/URIs4vP8+5Vl+5m70sZrQpKeq+6TLM | ||
253 | 50 | 1dQ0Ohz+QkQ04Z+DTroChWU8/7Uw0E3CqGGKYqPvDh54T1q4s8FoN0no8ZUlt/O+ | ||
254 | 51 | r/3c7awr85ZnxqtnHIcuMbVyIZ+gOqXdrLa85yZITsh4zQrjYuyTEg7dpziReyiZ | ||
255 | 52 | +rkpdIdFKl8YeD+d0JWzVm7kq9D4K3+x9C509z0IgJUT3bhsX/N0Yf/QUtUW5oxI | ||
256 | 53 | T7fod86B/Q2M7zBTttFhd1vAjiSjEalK48SjTzWqTDYVIkea1+f1kZK5A0QlthqG | ||
257 | 54 | P2zy5GUjZVzOiCSOhyEOvAorU3zKD2s84VFKlayZEqlHJh8u5U59TWBdkW3qZUJd | ||
258 | 55 | ewW31xt0s8IovYSgOwX3wbsClQs6eVwNuCZT2yQAgAyXA5iFztBvDRQ0qmetvzV2 | ||
259 | 56 | Ay9SrjvkQ3qr/eZmbMErEwEUxIO4b1rctCQ6jcbyVxMTAZAfaDoVKWEMXNiF2KSw | ||
260 | 57 | F9SSzGPIZDgiEXUlgaJBlUIYSFxrPuE+da0CM5RixyYIinU6AER6crl9C4C9XL6a | ||
261 | 58 | u3jf+5MTGxviRGn2oQzSCYkCMwQQAQgAHRYhBKeHFU4z7cw4HFbYuaxFYRTTj42I | ||
262 | 59 | BQJboq6kAAoJEKxFYRTTj42IWIAP/3rc9GjDTM4nI6Oi4OzLkwm/I2Vr7LUKG8oX | ||
263 | 60 | 8E4Nj3amvNGupzGySjB+vrM6APrMSScXunvM0f19LV84EnNrUQ3KFZcSC6r5WC0B | ||
264 | 61 | 2+TVRYGpY+6R9AQpqnuxicW0sa/AlV9WSEb4fDavCel2nW0arH4wkkCzTThUxoBB | ||
265 | 62 | X4I9nf4ZzGoUnnDAwTD9rN0gpI6Td/7faa3t99dRLb6AHJ1KhvyiiV3lr0xtTssD | ||
266 | 63 | xVHo0SpzQTnOcRJnYf/2rTny8bVfROPWieh6HuEiP7SxT1HyeTr4WSAjSCoG95O2 | ||
267 | 64 | b3OgSMl0Z82FRMoJYmxID/V5YqH7015SjCxKdYhEZVp9YwWruEJIH8r6MGbWYNAl | ||
268 | 65 | REnyDvfGzAF0L0+gAUymDRmtp1jeXLo+HmLgVEUWegafs1TPfCWS/H9n10Upjmuq | ||
269 | 66 | akituzacz6Kjleq9qbnl81Xmh4AKmOILRwE7Pmcbl8HATOrmi5EaKffjMdWFzOWh | ||
270 | 67 | 3U4/VsNDujqSTXD88EjGcpLiIiYefGy0sURJbIMTkfXVt3ruHLyuvhsRE/2QEAi7 | ||
271 | 68 | gWB0zuBV8iGBaag+6RQkxGdpemPiogzuDijqZHoUXlp7Q6IYLanXeweyivdrSyTB | ||
272 | 69 | 4HOECDbWEPZwk6tCxnuklW5iJndxBmxjSxefIMGU7G2JS9quppCVFCrKUjIWnf7b | ||
273 | 70 | gXnNji5JiQIzBBABCAAdFiEExZuSbLy7rtFhdiOuHt8NuZ2LeoQFAluirpUACgkQ | ||
274 | 71 | Ht8NuZ2LeoR/gQ/6A71JxUavzyBlCXlMy2Hx2+gOfy68b8UWl7DwKTOBSoZOzPC7 | ||
275 | 72 | dVCSTzoK8dRELqsp7CkFImWcEwLJWMptuH2I1nK+Ua8bvxJSMJnOlPxYE8Wz5EK3 | ||
276 | 73 | SQ2mQvifRezQTe8zjdpxEDSR6xocSiigvJow4X+Mivrxxj8sMgu1KA1ud2VGX/IR | ||
277 | 74 | wMbwuBTH9YydgvzmFzTxdlJHEYmsI8koHrVWPHm//QqqPBn+qz2z9uAzDmGAiDYg | ||
278 | 75 | qtQijo5IJC8ZjxgdcTfCkN6he+GhHtOhyP/KF/FcRHY83DoNCtqexQZWGuKtbd8o | ||
279 | 76 | nQYtmemRFob5kR7GxuNdAqF74oQfXcvXZNtHSuN3VtLqkB4fzW+21JBJCsP3XCzd | ||
280 | 77 | nKjR4erXNrQycmp3shSoJbnVvdbDwaVlWhDen1DvJb0Lj2sO3PQPcwVQbf5XHWR/ | ||
281 | 78 | ZCf2OQTfVgwFEB4/0Twv70XwYIui2Ry9hmTPbD4Nn+UXbMQ3SOp90tj/e2yY/MFt | ||
282 | 79 | FvcIYcJTk9LM5IsnKgh+fSWDmdS3HD5Kjv2EPUHTNalruwwfmhS+ScJwM4XqHTJY | ||
283 | 80 | JkB16j/Xv2FTF+6KlbA1zdOVycPzoFKjAENYccQBVo2B+WQac7dFDqGEVNal9z66 | ||
284 | 81 | DyU4ciAHl6PsbuN7DWeuScLoqq5jwx61bZgn71mUOYC1/47ypat2BKCOXZ2JAjME | ||
285 | 82 | EgEIAB0WIQSm5op4O95BdGcqQkHwXKpE5VGK/wUCWie53AAKCRDwXKpE5VGK/3rM | ||
286 | 83 | D/9jcYKOjYaPJh3Q7wNC1HjjUa73eo5GvJqyXbsXufIh/RAYgQkD08P5JgzfXvQ0 | ||
287 | 84 | zOQTtDlDTVG8VMFoBYeMJVDd0k9LBbaljxcttMPfOll+AlQGAL7iQIqTAndknkJL | ||
288 | 85 | CFdl0ypa5GVsl1tzqmNC5fuMJ3vBoRtYbMitlHQkO0vLjZ7yl9fz+7YkREpEo/d5 | ||
289 | 86 | Ya8t4+L6el6lrETYaiGCTxHcbYD7VdiJxpxFQlpgl+XKtobrj70RocGQ5JwUNilC | ||
290 | 87 | nRJKUb33lbmntwDwQ1y1AjCnhB++3GHjJDXBPgYFDCSZPCndKeOXhxmB2psFf41i | ||
291 | 88 | 8foJPJXuh1vWOqArdwseFCRM6W2deF1utZmROMSkUo6IC8dYlucO/hjpjhG+C8Zv | ||
292 | 89 | QiM5uLylD3IPMX9wCz1tAhMNs3v4pEPo/4A//1cdLkor9cQVLFj3+TkS888EWZdj | ||
293 | 90 | Y8mUTIXU6yL1DXcj8CfDPS29fMpDorDpK1swl4pN5qgGfsL5BSAXUf1AZDWbxnEY | ||
294 | 91 | xf5rakfHDzrfbtbTSSfrBxS8gdW2vBKM+3nL21BeP8hQ0tkLA7bn2fNGz3aCOw46 | ||
295 | 92 | XeVJdBk1gVTwazspylqrh1ljr0hQEN4gs/8kM645BRdD0IyAFFcI44VmuVwd8+2g | ||
296 | 93 | 5miAGmVKSqN77w2cgMRnF7xpUsanv+3zKzaTnG+2liTeCokCPgQTAQIAKAUCVL7V | ||
297 | 94 | IAIbAwUJBaOagAYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQD8MELjRa0F1m | ||
298 | 95 | RhAAj9X+/4iiQsN888dNW/H1wEFFTd/1vqb2j0sHP3t02LkEPN5Ii9u71TSD2gSD | ||
299 | 96 | WTu1Eb46nRDcapFNv5M0vXcWrEt7PK9b51Kuj4KpP5IjJHpTl2g7umaYQWC8fqcY | ||
300 | 97 | TJTH0guMSCzZlsP0xGLbAj3cG6X5OPzCO+IxEafXmE//SfS9w46n1OC57ca1Y0Fp | ||
301 | 98 | WXfjA0sJrcozgNchsptu3jg/oEteYJoxDAzNO45O4geNONq5D9PUQPb+H5Vv5zpy | ||
302 | 99 | MI7iUJhVnTOFvnoUgRS7v6pWiA3flh5FelK8tYPCzEfvxfe7EB5GO7MaJEO3ZLni | ||
303 | 100 | COaAZ3Nfn6Tt28tCOgd052W4FeGWow7iYCS1Wgd30bq/FNgnl+tKv2woxmWt4jJv | ||
304 | 101 | ioBHQ4PbUnap2RCmBFaG7llRkrKP8nhWSUdwSS3OmDwAfxTTXjPaESK9EX9OV9Xo | ||
305 | 102 | or07thq+7OMs+2cyiy2jSfIau0SELy/tVioZBhoB7hzAJUB8sGHOxMPlVDFdUr3x | ||
306 | 103 | F/cgCclWANhw2xvgPim1wQ0XpeZe6w9RpmjZR7ReMYwxn8APBDP/e9R5aLDUQAep | ||
307 | 104 | 2hrJUPK38D0L69RnpWQsR9hZ2hEOrMV2M6ChlvhwHbGSdJ2CcqG5Jx4ZAP23DK3A | ||
308 | 105 | N26TB88H9F7IMrM0REZeu7KzvYwCWlpg0zMXXKQ/2vovoe2JAlUEEwECAD8CGwMG | ||
309 | 106 | CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAFiEEtsj5goK5ROOw1cJTD8MELjRa0F0F | ||
310 | 107 | Alpd+i0FCQ8FJo0ACgkQD8MELjRa0F3X3A//dBQLm6GmXlQFjxZbukTw0lZsevFR | ||
311 | 108 | M/6ljZTxp7bsC+HFzYoaCKv6rikaWzytxk//SOaLKrB4Z9HjAlpBMtyLl2Hk7tcZ | ||
312 | 109 | bPpFafNmQ+4KgWNjLXCvt9se8BGrQvGQUrbE6YowbXa2YIgxIVEncFzIECAsp/+N | ||
313 | 110 | xbMcZN5/X1PJxKi/N22gP4nn47muN6L3pKez3CXgWnhGYSc7BuD5ALWYH7yMYUem | ||
314 | 111 | d4jlXfu5xkBIqirj1arIYC9wmF4ldbLNDPuracc8LmXcSqa5Rpao0s4iVzAD+tkX | ||
315 | 112 | vE/73m3rhepwBXxrfk0McXuI9aucf5h4/KkIBzZsaJ6JM1tzlrJzzjaBKJF9OI5T | ||
316 | 113 | jA0qTxdGzdPztS8gPaPcMkRFfh9ti0ZDx4VeF3s8sOtmMRHeGEWfxqUAbBUbwFsa | ||
317 | 114 | JDu/+8/VO4KijfcuUi8tqJ/JHeosCuGE7TM93LwJu6ZcqMYOPDROE/hsnGm0ZU92 | ||
318 | 115 | xedu+07/X1ESHkSFPoaSHD5/DCNa/tXIyJZ8X7gF3eoDP5mSmrJqIqsOBR9WOVYv | ||
319 | 116 | dI8i0GHTXbrZj8WXdoS+N8wlyMLLbAS2jvTe7M5RoqbLz4ABOUUnLVoEE0CiccVZ | ||
320 | 117 | bW75BPxOfaD0szbinAeX6HDPI7St0MbKrRPjuDXjD0JVkLqFINtZfYLGMLss4tgn | ||
321 | 118 | suefr0Bo9ISwG3u5Ag0EVL7VIAEQAOxBxrQesChjrCqKjY5PnSsSYpeb4froucrC | ||
322 | 119 | 898AFw2DgN/Zz+W7wtSTbtz/GRcCurjzZvN7o2rCuNk0j0+s1sgZZm2BdldlabLy | ||
323 | 120 | +UF/kSW1rb5qhfXcGGubu48OMdtSfok9lOc0Q1L4HNlGE4lUBkZzmI7Ykqfl+Bwr | ||
324 | 121 | m9rpi54g4ua9PIiiHIAmMoZIcbtOG1KaDr6CoXRk/3g2ZiGUwhq3jFGroiBsKEap | ||
325 | 122 | 2FJ1bh5NJk2Eg8pV7fMOF7hUQKBZrNOtIPu8hA5WEgku3U3VYjRSI3SDi6QXnDL+ | ||
326 | 123 | xHxajiWpKtF3JjZh8y/CCTD8PyP34YjfZuFmkdske5cdx6H0V2UCiH453ncgFVdQ | ||
327 | 124 | DXkY4n+0MTzhy2xu0IVVnBxYDYNhi+3MjTHJd9C4xMi9t+5IuEvDAPhgfZjDpQak | ||
328 | 125 | EPz6hVmgj0mlKIgRilBRK9/kOxky9utBpGk3jEJGru/hKNloFNspoYtY6zATAr8E | ||
329 | 126 | cOgoCFQE0nIktcg3wF9+OCEnV28/a7XZwUZ7Gl/qfOHtdr374wo8kd8R3V8d2G9q | ||
330 | 127 | 5w0/uCV9NNQ0fGWZDPDoYt6wnPL6gZv/nJM8oZY+u0rC24WwScZIniaryC4JHDas | ||
331 | 128 | Ahr2S2CtgCvBgslK6f3gD16KHxPZMBpX73TzOYIhMEP/vXgVJbUD6dYht+U9c4Oh | ||
332 | 129 | EDJown0dABEBAAGJAjwEGAECACYCGwwWIQS2yPmCgrlE47DVwlMPwwQuNFrQXQUC | ||
333 | 130 | Wl36SwUJDwUmqwAKCRAPwwQuNFrQXT1/D/9YpRDNgaJl3YVDtVZoeQwh7BQ6ULZT | ||
334 | 131 | eXFPogYkF2j3VWg8s9UmAs4sg/4a+9KLSantXjX+JFsRv0lQe5Gr/Vl8VQ4LKEXB | ||
335 | 132 | fiGmSivjIZ7eopdd3YP2w6G5T3SA4d2CQfsg4rnJPnXIjzKNiSOi368ybnt9fL0Y | ||
336 | 133 | 2r2aqLTmP6Y7issDUO+J1TW1XHm349JPR0Hl4cTuNnWm4JuX2m2CJEc5XBlDAha9 | ||
337 | 134 | pUVs+J5C2D0UFFkyeOzeJPwy6x5ApWHm84n8AjhQSpu1qRKxKXdwei6tkQWWMHui | ||
338 | 135 | +TgSY/zCkmD9/oY15Ei5avJ4WgIbTLJUoZMi70riPmU8ThjpzA7S+Nk0g7rMPq+X | ||
339 | 136 | l1whjKU/u0udlsrIJjzkh6ftqKUmIkbxYTpjhnEujNrEr5m2S6Z6x3y9E5QagBMR | ||
340 | 137 | dxRhfk+HbyACcP/p9rXOzl4M291DoKeAAH70GHniGxyNs9rAoMr/hD5XW/Wrz3dc | ||
341 | 138 | KMc2s555E6MZILE2ZiolcRn+bYOMPZtWlbx98t8uqMf49gY4FGQBZAwPglMrx7mr | ||
342 | 139 | m7HTIiXahThQGOJg6izJDAD5RwSEGlAcL28T8KAuM6CLLkhlBfQwiKsUBNnh9r8w | ||
343 | 140 | V3lB+pV0GhL+3i077gTYfZBRwLzjFdhm9xUKEaZ6rN1BX9lzix4eSNK5nln0jUq1 | ||
344 | 141 | 67H2IH//2sf8dw== | ||
345 | 142 | =fTDu | ||
346 | 143 | -----END PGP PUBLIC KEY BLOCK----- | ||
347 | 0 | \ No newline at end of file | 144 | \ No newline at end of file |
348 | diff --git a/nss/automation/taskcluster/docker-hacl/Dockerfile b/nss/automation/taskcluster/docker-hacl/Dockerfile | |||
349 | index 50f2be2..168be1c 100644 | |||
350 | --- a/nss/automation/taskcluster/docker-hacl/Dockerfile | |||
351 | +++ b/nss/automation/taskcluster/docker-hacl/Dockerfile | |||
352 | @@ -9,9 +9,10 @@ ENV haclrepo https://github.com/mitls/hacl-star.git | |||
353 | 9 | 9 | ||
354 | 10 | # Define versions of dependencies | 10 | # Define versions of dependencies |
355 | 11 | ENV opamv 4.05.0 | 11 | ENV opamv 4.05.0 |
357 | 12 | ENV haclversion 1da331f9ef30e13269e45ae73bbe4a4bca679ae6 | 12 | ENV haclversion 1442c015dab97cdf203ae238b1f3aeccf511bd1e |
358 | 13 | 13 | ||
359 | 14 | # Install required packages and set versions | 14 | # Install required packages and set versions |
360 | 15 | ADD B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc /tmp/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc | ||
361 | 15 | ADD setup.sh /tmp/setup.sh | 16 | ADD setup.sh /tmp/setup.sh |
362 | 16 | RUN bash /tmp/setup.sh | 17 | RUN bash /tmp/setup.sh |
363 | 17 | 18 | ||
364 | diff --git a/nss/automation/taskcluster/docker-hacl/setup.sh b/nss/automation/taskcluster/docker-hacl/setup.sh | |||
365 | index f5f8bd7..491342e 100644 | |||
366 | --- a/nss/automation/taskcluster/docker-hacl/setup.sh | |||
367 | +++ b/nss/automation/taskcluster/docker-hacl/setup.sh | |||
368 | @@ -12,9 +12,13 @@ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 200 | |||
369 | 12 | # Get clang-format-3.9 | 12 | # Get clang-format-3.9 |
370 | 13 | curl -LO https://releases.llvm.org/3.9.1/clang+llvm-3.9.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz | 13 | curl -LO https://releases.llvm.org/3.9.1/clang+llvm-3.9.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz |
371 | 14 | curl -LO https://releases.llvm.org/3.9.1/clang+llvm-3.9.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz.sig | 14 | curl -LO https://releases.llvm.org/3.9.1/clang+llvm-3.9.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz.sig |
375 | 15 | # Verify the signature. | 15 | |
376 | 16 | gpg --keyserver pool.sks-keyservers.net --recv-keys B6C8F98282B944E3B0D5C2530FC3042E345AD05D | 16 | # Verify the signature. The key used for verification was fetched via: |
377 | 17 | gpg --verify *.tar.xz.sig | 17 | # gpg --keyserver pgp.key-server.io --recv-keys B6C8F98282B944E3B0D5C2530FC3042E345AD05D |
378 | 18 | # Use a local copy to workaround bug 1565013. | ||
379 | 19 | gpg --no-default-keyring --keyring tmp.keyring --import /tmp/B6C8F98282B944E3B0D5C2530FC3042E345AD05D.asc | ||
380 | 20 | gpg --no-default-keyring --keyring tmp.keyring --verify clang+llvm-3.9.1-x86_64-linux-gnu-ubuntu-16.04.tar.xz.sig | ||
381 | 21 | |||
382 | 18 | # Install into /usr/local/. | 22 | # Install into /usr/local/. |
383 | 19 | tar xJvf *.tar.xz -C /usr/local --strip-components=1 | 23 | tar xJvf *.tar.xz -C /usr/local --strip-components=1 |
384 | 20 | # Cleanup. | 24 | # Cleanup. |
385 | diff --git a/nss/automation/taskcluster/graph/src/extend.js b/nss/automation/taskcluster/graph/src/extend.js | |||
386 | index d7bd3f5..5b22ef8 100644 | |||
387 | --- a/nss/automation/taskcluster/graph/src/extend.js | |||
388 | +++ b/nss/automation/taskcluster/graph/src/extend.js | |||
389 | @@ -121,12 +121,26 @@ queue.map(task => { | |||
390 | 121 | } | 121 | } |
391 | 122 | } | 122 | } |
392 | 123 | 123 | ||
393 | 124 | // We don't run FIPS SSL tests | ||
394 | 125 | if (task.tests == "ssl") { | 124 | if (task.tests == "ssl") { |
395 | 126 | if (!task.env) { | 125 | if (!task.env) { |
396 | 127 | task.env = {}; | 126 | task.env = {}; |
397 | 128 | } | 127 | } |
399 | 129 | task.env.NSS_SSL_TESTS = "crl iopr policy"; | 128 | |
400 | 129 | // Stress tests to not include other SSL tests | ||
401 | 130 | if (task.symbol == "stress") { | ||
402 | 131 | task.env.NSS_SSL_TESTS = "normal_normal"; | ||
403 | 132 | } else { | ||
404 | 133 | task.env.NSS_SSL_TESTS = "crl iopr policy normal_normal"; | ||
405 | 134 | } | ||
406 | 135 | |||
407 | 136 | // FIPS runs | ||
408 | 137 | if (task.collection == "fips") { | ||
409 | 138 | task.env.NSS_SSL_TESTS += " fips_fips fips_normal normal_fips"; | ||
410 | 139 | } | ||
411 | 140 | |||
412 | 141 | if (task.platform == "mac") { | ||
413 | 142 | task.maxRunTime = 7200; | ||
414 | 143 | } | ||
415 | 130 | } | 144 | } |
416 | 131 | 145 | ||
417 | 132 | // Windows is slow. | 146 | // Windows is slow. |
418 | @@ -135,6 +149,9 @@ queue.map(task => { | |||
419 | 135 | task.maxRunTime = 7200; | 149 | task.maxRunTime = 7200; |
420 | 136 | } | 150 | } |
421 | 137 | 151 | ||
422 | 152 | if (task.platform == "mac" && task.tests == "tools") { | ||
423 | 153 | task.maxRunTime = 7200; | ||
424 | 154 | } | ||
425 | 138 | return task; | 155 | return task; |
426 | 139 | }); | 156 | }); |
427 | 140 | 157 | ||
428 | @@ -317,12 +334,7 @@ async function scheduleMac(name, base, args = "") { | |||
429 | 317 | }); | 334 | }); |
430 | 318 | 335 | ||
431 | 319 | // Build base definition. | 336 | // Build base definition. |
438 | 320 | let build_base = merge(mac_base, { | 337 | let build_base_without_command_symbol = merge(mac_base, { |
433 | 321 | command: [ | ||
434 | 322 | MAC_CHECKOUT_CMD, | ||
435 | 323 | ["bash", "-c", | ||
436 | 324 | "nss/automation/taskcluster/scripts/build_gyp.sh " + args] | ||
437 | 325 | ], | ||
439 | 326 | provisioner: "localprovisioner", | 338 | provisioner: "localprovisioner", |
440 | 327 | workerType: "nss-macos-10-12", | 339 | workerType: "nss-macos-10-12", |
441 | 328 | platform: "mac", | 340 | platform: "mac", |
442 | @@ -333,6 +345,35 @@ async function scheduleMac(name, base, args = "") { | |||
443 | 333 | path: "public" | 345 | path: "public" |
444 | 334 | }], | 346 | }], |
445 | 335 | kind: "build", | 347 | kind: "build", |
446 | 348 | }); | ||
447 | 349 | |||
448 | 350 | let gyp_cmd = "nss/automation/taskcluster/scripts/build_gyp.sh "; | ||
449 | 351 | |||
450 | 352 | if (!("collection" in base) || | ||
451 | 353 | (base.collection != "make" && | ||
452 | 354 | base.collection != "asan" && | ||
453 | 355 | base.collection != "fips" && | ||
454 | 356 | base.collection != "fuzz")) { | ||
455 | 357 | let nspr_gyp = gyp_cmd + "--nspr-only --nspr-test-build "; | ||
456 | 358 | // TODO (bug 1385039): nspr_gyp += "--nspr-test-run "; | ||
457 | 359 | let nspr_build = merge(build_base_without_command_symbol, { | ||
458 | 360 | command: [ | ||
459 | 361 | MAC_CHECKOUT_CMD, | ||
460 | 362 | ["bash", "-c", | ||
461 | 363 | nspr_gyp + args] | ||
462 | 364 | ], | ||
463 | 365 | symbol: "NSPR" | ||
464 | 366 | }); | ||
465 | 367 | // The task that tests NSPR. | ||
466 | 368 | let nspr_task_build = queue.scheduleTask(merge(nspr_build, {name})); | ||
467 | 369 | } | ||
468 | 370 | |||
469 | 371 | let build_base = merge(build_base_without_command_symbol, { | ||
470 | 372 | command: [ | ||
471 | 373 | MAC_CHECKOUT_CMD, | ||
472 | 374 | ["bash", "-c", | ||
473 | 375 | gyp_cmd + args] | ||
474 | 376 | ], | ||
475 | 336 | symbol: "B" | 377 | symbol: "B" |
476 | 337 | }); | 378 | }); |
477 | 338 | 379 | ||
478 | @@ -366,25 +407,55 @@ async function scheduleMac(name, base, args = "") { | |||
479 | 366 | /*****************************************************************************/ | 407 | /*****************************************************************************/ |
480 | 367 | 408 | ||
481 | 368 | async function scheduleLinux(name, overrides, args = "") { | 409 | async function scheduleLinux(name, overrides, args = "") { |
482 | 410 | let checkout_and_gyp = "bin/checkout.sh && nss/automation/taskcluster/scripts/build_gyp.sh "; | ||
483 | 411 | let artifacts_and_kind = { | ||
484 | 412 | artifacts: { | ||
485 | 413 | public: { | ||
486 | 414 | expires: 24 * 7, | ||
487 | 415 | type: "directory", | ||
488 | 416 | path: "/home/worker/artifacts" | ||
489 | 417 | } | ||
490 | 418 | }, | ||
491 | 419 | kind: "build", | ||
492 | 420 | }; | ||
493 | 421 | |||
494 | 422 | if (!("collection" in overrides) || | ||
495 | 423 | (overrides.collection != "make" && | ||
496 | 424 | overrides.collection != "asan" && | ||
497 | 425 | overrides.collection != "fips" && | ||
498 | 426 | overrides.collection != "fuzz")) { | ||
499 | 427 | let nspr_gyp = checkout_and_gyp + "--nspr-only --nspr-test-build "; | ||
500 | 428 | // TODO (bug 1385039): nspr_gyp += "--nspr-test-run "; | ||
501 | 429 | |||
502 | 430 | let nspr_base = merge({ | ||
503 | 431 | command: [ | ||
504 | 432 | "/bin/bash", | ||
505 | 433 | "-c", | ||
506 | 434 | nspr_gyp + args | ||
507 | 435 | ], | ||
508 | 436 | }, overrides); | ||
509 | 437 | let nspr_without_symbol = merge(nspr_base, artifacts_and_kind); | ||
510 | 438 | let nspr_build = merge(nspr_without_symbol, { | ||
511 | 439 | symbol: "NSPR", | ||
512 | 440 | }); | ||
513 | 441 | // The task that tests NSPR. | ||
514 | 442 | let nspr_task_build = queue.scheduleTask(merge(nspr_build, {name})); | ||
515 | 443 | } | ||
516 | 444 | |||
517 | 369 | // Construct a base definition. This takes |overrides| second because | 445 | // Construct a base definition. This takes |overrides| second because |
518 | 370 | // callers expect to be able to overwrite the |command| key. | 446 | // callers expect to be able to overwrite the |command| key. |
519 | 371 | let base = merge({ | 447 | let base = merge({ |
520 | 372 | command: [ | 448 | command: [ |
521 | 373 | "/bin/bash", | 449 | "/bin/bash", |
522 | 374 | "-c", | 450 | "-c", |
524 | 375 | "bin/checkout.sh && nss/automation/taskcluster/scripts/build_gyp.sh " + args | 451 | checkout_and_gyp + args |
525 | 376 | ], | 452 | ], |
526 | 377 | }, overrides); | 453 | }, overrides); |
527 | 454 | |||
528 | 455 | let base_without_symbol = merge(base, artifacts_and_kind); | ||
529 | 456 | |||
530 | 378 | // The base for building. | 457 | // The base for building. |
540 | 379 | let build_base = merge(base, { | 458 | let build_base = merge(base_without_symbol, { |
532 | 380 | artifacts: { | ||
533 | 381 | public: { | ||
534 | 382 | expires: 24 * 7, | ||
535 | 383 | type: "directory", | ||
536 | 384 | path: "/home/worker/artifacts" | ||
537 | 385 | } | ||
538 | 386 | }, | ||
539 | 387 | kind: "build", | ||
541 | 388 | symbol: "B", | 459 | symbol: "B", |
542 | 389 | }); | 460 | }); |
543 | 390 | 461 | ||
544 | @@ -567,7 +638,7 @@ async function scheduleFuzzing() { | |||
545 | 567 | "/bin/bash", | 638 | "/bin/bash", |
546 | 568 | "-c", | 639 | "-c", |
547 | 569 | "bin/checkout.sh && " + | 640 | "bin/checkout.sh && " + |
549 | 570 | "nss/automation/taskcluster/scripts/build_gyp.sh -g -v --fuzz" | 641 | "nss/automation/taskcluster/scripts/build_gyp.sh --fuzz" |
550 | 571 | ], | 642 | ], |
551 | 572 | artifacts: { | 643 | artifacts: { |
552 | 573 | public: { | 644 | public: { |
553 | @@ -594,7 +665,7 @@ async function scheduleFuzzing() { | |||
554 | 594 | "/bin/bash", | 665 | "/bin/bash", |
555 | 595 | "-c", | 666 | "-c", |
556 | 596 | "bin/checkout.sh && " + | 667 | "bin/checkout.sh && " + |
558 | 597 | "nss/automation/taskcluster/scripts/build_gyp.sh -g -v --fuzz=tls" | 668 | "nss/automation/taskcluster/scripts/build_gyp.sh --fuzz=tls" |
559 | 598 | ], | 669 | ], |
560 | 599 | })); | 670 | })); |
561 | 600 | 671 | ||
562 | @@ -672,7 +743,7 @@ async function scheduleFuzzing32() { | |||
563 | 672 | "/bin/bash", | 743 | "/bin/bash", |
564 | 673 | "-c", | 744 | "-c", |
565 | 674 | "bin/checkout.sh && " + | 745 | "bin/checkout.sh && " + |
567 | 675 | "nss/automation/taskcluster/scripts/build_gyp.sh -g -v --fuzz -t ia32" | 746 | "nss/automation/taskcluster/scripts/build_gyp.sh --fuzz -t ia32" |
568 | 676 | ], | 747 | ], |
569 | 677 | artifacts: { | 748 | artifacts: { |
570 | 678 | public: { | 749 | public: { |
571 | @@ -699,7 +770,7 @@ async function scheduleFuzzing32() { | |||
572 | 699 | "/bin/bash", | 770 | "/bin/bash", |
573 | 700 | "-c", | 771 | "-c", |
574 | 701 | "bin/checkout.sh && " + | 772 | "bin/checkout.sh && " + |
576 | 702 | "nss/automation/taskcluster/scripts/build_gyp.sh -g -v --fuzz=tls -t ia32" | 773 | "nss/automation/taskcluster/scripts/build_gyp.sh --fuzz=tls -t ia32" |
577 | 703 | ], | 774 | ], |
578 | 704 | })); | 775 | })); |
579 | 705 | 776 | ||
580 | @@ -771,21 +842,45 @@ async function scheduleWindows(name, base, build_script) { | |||
581 | 771 | } | 842 | } |
582 | 772 | }); | 843 | }); |
583 | 773 | 844 | ||
590 | 774 | // Build base definition. | 845 | let artifacts_and_kind = { |
585 | 775 | let build_base = merge(base, { | ||
586 | 776 | command: [ | ||
587 | 777 | WINDOWS_CHECKOUT_CMD, | ||
588 | 778 | `bash -c 'nss/automation/taskcluster/windows/${build_script}'` | ||
589 | 779 | ], | ||
591 | 780 | artifacts: [{ | 846 | artifacts: [{ |
592 | 781 | expires: 24 * 7, | 847 | expires: 24 * 7, |
593 | 782 | type: "directory", | 848 | type: "directory", |
594 | 783 | path: "public\\build" | 849 | path: "public\\build" |
595 | 784 | }], | 850 | }], |
596 | 785 | kind: "build", | 851 | kind: "build", |
597 | 852 | }; | ||
598 | 853 | |||
599 | 854 | let build_without_command_symbol = merge(base, artifacts_and_kind); | ||
600 | 855 | |||
601 | 856 | // Build base definition. | ||
602 | 857 | let build_base = merge(build_without_command_symbol, { | ||
603 | 858 | command: [ | ||
604 | 859 | WINDOWS_CHECKOUT_CMD, | ||
605 | 860 | `bash -c 'nss/automation/taskcluster/windows/${build_script}'` | ||
606 | 861 | ], | ||
607 | 786 | symbol: "B" | 862 | symbol: "B" |
608 | 787 | }); | 863 | }); |
609 | 788 | 864 | ||
610 | 865 | if (!("collection" in base) || | ||
611 | 866 | (base.collection != "make" && | ||
612 | 867 | base.collection != "asan" && | ||
613 | 868 | base.collection != "fips" && | ||
614 | 869 | base.collection != "fuzz")) { | ||
615 | 870 | let nspr_gyp = | ||
616 | 871 | `bash -c 'nss/automation/taskcluster/windows/${build_script} --nspr-only --nspr-test-build'`; | ||
617 | 872 | // TODO (bug 1385039): add --nspr-test-run | ||
618 | 873 | let nspr_build = merge(build_without_command_symbol, { | ||
619 | 874 | command: [ | ||
620 | 875 | WINDOWS_CHECKOUT_CMD, | ||
621 | 876 | nspr_gyp | ||
622 | 877 | ], | ||
623 | 878 | symbol: "NSPR" | ||
624 | 879 | }); | ||
625 | 880 | // The task that tests NSPR. | ||
626 | 881 | let task_build = queue.scheduleTask(merge(nspr_build, {name})); | ||
627 | 882 | } | ||
628 | 883 | |||
629 | 789 | // Make builds run FIPS tests, which need an extra FIPS build. | 884 | // Make builds run FIPS tests, which need an extra FIPS build. |
630 | 790 | if (base.collection == "make") { | 885 | if (base.collection == "make") { |
631 | 791 | let extra_build = queue.scheduleTask(merge(build_base, { | 886 | let extra_build = queue.scheduleTask(merge(build_base, { |
632 | @@ -951,6 +1046,10 @@ function scheduleTests(task_build, task_cert, test_base) { | |||
633 | 951 | queue.scheduleTask(merge(ssl_base, { | 1046 | queue.scheduleTask(merge(ssl_base, { |
634 | 952 | name: "SSL tests (upgradedb)", symbol: "upgradedb", cycle: "upgradedb" | 1047 | name: "SSL tests (upgradedb)", symbol: "upgradedb", cycle: "upgradedb" |
635 | 953 | })); | 1048 | })); |
636 | 1049 | queue.scheduleTask(merge(ssl_base, { | ||
637 | 1050 | name: "SSL tests (stress)", symbol: "stress", cycle: "sharedb", | ||
638 | 1051 | env: {NSS_SSL_RUN: "stress"} | ||
639 | 1052 | })); | ||
640 | 954 | } | 1053 | } |
641 | 955 | 1054 | ||
642 | 956 | /*****************************************************************************/ | 1055 | /*****************************************************************************/ |
643 | diff --git a/nss/automation/taskcluster/graph/src/queue.js b/nss/automation/taskcluster/graph/src/queue.js | |||
644 | index 0b7ade9..0dc6bbb 100644 | |||
645 | --- a/nss/automation/taskcluster/graph/src/queue.js | |||
646 | +++ b/nss/automation/taskcluster/graph/src/queue.js | |||
647 | @@ -114,6 +114,14 @@ function convertTask(def) { | |||
648 | 114 | if (def.cycle) { | 114 | if (def.cycle) { |
649 | 115 | env.NSS_CYCLES = def.cycle; | 115 | env.NSS_CYCLES = def.cycle; |
650 | 116 | } | 116 | } |
651 | 117 | if (def.kind === "build") { | ||
652 | 118 | // Disable leak checking during builds (bug 1579290). | ||
653 | 119 | if (env.ASAN_OPTIONS) { | ||
654 | 120 | env.ASAN_OPTIONS += ":detect_leaks=0"; | ||
655 | 121 | } else { | ||
656 | 122 | env.ASAN_OPTIONS = "detect_leaks=0"; | ||
657 | 123 | } | ||
658 | 124 | } | ||
659 | 117 | 125 | ||
660 | 118 | let payload = { | 126 | let payload = { |
661 | 119 | env, | 127 | env, |
662 | @@ -143,7 +151,7 @@ function convertTask(def) { | |||
663 | 143 | } | 151 | } |
664 | 144 | 152 | ||
665 | 145 | let extra = Object.assign({ | 153 | let extra = Object.assign({ |
667 | 146 | treeherder: parseTreeherder(def) | 154 | treeherder: parseTreeherder(def) |
668 | 147 | }, parameters); | 155 | }, parameters); |
669 | 148 | 156 | ||
670 | 149 | return { | 157 | return { |
671 | diff --git a/nss/automation/taskcluster/graph/src/try_syntax.js b/nss/automation/taskcluster/graph/src/try_syntax.js | |||
672 | index 700032a..ca0b848 100644 | |||
673 | --- a/nss/automation/taskcluster/graph/src/try_syntax.js | |||
674 | +++ b/nss/automation/taskcluster/graph/src/try_syntax.js | |||
675 | @@ -183,6 +183,17 @@ export async function initFilter() { | |||
676 | 183 | 183 | ||
677 | 184 | // Add try syntax filter. | 184 | // Add try syntax filter. |
678 | 185 | if (match) { | 185 | if (match) { |
680 | 186 | queue.filter(filter(parseOptions(match[1]))); | 186 | let match1 = match[1]; |
681 | 187 | queue.filter(filter(parseOptions(match1))); | ||
682 | 188 | |||
683 | 189 | if (match1.includes("--nspr-patch")) { | ||
684 | 190 | queue.map(task => { | ||
685 | 191 | if (!task.env) { | ||
686 | 192 | task.env = {}; | ||
687 | 193 | } | ||
688 | 194 | task.env.ALLOW_NSPR_PATCH = "1"; | ||
689 | 195 | return task; | ||
690 | 196 | }); | ||
691 | 197 | } | ||
692 | 187 | } | 198 | } |
693 | 188 | } | 199 | } |
694 | diff --git a/nss/automation/taskcluster/scripts/build.sh b/nss/automation/taskcluster/scripts/build.sh | |||
695 | index 649fdaa..42ac822 100755 | |||
696 | --- a/nss/automation/taskcluster/scripts/build.sh | |||
697 | +++ b/nss/automation/taskcluster/scripts/build.sh | |||
698 | @@ -13,6 +13,12 @@ fi | |||
699 | 13 | # Clone NSPR if needed. | 13 | # Clone NSPR if needed. |
700 | 14 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default | 14 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default |
701 | 15 | 15 | ||
702 | 16 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
703 | 17 | pushd nspr | ||
704 | 18 | cat ../nss/nspr.patch | patch -p1 | ||
705 | 19 | popd | ||
706 | 20 | fi | ||
707 | 21 | |||
708 | 16 | # Build. | 22 | # Build. |
709 | 17 | make -C nss nss_build_all | 23 | make -C nss nss_build_all |
710 | 18 | 24 | ||
711 | diff --git a/nss/automation/taskcluster/scripts/build_gyp.sh b/nss/automation/taskcluster/scripts/build_gyp.sh | |||
712 | index fb3a33a..e19a636 100755 | |||
713 | --- a/nss/automation/taskcluster/scripts/build_gyp.sh | |||
714 | +++ b/nss/automation/taskcluster/scripts/build_gyp.sh | |||
715 | @@ -5,8 +5,14 @@ source $(dirname "$0")/tools.sh | |||
716 | 5 | # Clone NSPR if needed. | 5 | # Clone NSPR if needed. |
717 | 6 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default | 6 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default |
718 | 7 | 7 | ||
719 | 8 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
720 | 9 | pushd nspr | ||
721 | 10 | cat ../nss/nspr.patch | patch -p1 | ||
722 | 11 | popd | ||
723 | 12 | fi | ||
724 | 13 | |||
725 | 8 | # Build. | 14 | # Build. |
727 | 9 | nss/build.sh -g -v "$@" | 15 | nss/build.sh -g -v --enable-libpkix "$@" |
728 | 10 | 16 | ||
729 | 11 | # Package. | 17 | # Package. |
730 | 12 | if [[ $(uname) = "Darwin" ]]; then | 18 | if [[ $(uname) = "Darwin" ]]; then |
731 | diff --git a/nss/automation/taskcluster/scripts/build_nspr.sh b/nss/automation/taskcluster/scripts/build_nspr.sh | |||
732 | index 4d19034..b104e43 100755 | |||
733 | --- a/nss/automation/taskcluster/scripts/build_nspr.sh | |||
734 | +++ b/nss/automation/taskcluster/scripts/build_nspr.sh | |||
735 | @@ -7,6 +7,12 @@ source $(dirname $0)/tools.sh | |||
736 | 7 | # Clone NSPR if needed. | 7 | # Clone NSPR if needed. |
737 | 8 | hg_clone https://hg.mozilla.org/projects/nspr nspr default | 8 | hg_clone https://hg.mozilla.org/projects/nspr nspr default |
738 | 9 | 9 | ||
739 | 10 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
740 | 11 | pushd nspr | ||
741 | 12 | cat ../nss/nspr.patch | patch -p1 | ||
742 | 13 | popd | ||
743 | 14 | fi | ||
744 | 15 | |||
745 | 10 | # Build. | 16 | # Build. |
746 | 11 | rm -rf dist | 17 | rm -rf dist |
747 | 12 | make -C nss build_nspr | 18 | make -C nss build_nspr |
748 | diff --git a/nss/automation/taskcluster/scripts/build_softoken.sh b/nss/automation/taskcluster/scripts/build_softoken.sh | |||
749 | index e5aaecc..5f60456 100755 | |||
750 | --- a/nss/automation/taskcluster/scripts/build_softoken.sh | |||
751 | +++ b/nss/automation/taskcluster/scripts/build_softoken.sh | |||
752 | @@ -20,8 +20,9 @@ export NSS_BUILD_SOFTOKEN_ONLY=1 | |||
753 | 20 | rm -rf dist | 20 | rm -rf dist |
754 | 21 | make -C nss-softoken nss_build_all | 21 | make -C nss-softoken nss_build_all |
755 | 22 | 22 | ||
758 | 23 | mv dist/private/nss/blapi.h dist/public/nss | 23 | for i in blapi alghmac cmac; do |
759 | 24 | mv dist/private/nss/alghmac.h dist/public/nss | 24 | mv "dist/private/nss/${i}.h" dist/public/nss |
760 | 25 | done | ||
761 | 25 | 26 | ||
762 | 26 | # Package. | 27 | # Package. |
763 | 27 | test -d artifacts || mkdir artifacts | 28 | test -d artifacts || mkdir artifacts |
764 | diff --git a/nss/automation/taskcluster/scripts/check_abi.sh b/nss/automation/taskcluster/scripts/check_abi.sh | |||
765 | index caa5cca..5cd587a 100755 | |||
766 | --- a/nss/automation/taskcluster/scripts/check_abi.sh | |||
767 | +++ b/nss/automation/taskcluster/scripts/check_abi.sh | |||
768 | @@ -20,6 +20,12 @@ set_env() | |||
769 | 20 | done | 20 | done |
770 | 21 | fi | 21 | fi |
771 | 22 | 22 | ||
772 | 23 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
773 | 24 | pushd nspr | ||
774 | 25 | cat ../nss/nspr.patch | patch -p1 | ||
775 | 26 | popd | ||
776 | 27 | fi | ||
777 | 28 | |||
778 | 23 | cd nss | 29 | cd nss |
779 | 24 | ./build.sh -v -c | 30 | ./build.sh -v -c |
780 | 25 | cd .. | 31 | cd .. |
781 | diff --git a/nss/automation/taskcluster/scripts/gen_coverage_report.sh b/nss/automation/taskcluster/scripts/gen_coverage_report.sh | |||
782 | index 3907c72..dc7d77d 100755 | |||
783 | --- a/nss/automation/taskcluster/scripts/gen_coverage_report.sh | |||
784 | +++ b/nss/automation/taskcluster/scripts/gen_coverage_report.sh | |||
785 | @@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh | |||
786 | 5 | # Clone NSPR. | 5 | # Clone NSPR. |
787 | 6 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default | 6 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default |
788 | 7 | 7 | ||
789 | 8 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
790 | 9 | pushd nspr | ||
791 | 10 | cat ../nss/nspr.patch | patch -p1 | ||
792 | 11 | popd | ||
793 | 12 | fi | ||
794 | 13 | |||
795 | 8 | out=/home/worker/artifacts | 14 | out=/home/worker/artifacts |
796 | 9 | mkdir -p $out | 15 | mkdir -p $out |
797 | 10 | 16 | ||
798 | diff --git a/nss/automation/taskcluster/scripts/run_coverity.sh b/nss/automation/taskcluster/scripts/run_coverity.sh | |||
799 | index 4d008f4..4b09f53 100755 | |||
800 | --- a/nss/automation/taskcluster/scripts/run_coverity.sh | |||
801 | +++ b/nss/automation/taskcluster/scripts/run_coverity.sh | |||
802 | @@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh | |||
803 | 5 | # Clone NSPR if needed. | 5 | # Clone NSPR if needed. |
804 | 6 | if [ ! -d "nspr" ]; then | 6 | if [ ! -d "nspr" ]; then |
805 | 7 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default | 7 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default |
806 | 8 | |||
807 | 9 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
808 | 10 | pushd nspr | ||
809 | 11 | cat ../nss/nspr.patch | patch -p1 | ||
810 | 12 | popd | ||
811 | 13 | fi | ||
812 | 8 | fi | 14 | fi |
813 | 9 | 15 | ||
814 | 10 | # Build and run Coverity | 16 | # Build and run Coverity |
815 | @@ -12,4 +18,4 @@ cd nss | |||
816 | 12 | ./mach static-analysis | 18 | ./mach static-analysis |
817 | 13 | 19 | ||
818 | 14 | # Return the exit code of the Coverity Analysis | 20 | # Return the exit code of the Coverity Analysis |
819 | 15 | exit $? | ||
820 | 16 | \ No newline at end of file | 21 | \ No newline at end of file |
821 | 22 | exit $? | ||
822 | diff --git a/nss/automation/taskcluster/scripts/run_scan_build.sh b/nss/automation/taskcluster/scripts/run_scan_build.sh | |||
823 | index 014530b..0e4fcbd 100755 | |||
824 | --- a/nss/automation/taskcluster/scripts/run_scan_build.sh | |||
825 | +++ b/nss/automation/taskcluster/scripts/run_scan_build.sh | |||
826 | @@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh | |||
827 | 5 | # Clone NSPR if needed. | 5 | # Clone NSPR if needed. |
828 | 6 | if [ ! -d "nspr" ]; then | 6 | if [ ! -d "nspr" ]; then |
829 | 7 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default | 7 | hg_clone https://hg.mozilla.org/projects/nspr ./nspr default |
830 | 8 | |||
831 | 9 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
832 | 10 | pushd nspr | ||
833 | 11 | cat ../nss/nspr.patch | patch -p1 | ||
834 | 12 | popd | ||
835 | 13 | fi | ||
836 | 8 | fi | 14 | fi |
837 | 9 | 15 | ||
838 | 10 | # Build. | 16 | # Build. |
839 | diff --git a/nss/automation/taskcluster/windows/build.sh b/nss/automation/taskcluster/windows/build.sh | |||
840 | index eebb415..f878a3d 100644 | |||
841 | --- a/nss/automation/taskcluster/windows/build.sh | |||
842 | +++ b/nss/automation/taskcluster/windows/build.sh | |||
843 | @@ -12,6 +12,12 @@ source "$(dirname "$0")/setup.sh" | |||
844 | 12 | # Clone NSPR. | 12 | # Clone NSPR. |
845 | 13 | hg_clone https://hg.mozilla.org/projects/nspr nspr default | 13 | hg_clone https://hg.mozilla.org/projects/nspr nspr default |
846 | 14 | 14 | ||
847 | 15 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
848 | 16 | pushd nspr | ||
849 | 17 | cat ../nss/nspr.patch | patch -p1 | ||
850 | 18 | popd | ||
851 | 19 | fi | ||
852 | 20 | |||
853 | 15 | # Build. | 21 | # Build. |
854 | 16 | make -C nss nss_build_all | 22 | make -C nss nss_build_all |
855 | 17 | 23 | ||
856 | diff --git a/nss/automation/taskcluster/windows/build_gyp.sh b/nss/automation/taskcluster/windows/build_gyp.sh | |||
857 | index c0f38f9..1a78d44 100644 | |||
858 | --- a/nss/automation/taskcluster/windows/build_gyp.sh | |||
859 | +++ b/nss/automation/taskcluster/windows/build_gyp.sh | |||
860 | @@ -31,8 +31,14 @@ export PATH="${PATH}:${PWD}/ninja/bin:${PWD}/gyp/test-env/Scripts" | |||
861 | 31 | # Clone NSPR. | 31 | # Clone NSPR. |
862 | 32 | hg_clone https://hg.mozilla.org/projects/nspr nspr default | 32 | hg_clone https://hg.mozilla.org/projects/nspr nspr default |
863 | 33 | 33 | ||
864 | 34 | if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then | ||
865 | 35 | pushd nspr | ||
866 | 36 | cat ../nss/nspr.patch | patch -p1 | ||
867 | 37 | popd | ||
868 | 38 | fi | ||
869 | 39 | |||
870 | 34 | # Build with gyp. | 40 | # Build with gyp. |
872 | 35 | ./nss/build.sh -g -v "$@" | 41 | ./nss/build.sh -g -v --enable-libpkix "$@" |
873 | 36 | 42 | ||
874 | 37 | # Package. | 43 | # Package. |
875 | 38 | 7z a public/build/dist.7z dist | 44 | 7z a public/build/dist.7z dist |
876 | diff --git a/nss/build.sh b/nss/build.sh | |||
877 | index 0b6fec8..7595d76 100755 | |||
878 | --- a/nss/build.sh | |||
879 | +++ b/nss/build.sh | |||
880 | @@ -13,14 +13,16 @@ | |||
881 | 13 | set -e | 13 | set -e |
882 | 14 | 14 | ||
883 | 15 | cwd=$(cd $(dirname $0); pwd -P) | 15 | cwd=$(cd $(dirname $0); pwd -P) |
886 | 16 | source "$cwd"/coreconf/nspr.sh | 16 | dist_dir="$cwd/../dist" |
887 | 17 | source "$cwd"/coreconf/sanitizers.sh | 17 | argsfile="$dist_dir/build_args" |
888 | 18 | source "$cwd/coreconf/nspr.sh" | ||
889 | 19 | source "$cwd/coreconf/sanitizers.sh" | ||
890 | 18 | GYP=${GYP:-gyp} | 20 | GYP=${GYP:-gyp} |
891 | 19 | 21 | ||
892 | 20 | # Usage info | 22 | # Usage info |
893 | 21 | show_help() | 23 | show_help() |
894 | 22 | { | 24 | { |
896 | 23 | cat "$cwd"/help.txt | 25 | cat "$cwd/help.txt" |
897 | 24 | } | 26 | } |
898 | 25 | 27 | ||
899 | 26 | run_verbose() | 28 | run_verbose() |
900 | @@ -35,6 +37,14 @@ run_verbose() | |||
901 | 35 | exec 3>&- | 37 | exec 3>&- |
902 | 36 | } | 38 | } |
903 | 37 | 39 | ||
904 | 40 | # The prehistoric bash on Mac doesn't support @Q quoting. | ||
905 | 41 | # The consequences aren't that serious, unless there are odd arrangements of spaces. | ||
906 | 42 | if /usr/bin/env bash -c 'x=1;echo "${x@Q}"' >/dev/null 2>&1; then | ||
907 | 43 | Q() { echo "${@@Q}"; } | ||
908 | 44 | else | ||
909 | 45 | Q() { echo "$@"; } | ||
910 | 46 | fi | ||
911 | 47 | |||
912 | 38 | if [ -n "$CCC" ] && [ -z "$CXX" ]; then | 48 | if [ -n "$CCC" ] && [ -z "$CXX" ]; then |
913 | 39 | export CXX="$CCC" | 49 | export CXX="$CCC" |
914 | 40 | fi | 50 | fi |
915 | @@ -44,6 +54,9 @@ build_64=0 | |||
916 | 44 | clean=0 | 54 | clean=0 |
917 | 45 | rebuild_gyp=0 | 55 | rebuild_gyp=0 |
918 | 46 | rebuild_nspr=0 | 56 | rebuild_nspr=0 |
919 | 57 | build_nspr_tests=0 | ||
920 | 58 | run_nspr_tests=0 | ||
921 | 59 | exit_after_nspr=0 | ||
922 | 47 | target=Debug | 60 | target=Debug |
923 | 48 | verbose=0 | 61 | verbose=0 |
924 | 49 | fuzz=0 | 62 | fuzz=0 |
925 | @@ -56,7 +69,7 @@ gyp_params=(--depth="$cwd" --generator-output=".") | |||
926 | 56 | ninja_params=() | 69 | ninja_params=() |
927 | 57 | 70 | ||
928 | 58 | # Assume that the target architecture is the same as the host by default. | 71 | # Assume that the target architecture is the same as the host by default. |
930 | 59 | host_arch=$(python "$cwd"/coreconf/detect_host_arch.py) | 72 | host_arch=$(python "$cwd/coreconf/detect_host_arch.py") |
931 | 60 | target_arch=$host_arch | 73 | target_arch=$host_arch |
932 | 61 | 74 | ||
933 | 62 | # Assume that MSVC is wanted if this is running on windows. | 75 | # Assume that MSVC is wanted if this is running on windows. |
934 | @@ -66,8 +79,17 @@ if [ "${platform%-*}" = "MINGW32_NT" -o "${platform%-*}" = "MINGW64_NT" ]; then | |||
935 | 66 | fi | 79 | fi |
936 | 67 | 80 | ||
937 | 68 | # Parse command line arguments. | 81 | # Parse command line arguments. |
938 | 82 | all_args=("$@") | ||
939 | 69 | while [ $# -gt 0 ]; do | 83 | while [ $# -gt 0 ]; do |
940 | 70 | case "$1" in | 84 | case "$1" in |
941 | 85 | --rebuild) | ||
942 | 86 | if [[ ! -e "$argsfile" ]]; then | ||
943 | 87 | echo "Unable to rebuild" 1>&2 | ||
944 | 88 | exit 2 | ||
945 | 89 | fi | ||
946 | 90 | IFS=$'\r\n' GLOBIGNORE='*' command eval 'previous_args=($(<"$argsfile"))' | ||
947 | 91 | exec /usr/bin/env bash -c "$(Q "$0")"' "$@"' "$0" "${previous_args[@]}" | ||
948 | 92 | ;; | ||
949 | 71 | -c) clean=1 ;; | 93 | -c) clean=1 ;; |
950 | 72 | -cc) clean_only=1 ;; | 94 | -cc) clean_only=1 ;; |
951 | 73 | -v) ninja_params+=(-v); verbose=1 ;; | 95 | -v) ninja_params+=(-v); verbose=1 ;; |
952 | @@ -98,6 +120,9 @@ while [ $# -gt 0 ]; do | |||
953 | 98 | --static) gyp_params+=(-Dstatic_libs=1) ;; | 120 | --static) gyp_params+=(-Dstatic_libs=1) ;; |
954 | 99 | --ct-verif) gyp_params+=(-Dct_verif=1) ;; | 121 | --ct-verif) gyp_params+=(-Dct_verif=1) ;; |
955 | 100 | --nspr) nspr_clean; rebuild_nspr=1 ;; | 122 | --nspr) nspr_clean; rebuild_nspr=1 ;; |
956 | 123 | --nspr-test-build) build_nspr_tests=1 ;; | ||
957 | 124 | --nspr-test-run) run_nspr_tests=1 ;; | ||
958 | 125 | --nspr-only) exit_after_nspr=1 ;; | ||
959 | 101 | --with-nspr=?*) set_nspr_path "${1#*=}"; no_local_nspr=1 ;; | 126 | --with-nspr=?*) set_nspr_path "${1#*=}"; no_local_nspr=1 ;; |
960 | 102 | --system-nspr) set_nspr_path "/usr/include/nspr/:"; no_local_nspr=1 ;; | 127 | --system-nspr) set_nspr_path "/usr/include/nspr/:"; no_local_nspr=1 ;; |
961 | 103 | --system-sqlite) gyp_params+=(-Duse_system_sqlite=1) ;; | 128 | --system-sqlite) gyp_params+=(-Duse_system_sqlite=1) ;; |
962 | @@ -105,7 +130,7 @@ while [ $# -gt 0 ]; do | |||
963 | 105 | --enable-libpkix) gyp_params+=(-Ddisable_libpkix=0) ;; | 130 | --enable-libpkix) gyp_params+=(-Ddisable_libpkix=0) ;; |
964 | 106 | --mozpkix-only) gyp_params+=(-Dmozpkix_only=1 -Ddisable_tests=1 -Dsign_libs=0) ;; | 131 | --mozpkix-only) gyp_params+=(-Dmozpkix_only=1 -Ddisable_tests=1 -Dsign_libs=0) ;; |
965 | 107 | --disable-keylog) sslkeylogfile=0 ;; | 132 | --disable-keylog) sslkeylogfile=0 ;; |
967 | 108 | -D*) gyp_params+=("$1") ;; | 133 | -D*) gyp_params+=("$1") ;; |
968 | 109 | *) show_help; exit 2 ;; | 134 | *) show_help; exit 2 ;; |
969 | 110 | esac | 135 | esac |
970 | 111 | shift | 136 | shift |
971 | @@ -123,7 +148,7 @@ gyp_params+=(-Denable_sslkeylogfile="$sslkeylogfile") | |||
972 | 123 | 148 | ||
973 | 124 | # Do special setup. | 149 | # Do special setup. |
974 | 125 | if [ "$fuzz" = 1 ]; then | 150 | if [ "$fuzz" = 1 ]; then |
976 | 126 | source "$cwd"/coreconf/fuzz.sh | 151 | source "$cwd/coreconf/fuzz.sh" |
977 | 127 | fi | 152 | fi |
978 | 128 | nspr_set_flags $sanitizer_flags | 153 | nspr_set_flags $sanitizer_flags |
979 | 129 | if [ ! -z "$sanitizer_flags" ]; then | 154 | if [ ! -z "$sanitizer_flags" ]; then |
980 | @@ -131,20 +156,13 @@ if [ ! -z "$sanitizer_flags" ]; then | |||
981 | 131 | fi | 156 | fi |
982 | 132 | 157 | ||
983 | 133 | if [ "$msvc" = 1 ]; then | 158 | if [ "$msvc" = 1 ]; then |
985 | 134 | source "$cwd"/coreconf/msvc.sh | 159 | source "$cwd/coreconf/msvc.sh" |
986 | 135 | fi | 160 | fi |
987 | 136 | 161 | ||
988 | 137 | # Setup build paths. | ||
989 | 138 | target_dir="$cwd"/out/$target | ||
990 | 139 | mkdir -p "$target_dir" | ||
991 | 140 | dist_dir="$cwd"/../dist | ||
992 | 141 | dist_dir=$(mkdir -p "$dist_dir"; cd "$dist_dir"; pwd -P) | ||
993 | 142 | gyp_params+=(-Dnss_dist_dir="$dist_dir") | ||
994 | 143 | |||
995 | 144 | # -c = clean first | 162 | # -c = clean first |
996 | 145 | if [ "$clean" = 1 -o "$clean_only" = 1 ]; then | 163 | if [ "$clean" = 1 -o "$clean_only" = 1 ]; then |
997 | 146 | nspr_clean | 164 | nspr_clean |
999 | 147 | rm -rf "$cwd"/out | 165 | rm -rf "$cwd/out" |
1000 | 148 | rm -rf "$dist_dir" | 166 | rm -rf "$dist_dir" |
1001 | 149 | # -cc = only clean, don't build | 167 | # -cc = only clean, don't build |
1002 | 150 | if [ "$clean_only" = 1 ]; then | 168 | if [ "$clean_only" = 1 ]; then |
1003 | @@ -153,6 +171,12 @@ if [ "$clean" = 1 -o "$clean_only" = 1 ]; then | |||
1004 | 153 | fi | 171 | fi |
1005 | 154 | fi | 172 | fi |
1006 | 155 | 173 | ||
1007 | 174 | # Setup build paths. | ||
1008 | 175 | target_dir="$cwd/out/$target" | ||
1009 | 176 | mkdir -p "$target_dir" | ||
1010 | 177 | dist_dir=$(mkdir -p "$dist_dir"; cd "$dist_dir"; pwd -P) | ||
1011 | 178 | gyp_params+=(-Dnss_dist_dir="$dist_dir") | ||
1012 | 179 | |||
1013 | 156 | # This saves a canonical representation of arguments that we are passing to gyp | 180 | # This saves a canonical representation of arguments that we are passing to gyp |
1014 | 157 | # or the NSPR build so that we can work out if a rebuild is needed. | 181 | # or the NSPR build so that we can work out if a rebuild is needed. |
1015 | 158 | # Caveat: This can fail for arguments that are position-dependent. | 182 | # Caveat: This can fail for arguments that are position-dependent. |
1016 | @@ -162,66 +186,72 @@ check_config() | |||
1017 | 162 | local newconf="$1".new oldconf="$1" | 186 | local newconf="$1".new oldconf="$1" |
1018 | 163 | shift | 187 | shift |
1019 | 164 | mkdir -p $(dirname "$newconf") | 188 | mkdir -p $(dirname "$newconf") |
1025 | 165 | echo CC="$CC" >"$newconf" | 189 | echo CC="$(Q "$CC")" >"$newconf" |
1026 | 166 | echo CCC="$CCC" >>"$newconf" | 190 | echo CCC="$(Q "$CCC")" >>"$newconf" |
1027 | 167 | echo CXX="$CXX" >>"$newconf" | 191 | echo CXX="$(Q "$CXX")" >>"$newconf" |
1028 | 168 | echo target_arch="$target_arch" >>"$newconf" | 192 | echo target_arch="$(Q "$target_arch")" >>"$newconf" |
1029 | 169 | for i in "$@"; do echo $i; done | sort >>"$newconf" | 193 | for i in "$@"; do echo "$i"; done | sort >>"$newconf" |
1030 | 170 | 194 | ||
1031 | 171 | # Note: The following diff fails if $oldconf isn't there as well, which | 195 | # Note: The following diff fails if $oldconf isn't there as well, which |
1032 | 172 | # happens if we don't have a previous successful build. | 196 | # happens if we don't have a previous successful build. |
1033 | 173 | ! diff -q "$newconf" "$oldconf" >/dev/null 2>&1 | 197 | ! diff -q "$newconf" "$oldconf" >/dev/null 2>&1 |
1034 | 174 | } | 198 | } |
1035 | 175 | 199 | ||
1038 | 176 | gyp_config="$cwd"/out/gyp_config | 200 | gyp_config="$cwd/out/gyp_config" |
1039 | 177 | nspr_config="$cwd"/out/$target/nspr_config | 201 | nspr_config="$cwd/out/$target/nspr_config" |
1040 | 178 | 202 | ||
1041 | 179 | # Now check what needs to be rebuilt. | 203 | # Now check what needs to be rebuilt. |
1042 | 180 | # If we don't have a build directory make sure that we rebuild. | 204 | # If we don't have a build directory make sure that we rebuild. |
1043 | 181 | if [ ! -d "$target_dir" ]; then | 205 | if [ ! -d "$target_dir" ]; then |
1044 | 182 | rebuild_nspr=1 | 206 | rebuild_nspr=1 |
1045 | 183 | rebuild_gyp=1 | 207 | rebuild_gyp=1 |
1047 | 184 | elif [ ! -d "$dist_dir"/$target ]; then | 208 | elif [ ! -d "$dist_dir/$target" ]; then |
1048 | 185 | rebuild_nspr=1 | 209 | rebuild_nspr=1 |
1049 | 186 | fi | 210 | fi |
1050 | 187 | 211 | ||
1051 | 188 | if check_config "$nspr_config" \ | 212 | if check_config "$nspr_config" \ |
1055 | 189 | nspr_cflags="$nspr_cflags" \ | 213 | nspr_cflags="$(Q "$nspr_cflags")" \ |
1056 | 190 | nspr_cxxflags="$nspr_cxxflags" \ | 214 | nspr_cxxflags="$(Q "$nspr_cxxflags")" \ |
1057 | 191 | nspr_ldflags="$nspr_ldflags"; then | 215 | nspr_ldflags="$(Q "$nspr_ldflags")"; then |
1058 | 192 | rebuild_nspr=1 | 216 | rebuild_nspr=1 |
1059 | 193 | fi | 217 | fi |
1060 | 194 | 218 | ||
1062 | 195 | if check_config "$gyp_config" "${gyp_params[@]}"; then | 219 | if check_config "$gyp_config" "$(Q "${gyp_params[@]}")"; then |
1063 | 196 | rebuild_gyp=1 | 220 | rebuild_gyp=1 |
1064 | 197 | fi | 221 | fi |
1065 | 198 | 222 | ||
1066 | 199 | # Save the chosen target. | 223 | # Save the chosen target. |
1069 | 200 | mkdir -p "$dist_dir" | 224 | echo "$target" > "$dist_dir/latest" |
1070 | 201 | echo $target > "$dist_dir"/latest | 225 | for i in "${all_args[@]}"; do echo "$i"; done > "$argsfile" |
1071 | 202 | 226 | ||
1072 | 203 | # Build. | 227 | # Build. |
1073 | 204 | # NSPR. | 228 | # NSPR. |
1074 | 205 | if [[ "$rebuild_nspr" = 1 && "$no_local_nspr" = 0 ]]; then | 229 | if [[ "$rebuild_nspr" = 1 && "$no_local_nspr" = 0 ]]; then |
1075 | 230 | nspr_clean | ||
1076 | 206 | nspr_build | 231 | nspr_build |
1078 | 207 | mv -f "$nspr_config".new "$nspr_config" | 232 | mv -f "$nspr_config.new" "$nspr_config" |
1079 | 233 | fi | ||
1080 | 234 | |||
1081 | 235 | if [ "$exit_after_nspr" = 1 ]; then | ||
1082 | 236 | exit 0 | ||
1083 | 208 | fi | 237 | fi |
1084 | 238 | |||
1085 | 209 | # gyp. | 239 | # gyp. |
1086 | 210 | if [ "$rebuild_gyp" = 1 ]; then | 240 | if [ "$rebuild_gyp" = 1 ]; then |
1090 | 211 | if ! hash ${GYP} 2> /dev/null; then | 241 | if ! hash "$GYP" 2> /dev/null; then |
1091 | 212 | echo "Please install gyp" 1>&2 | 242 | echo "Building NSS requires an installation of gyp: https://gyp.gsrc.io/" 1>&2 |
1092 | 213 | exit 1 | 243 | exit 3 |
1093 | 214 | fi | 244 | fi |
1094 | 215 | # These extra arguments aren't used in determining whether to rebuild. | 245 | # These extra arguments aren't used in determining whether to rebuild. |
1097 | 216 | obj_dir="$dist_dir"/$target | 246 | obj_dir="$dist_dir/$target" |
1098 | 217 | gyp_params+=(-Dnss_dist_obj_dir=$obj_dir) | 247 | gyp_params+=(-Dnss_dist_obj_dir="$obj_dir") |
1099 | 218 | if [ "$no_local_nspr" = 0 ]; then | 248 | if [ "$no_local_nspr" = 0 ]; then |
1100 | 219 | set_nspr_path "$obj_dir/include/nspr:$obj_dir/lib" | 249 | set_nspr_path "$obj_dir/include/nspr:$obj_dir/lib" |
1101 | 220 | fi | 250 | fi |
1102 | 221 | 251 | ||
1104 | 222 | run_verbose run_scanbuild ${GYP} -f ninja "${gyp_params[@]}" "$cwd"/nss.gyp | 252 | run_verbose run_scanbuild ${GYP} -f ninja "${gyp_params[@]}" "$cwd/nss.gyp" |
1105 | 223 | 253 | ||
1107 | 224 | mv -f "$gyp_config".new "$gyp_config" | 254 | mv -f "$gyp_config.new" "$gyp_config" |
1108 | 225 | fi | 255 | fi |
1109 | 226 | 256 | ||
1110 | 227 | # ninja. | 257 | # ninja. |
1111 | @@ -230,7 +260,7 @@ if hash ninja-build 2>/dev/null; then | |||
1112 | 230 | elif hash ninja 2>/dev/null; then | 260 | elif hash ninja 2>/dev/null; then |
1113 | 231 | ninja=ninja | 261 | ninja=ninja |
1114 | 232 | else | 262 | else |
1117 | 233 | echo "Please install ninja" 1>&2 | 263 | echo "Building NSS requires an installation of ninja: https://ninja-build.org/" 1>&2 |
1118 | 234 | exit 1 | 264 | exit 3 |
1119 | 235 | fi | 265 | fi |
1121 | 236 | run_scanbuild $ninja -C "$target_dir" "${ninja_params[@]}" | 266 | run_scanbuild "$ninja" -C "$target_dir" "${ninja_params[@]}" |
1122 | diff --git a/nss/cmd/addbuiltin/addbuiltin.c b/nss/cmd/addbuiltin/addbuiltin.c | |||
1123 | index 8316720..5655888 100644 | |||
1124 | --- a/nss/cmd/addbuiltin/addbuiltin.c | |||
1125 | +++ b/nss/cmd/addbuiltin/addbuiltin.c | |||
1126 | @@ -230,6 +230,8 @@ ConvertCertificate(SECItem *sdder, char *nickname, CERTCertTrust *trust, | |||
1127 | 230 | hasPositiveTrust(trust->objectSigningFlags)) { | 230 | hasPositiveTrust(trust->objectSigningFlags)) { |
1128 | 231 | printf("CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE\n"); | 231 | printf("CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE\n"); |
1129 | 232 | } | 232 | } |
1130 | 233 | printf("CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE\n"); | ||
1131 | 234 | printf("CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE\n"); | ||
1132 | 233 | } | 235 | } |
1133 | 234 | 236 | ||
1134 | 235 | if ((trust->sslFlags | trust->emailFlags | trust->objectSigningFlags) == | 237 | if ((trust->sslFlags | trust->emailFlags | trust->objectSigningFlags) == |
1135 | @@ -306,19 +308,21 @@ printheader() | |||
1136 | 306 | "#\n" | 308 | "#\n" |
1137 | 307 | "# Certificates\n" | 309 | "# Certificates\n" |
1138 | 308 | "#\n" | 310 | "#\n" |
1152 | 309 | "# -- Attribute -- -- type -- -- value --\n" | 311 | "# -- Attribute -- -- type -- -- value --\n" |
1153 | 310 | "# CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE\n" | 312 | "# CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE\n" |
1154 | 311 | "# CKA_TOKEN CK_BBOOL CK_TRUE\n" | 313 | "# CKA_TOKEN CK_BBOOL CK_TRUE\n" |
1155 | 312 | "# CKA_PRIVATE CK_BBOOL CK_FALSE\n" | 314 | "# CKA_PRIVATE CK_BBOOL CK_FALSE\n" |
1156 | 313 | "# CKA_MODIFIABLE CK_BBOOL CK_FALSE\n" | 315 | "# CKA_MODIFIABLE CK_BBOOL CK_FALSE\n" |
1157 | 314 | "# CKA_LABEL UTF8 (varies)\n" | 316 | "# CKA_LABEL UTF8 (varies)\n" |
1158 | 315 | "# CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509\n" | 317 | "# CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509\n" |
1159 | 316 | "# CKA_SUBJECT DER+base64 (varies)\n" | 318 | "# CKA_SUBJECT DER+base64 (varies)\n" |
1160 | 317 | "# CKA_ID byte array (varies)\n" | 319 | "# CKA_ID byte array (varies)\n" |
1161 | 318 | "# CKA_ISSUER DER+base64 (varies)\n" | 320 | "# CKA_ISSUER DER+base64 (varies)\n" |
1162 | 319 | "# CKA_SERIAL_NUMBER DER+base64 (varies)\n" | 321 | "# CKA_SERIAL_NUMBER DER+base64 (varies)\n" |
1163 | 320 | "# CKA_VALUE DER+base64 (varies)\n" | 322 | "# CKA_VALUE DER+base64 (varies)\n" |
1164 | 321 | "# CKA_NSS_EMAIL ASCII7 (unused here)\n" | 323 | "# CKA_NSS_EMAIL ASCII7 (unused here)\n" |
1165 | 324 | "# CKA_NSS_SERVER_DISTRUST_AFTER DER+base64 (varies)\n" | ||
1166 | 325 | "# CKA_NSS_EMAIL_DISTRUST_AFTER DER+base64 (varies)\n" | ||
1167 | 322 | "#\n" | 326 | "#\n" |
1168 | 323 | "# Trust\n" | 327 | "# Trust\n" |
1169 | 324 | "#\n" | 328 | "#\n" |
1170 | @@ -392,6 +396,12 @@ Usage(char *progName) | |||
1171 | 392 | fprintf(stderr, "%-15s a CRL entry number, as shown by \"crlutil -S\"\n", "-e"); | 396 | fprintf(stderr, "%-15s a CRL entry number, as shown by \"crlutil -S\"\n", "-e"); |
1172 | 393 | fprintf(stderr, "%-15s input file to read (default stdin)\n", "-i file"); | 397 | fprintf(stderr, "%-15s input file to read (default stdin)\n", "-i file"); |
1173 | 394 | fprintf(stderr, "%-15s (pipe through atob if the cert is b64-encoded)\n", ""); | 398 | fprintf(stderr, "%-15s (pipe through atob if the cert is b64-encoded)\n", ""); |
1174 | 399 | fprintf(stderr, "%-15s convert a timestamp to DER, and output.\n", "-d timestamp"); | ||
1175 | 400 | fprintf(stderr, "%-15s useful to fill server and email distrust fields\n", ""); | ||
1176 | 401 | fprintf(stderr, "%-15s Example: %s -d 1561939200\n", "", progName); | ||
1177 | 402 | fprintf(stderr, "%-15s NOTE: The informed timestamp are interpreted as seconds\n", ""); | ||
1178 | 403 | fprintf(stderr, "%-15s since unix epoch.\n", ""); | ||
1179 | 404 | fprintf(stderr, "%-15s TIP: date -d \"2019-07-01 00:00:00 UTC\" +%%s\n", ""); | ||
1180 | 395 | exit(-1); | 405 | exit(-1); |
1181 | 396 | } | 406 | } |
1182 | 397 | 407 | ||
1183 | @@ -403,20 +413,21 @@ enum { | |||
1184 | 403 | opt_ExcludeCert, | 413 | opt_ExcludeCert, |
1185 | 404 | opt_ExcludeHash, | 414 | opt_ExcludeHash, |
1186 | 405 | opt_DistrustCRL, | 415 | opt_DistrustCRL, |
1188 | 406 | opt_CRLEnry | 416 | opt_CRLEntry, |
1189 | 417 | opt_ConvertDate | ||
1190 | 407 | }; | 418 | }; |
1191 | 408 | 419 | ||
1203 | 409 | static secuCommandFlag addbuiltin_options[] = | 420 | static secuCommandFlag addbuiltin_options[] = { |
1204 | 410 | { | 421 | { /* opt_Input */ 'i', PR_TRUE, 0, PR_FALSE }, |
1205 | 411 | { /* opt_Input */ 'i', PR_TRUE, 0, PR_FALSE }, | 422 | { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE }, |
1206 | 412 | { /* opt_Nickname */ 'n', PR_TRUE, 0, PR_FALSE }, | 423 | { /* opt_Trust */ 't', PR_TRUE, 0, PR_FALSE }, |
1207 | 413 | { /* opt_Trust */ 't', PR_TRUE, 0, PR_FALSE }, | 424 | { /* opt_Distrust */ 'D', PR_FALSE, 0, PR_FALSE }, |
1208 | 414 | { /* opt_Distrust */ 'D', PR_FALSE, 0, PR_FALSE }, | 425 | { /* opt_ExcludeCert */ 'c', PR_FALSE, 0, PR_FALSE }, |
1209 | 415 | { /* opt_ExcludeCert */ 'c', PR_FALSE, 0, PR_FALSE }, | 426 | { /* opt_ExcludeHash */ 'h', PR_FALSE, 0, PR_FALSE }, |
1210 | 416 | { /* opt_ExcludeHash */ 'h', PR_FALSE, 0, PR_FALSE }, | 427 | { /* opt_DistrustCRL */ 'C', PR_FALSE, 0, PR_FALSE }, |
1211 | 417 | { /* opt_DistrustCRL */ 'C', PR_FALSE, 0, PR_FALSE }, | 428 | { /* opt_CRLEntry */ 'e', PR_TRUE, 0, PR_FALSE }, |
1212 | 418 | { /* opt_CRLEnry */ 'e', PR_TRUE, 0, PR_FALSE }, | 429 | { /* opt_ConvertDate */ 'd', PR_TRUE, 0, PR_FALSE }, |
1213 | 419 | }; | 430 | }; |
1214 | 420 | 431 | ||
1215 | 421 | int | 432 | int |
1216 | 422 | main(int argc, char **argv) | 433 | main(int argc, char **argv) |
1217 | @@ -444,6 +455,30 @@ main(int argc, char **argv) | |||
1218 | 444 | if (rv != SECSuccess) | 455 | if (rv != SECSuccess) |
1219 | 445 | Usage(progName); | 456 | Usage(progName); |
1220 | 446 | 457 | ||
1221 | 458 | if (addbuiltin.options[opt_ConvertDate].activated) { | ||
1222 | 459 | char *endPtr; | ||
1223 | 460 | PRTime distrustTimestamp = strtol(addbuiltin.options[opt_ConvertDate].arg, &endPtr, 0) * PR_USEC_PER_SEC; | ||
1224 | 461 | if (*endPtr != '\0' && distrustTimestamp > 0) { | ||
1225 | 462 | Usage(progName); | ||
1226 | 463 | exit(1); | ||
1227 | 464 | } | ||
1228 | 465 | SECItem encTime; | ||
1229 | 466 | DER_EncodeTimeChoice(NULL, &encTime, distrustTimestamp); | ||
1230 | 467 | SECU_PrintTimeChoice(stdout, &encTime, "The timestamp represents this date", 0); | ||
1231 | 468 | printf("Locate the entry of the desired certificate in certdata.txt\n" | ||
1232 | 469 | "Erase the CKA_NSS_[SERVER|EMAIL]_DISTRUST_AFTER CK_BBOOL CK_FALSE\n" | ||
1233 | 470 | "And override with the following respective entry:\n\n"); | ||
1234 | 471 | SECU_PrintTimeChoice(stdout, &encTime, "# For Server Distrust After", 0); | ||
1235 | 472 | printf("CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL\n"); | ||
1236 | 473 | dumpbytes(encTime.data, encTime.len); | ||
1237 | 474 | printf("END\n"); | ||
1238 | 475 | SECU_PrintTimeChoice(stdout, &encTime, "# For Email Distrust After", 0); | ||
1239 | 476 | printf("CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL\n"); | ||
1240 | 477 | dumpbytes(encTime.data, encTime.len); | ||
1241 | 478 | printf("END\n"); | ||
1242 | 479 | exit(0); | ||
1243 | 480 | } | ||
1244 | 481 | |||
1245 | 447 | if (addbuiltin.options[opt_Trust].activated) | 482 | if (addbuiltin.options[opt_Trust].activated) |
1246 | 448 | ++mutuallyExclusiveOpts; | 483 | ++mutuallyExclusiveOpts; |
1247 | 449 | if (addbuiltin.options[opt_Distrust].activated) | 484 | if (addbuiltin.options[opt_Distrust].activated) |
1248 | @@ -458,12 +493,12 @@ main(int argc, char **argv) | |||
1249 | 458 | } | 493 | } |
1250 | 459 | 494 | ||
1251 | 460 | if (addbuiltin.options[opt_DistrustCRL].activated) { | 495 | if (addbuiltin.options[opt_DistrustCRL].activated) { |
1253 | 461 | if (!addbuiltin.options[opt_CRLEnry].activated) { | 496 | if (!addbuiltin.options[opt_CRLEntry].activated) { |
1254 | 462 | fprintf(stderr, "%s: you must specify the CRL entry number.\n", | 497 | fprintf(stderr, "%s: you must specify the CRL entry number.\n", |
1255 | 463 | progName); | 498 | progName); |
1256 | 464 | Usage(progName); | 499 | Usage(progName); |
1257 | 465 | } else { | 500 | } else { |
1259 | 466 | crlentry = atoi(addbuiltin.options[opt_CRLEnry].arg); | 501 | crlentry = atoi(addbuiltin.options[opt_CRLEntry].arg); |
1260 | 467 | if (crlentry < 1) { | 502 | if (crlentry < 1) { |
1261 | 468 | fprintf(stderr, "%s: The CRL entry number must be > 0.\n", | 503 | fprintf(stderr, "%s: The CRL entry number must be > 0.\n", |
1262 | 469 | progName); | 504 | progName); |
1263 | diff --git a/nss/cmd/httpserv/httpserv.c b/nss/cmd/httpserv/httpserv.c | |||
1264 | index 71e2ab8..c7277f3 100644 | |||
1265 | --- a/nss/cmd/httpserv/httpserv.c | |||
1266 | +++ b/nss/cmd/httpserv/httpserv.c | |||
1267 | @@ -463,7 +463,7 @@ handle_connection( | |||
1268 | 463 | char *getData = NULL; /* inplace conversion */ | 463 | char *getData = NULL; /* inplace conversion */ |
1269 | 464 | SECItem postData; | 464 | SECItem postData; |
1270 | 465 | PRBool isOcspRequest = PR_FALSE; | 465 | PRBool isOcspRequest = PR_FALSE; |
1272 | 466 | PRBool isPost; | 466 | PRBool isPost = PR_FALSE; |
1273 | 467 | 467 | ||
1274 | 468 | postData.data = NULL; | 468 | postData.data = NULL; |
1275 | 469 | postData.len = 0; | 469 | postData.len = 0; |
1276 | diff --git a/nss/cmd/lib/Makefile b/nss/cmd/lib/Makefile | |||
1277 | index 0fb6c90..6b53451 100644 | |||
1278 | --- a/nss/cmd/lib/Makefile | |||
1279 | +++ b/nss/cmd/lib/Makefile | |||
1280 | @@ -27,6 +27,7 @@ include $(CORE_DEPTH)/coreconf/config.mk | |||
1281 | 27 | ####################################################################### | 27 | ####################################################################### |
1282 | 28 | 28 | ||
1283 | 29 | include config.mk | 29 | include config.mk |
1284 | 30 | include ../platlibs.mk | ||
1285 | 30 | 31 | ||
1286 | 31 | ####################################################################### | 32 | ####################################################################### |
1287 | 32 | # (5) Execute "global" rules. (OPTIONAL) # | 33 | # (5) Execute "global" rules. (OPTIONAL) # |
1288 | diff --git a/nss/cmd/lib/derprint.c b/nss/cmd/lib/derprint.c | |||
1289 | index 08ef66d..b86179e 100644 | |||
1290 | --- a/nss/cmd/lib/derprint.c | |||
1291 | +++ b/nss/cmd/lib/derprint.c | |||
1292 | @@ -4,6 +4,8 @@ | |||
1293 | 4 | #include "secutil.h" | 4 | #include "secutil.h" |
1294 | 5 | #include "secoid.h" | 5 | #include "secoid.h" |
1295 | 6 | 6 | ||
1296 | 7 | #include <stdint.h> | ||
1297 | 8 | |||
1298 | 7 | #ifdef __sun | 9 | #ifdef __sun |
1299 | 8 | extern int fprintf(FILE *strm, const char *format, ... /* args */); | 10 | extern int fprintf(FILE *strm, const char *format, ... /* args */); |
1300 | 9 | extern int fflush(FILE *stream); | 11 | extern int fflush(FILE *stream); |
1301 | @@ -509,7 +511,7 @@ prettyPrintItem(FILE *out, const unsigned char *data, const unsigned char *end, | |||
1302 | 509 | /* | 511 | /* |
1303 | 510 | * Just quit now if slen more bytes puts us off the end. | 512 | * Just quit now if slen more bytes puts us off the end. |
1304 | 511 | */ | 513 | */ |
1306 | 512 | if ((data + slen) > end) { | 514 | if (data > end || slen > (end - data)) { |
1307 | 513 | PORT_SetError(SEC_ERROR_BAD_DER); | 515 | PORT_SetError(SEC_ERROR_BAD_DER); |
1308 | 514 | return -1; | 516 | return -1; |
1309 | 515 | } | 517 | } |
1310 | diff --git a/nss/cmd/lib/lib.gyp b/nss/cmd/lib/lib.gyp | |||
1311 | index 6b7da58..c5835a8 100644 | |||
1312 | --- a/nss/cmd/lib/lib.gyp | |||
1313 | +++ b/nss/cmd/lib/lib.gyp | |||
1314 | @@ -27,7 +27,8 @@ | |||
1315 | 27 | ], | 27 | ], |
1316 | 28 | 'target_defaults': { | 28 | 'target_defaults': { |
1317 | 29 | 'defines': [ | 29 | 'defines': [ |
1319 | 30 | 'NSPR20' | 30 | 'NSPR20', |
1320 | 31 | 'NSS_USE_STATIC_LIBS' | ||
1321 | 31 | ] | 32 | ] |
1322 | 32 | }, | 33 | }, |
1323 | 33 | 'variables': { | 34 | 'variables': { |
1324 | diff --git a/nss/cmd/lib/manifest.mn b/nss/cmd/lib/manifest.mn | |||
1325 | index 87440c0..b3c36b3 100644 | |||
1326 | --- a/nss/cmd/lib/manifest.mn | |||
1327 | +++ b/nss/cmd/lib/manifest.mn | |||
1328 | @@ -37,3 +37,5 @@ CSRCS = basicutil.c \ | |||
1329 | 37 | endif | 37 | endif |
1330 | 38 | 38 | ||
1331 | 39 | NO_MD_RELEASE = 1 | 39 | NO_MD_RELEASE = 1 |
1332 | 40 | |||
1333 | 41 | USE_STATIC_LIBS = 1 | ||
1334 | diff --git a/nss/cmd/lib/pk11table.c b/nss/cmd/lib/pk11table.c | |||
1335 | index 15c0a8d..ec5d889 100644 | |||
1336 | --- a/nss/cmd/lib/pk11table.c | |||
1337 | +++ b/nss/cmd/lib/pk11table.c | |||
1338 | @@ -333,6 +333,8 @@ const Constant _consts[] = { | |||
1339 | 333 | mkEntry(CKM_SHA512, Mechanism), | 333 | mkEntry(CKM_SHA512, Mechanism), |
1340 | 334 | mkEntry(CKM_SHA512_HMAC_GENERAL, Mechanism), | 334 | mkEntry(CKM_SHA512_HMAC_GENERAL, Mechanism), |
1341 | 335 | mkEntry(CKM_SHA512_HMAC, Mechanism), | 335 | mkEntry(CKM_SHA512_HMAC, Mechanism), |
1342 | 336 | mkEntry(CKM_AES_CMAC, Mechanism), | ||
1343 | 337 | mkEntry(CKM_AES_CMAC_GENERAL, Mechanism), | ||
1344 | 336 | mkEntry(CKM_CAST_KEY_GEN, Mechanism), | 338 | mkEntry(CKM_CAST_KEY_GEN, Mechanism), |
1345 | 337 | mkEntry(CKM_CAST_ECB, Mechanism), | 339 | mkEntry(CKM_CAST_ECB, Mechanism), |
1346 | 338 | mkEntry(CKM_CAST_CBC, Mechanism), | 340 | mkEntry(CKM_CAST_CBC, Mechanism), |
1347 | diff --git a/nss/cmd/lib/secpwd.c b/nss/cmd/lib/secpwd.c | |||
1348 | index 7e99b27..e8ca792 100644 | |||
1349 | --- a/nss/cmd/lib/secpwd.c | |||
1350 | +++ b/nss/cmd/lib/secpwd.c | |||
1351 | @@ -66,7 +66,7 @@ SEC_GetPassword(FILE *input, FILE *output, char *prompt, | |||
1352 | 66 | int infd = fileno(input); | 66 | int infd = fileno(input); |
1353 | 67 | int isTTY = isatty(infd); | 67 | int isTTY = isatty(infd); |
1354 | 68 | #endif | 68 | #endif |
1356 | 69 | char phrase[200] = { '\0' }; /* ensure EOF doesn't return junk */ | 69 | char phrase[500] = { '\0' }; /* ensure EOF doesn't return junk */ |
1357 | 70 | 70 | ||
1358 | 71 | for (;;) { | 71 | for (;;) { |
1359 | 72 | /* Prompt for password */ | 72 | /* Prompt for password */ |
1360 | diff --git a/nss/cmd/lib/secutil.c b/nss/cmd/lib/secutil.c | |||
1361 | index 97c7f75..703845e 100644 | |||
1362 | --- a/nss/cmd/lib/secutil.c | |||
1363 | +++ b/nss/cmd/lib/secutil.c | |||
1364 | @@ -22,6 +22,7 @@ | |||
1365 | 22 | #include <stdarg.h> | 22 | #include <stdarg.h> |
1366 | 23 | #include <sys/stat.h> | 23 | #include <sys/stat.h> |
1367 | 24 | #include <errno.h> | 24 | #include <errno.h> |
1368 | 25 | #include <limits.h> | ||
1369 | 25 | 26 | ||
1370 | 26 | #ifdef XP_UNIX | 27 | #ifdef XP_UNIX |
1371 | 27 | #include <unistd.h> | 28 | #include <unistd.h> |
1372 | @@ -1107,36 +1108,33 @@ typedef struct secuPBEParamsStr { | |||
1373 | 1107 | SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate) | 1108 | SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate) |
1374 | 1108 | 1109 | ||
1375 | 1109 | /* SECOID_PKCS5_PBKDF2 */ | 1110 | /* SECOID_PKCS5_PBKDF2 */ |
1386 | 1110 | const SEC_ASN1Template secuKDF2Params[] = | 1111 | const SEC_ASN1Template secuKDF2Params[] = { |
1387 | 1111 | { | 1112 | { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(secuPBEParams) }, |
1388 | 1112 | { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(secuPBEParams) }, | 1113 | { SEC_ASN1_OCTET_STRING, offsetof(secuPBEParams, salt) }, |
1389 | 1113 | { SEC_ASN1_OCTET_STRING, offsetof(secuPBEParams, salt) }, | 1114 | { SEC_ASN1_INTEGER, offsetof(secuPBEParams, iterationCount) }, |
1390 | 1114 | { SEC_ASN1_INTEGER, offsetof(secuPBEParams, iterationCount) }, | 1115 | { SEC_ASN1_INTEGER, offsetof(secuPBEParams, keyLength) }, |
1391 | 1115 | { SEC_ASN1_INTEGER, offsetof(secuPBEParams, keyLength) }, | 1116 | { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(secuPBEParams, kdfAlg), |
1392 | 1116 | { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(secuPBEParams, kdfAlg), | 1117 | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) }, |
1393 | 1117 | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) }, | 1118 | { 0 } |
1394 | 1118 | { 0 } | 1119 | }; |
1385 | 1119 | }; | ||
1395 | 1120 | 1120 | ||
1396 | 1121 | /* PKCS5v1 & PKCS12 */ | 1121 | /* PKCS5v1 & PKCS12 */ |
1404 | 1122 | const SEC_ASN1Template secuPBEParamsTemp[] = | 1122 | const SEC_ASN1Template secuPBEParamsTemp[] = { |
1405 | 1123 | { | 1123 | { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(secuPBEParams) }, |
1406 | 1124 | { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(secuPBEParams) }, | 1124 | { SEC_ASN1_OCTET_STRING, offsetof(secuPBEParams, salt) }, |
1407 | 1125 | { SEC_ASN1_OCTET_STRING, offsetof(secuPBEParams, salt) }, | 1125 | { SEC_ASN1_INTEGER, offsetof(secuPBEParams, iterationCount) }, |
1408 | 1126 | { SEC_ASN1_INTEGER, offsetof(secuPBEParams, iterationCount) }, | 1126 | { 0 } |
1409 | 1127 | { 0 } | 1127 | }; |
1403 | 1128 | }; | ||
1410 | 1129 | 1128 | ||
1411 | 1130 | /* SEC_OID_PKCS5_PBES2, SEC_OID_PKCS5_PBMAC1 */ | 1129 | /* SEC_OID_PKCS5_PBES2, SEC_OID_PKCS5_PBMAC1 */ |
1421 | 1131 | const SEC_ASN1Template secuPBEV2Params[] = | 1130 | const SEC_ASN1Template secuPBEV2Params[] = { |
1422 | 1132 | { | 1131 | { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(secuPBEParams) }, |
1423 | 1133 | { SEC_ASN1_SEQUENCE, 0, NULL, sizeof(secuPBEParams) }, | 1132 | { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(secuPBEParams, kdfAlg), |
1424 | 1134 | { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(secuPBEParams, kdfAlg), | 1133 | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) }, |
1425 | 1135 | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) }, | 1134 | { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(secuPBEParams, cipherAlg), |
1426 | 1136 | { SEC_ASN1_INLINE | SEC_ASN1_XTRN, offsetof(secuPBEParams, cipherAlg), | 1135 | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) }, |
1427 | 1137 | SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate) }, | 1136 | { 0 } |
1428 | 1138 | { 0 } | 1137 | }; |
1420 | 1139 | }; | ||
1429 | 1140 | 1138 | ||
1430 | 1141 | void | 1139 | void |
1431 | 1142 | secu_PrintRSAPSSParams(FILE *out, SECItem *value, char *m, int level) | 1140 | secu_PrintRSAPSSParams(FILE *out, SECItem *value, char *m, int level) |
1432 | @@ -2299,8 +2297,9 @@ SECU_PrintCertAttributes(FILE *out, CERTAttribute **attrs, char *m, int level) | |||
1433 | 2299 | return rv; | 2297 | return rv; |
1434 | 2300 | } | 2298 | } |
1435 | 2301 | 2299 | ||
1438 | 2302 | int /* sometimes a PRErrorCode, other times a SECStatus. Sigh. */ | 2300 | /* sometimes a PRErrorCode, other times a SECStatus. Sigh. */ |
1439 | 2303 | SECU_PrintCertificateRequest(FILE *out, SECItem *der, char *m, int level) | 2301 | int |
1440 | 2302 | SECU_PrintCertificateRequest(FILE *out, SECItem *der, char *m, int level) | ||
1441 | 2304 | { | 2303 | { |
1442 | 2305 | PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); | 2304 | PLArenaPool *arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE); |
1443 | 2306 | CERTCertificateRequest *cr; | 2305 | CERTCertificateRequest *cr; |
1444 | @@ -3250,6 +3249,26 @@ SEC_PrintCertificateAndTrust(CERTCertificate *cert, | |||
1445 | 3250 | "Certificate Trust Flags", 1); | 3249 | "Certificate Trust Flags", 1); |
1446 | 3251 | } | 3250 | } |
1447 | 3252 | 3251 | ||
1448 | 3252 | /* The distrust fields are hard-coded in nssckbi and read-only. | ||
1449 | 3253 | * If verifying some cert, with vfychain, for instance, the certificate may | ||
1450 | 3254 | * not have a defined slot if not imported. */ | ||
1451 | 3255 | if (cert->slot != NULL && cert->distrust != NULL) { | ||
1452 | 3256 | const unsigned int kDistrustFieldSize = 13; | ||
1453 | 3257 | fprintf(stdout, "\n"); | ||
1454 | 3258 | SECU_Indent(stdout, 1); | ||
1455 | 3259 | fprintf(stdout, "%s:\n", "Certificate Distrust Dates"); | ||
1456 | 3260 | if (cert->distrust->serverDistrustAfter.len == kDistrustFieldSize) { | ||
1457 | 3261 | SECU_PrintTimeChoice(stdout, | ||
1458 | 3262 | &cert->distrust->serverDistrustAfter, | ||
1459 | 3263 | "Server Distrust After", 2); | ||
1460 | 3264 | } | ||
1461 | 3265 | if (cert->distrust->emailDistrustAfter.len == kDistrustFieldSize) { | ||
1462 | 3266 | SECU_PrintTimeChoice(stdout, | ||
1463 | 3267 | &cert->distrust->emailDistrustAfter, | ||
1464 | 3268 | "E-mail Distrust After", 2); | ||
1465 | 3269 | } | ||
1466 | 3270 | } | ||
1467 | 3271 | |||
1468 | 3253 | printf("\n"); | 3272 | printf("\n"); |
1469 | 3254 | 3273 | ||
1470 | 3255 | return (SECSuccess); | 3274 | return (SECSuccess); |
1471 | @@ -3979,3 +3998,164 @@ done: | |||
1472 | 3979 | *enabledSigSchemes = schemes; | 3998 | *enabledSigSchemes = schemes; |
1473 | 3980 | return SECSuccess; | 3999 | return SECSuccess; |
1474 | 3981 | } | 4000 | } |
1475 | 4001 | |||
1476 | 4002 | /* Parse the exporter spec in the form: LABEL[:OUTPUT-LENGTH[:CONTEXT]] */ | ||
1477 | 4003 | static SECStatus | ||
1478 | 4004 | parseExporter(const char *arg, | ||
1479 | 4005 | secuExporter *exporter) | ||
1480 | 4006 | { | ||
1481 | 4007 | SECStatus rv = SECSuccess; | ||
1482 | 4008 | |||
1483 | 4009 | char *str = PORT_Strdup(arg); | ||
1484 | 4010 | if (!str) { | ||
1485 | 4011 | rv = SECFailure; | ||
1486 | 4012 | goto done; | ||
1487 | 4013 | } | ||
1488 | 4014 | |||
1489 | 4015 | char *labelEnd = strchr(str, ':'); | ||
1490 | 4016 | if (labelEnd) { | ||
1491 | 4017 | *labelEnd = '\0'; | ||
1492 | 4018 | labelEnd++; | ||
1493 | 4019 | |||
1494 | 4020 | /* To extract CONTEXT, first skip OUTPUT-LENGTH */ | ||
1495 | 4021 | char *outputEnd = strchr(labelEnd, ':'); | ||
1496 | 4022 | if (outputEnd) { | ||
1497 | 4023 | *outputEnd = '\0'; | ||
1498 | 4024 | outputEnd++; | ||
1499 | 4025 | |||
1500 | 4026 | exporter->hasContext = PR_TRUE; | ||
1501 | 4027 | exporter->context.data = (unsigned char *)PORT_Strdup(outputEnd); | ||
1502 | 4028 | exporter->context.len = strlen(outputEnd); | ||
1503 | 4029 | if (PORT_Strncasecmp((char *)exporter->context.data, "0x", 2) == 0) { | ||
1504 | 4030 | rv = SECU_SECItemHexStringToBinary(&exporter->context); | ||
1505 | 4031 | if (rv != SECSuccess) { | ||
1506 | 4032 | goto done; | ||
1507 | 4033 | } | ||
1508 | 4034 | } | ||
1509 | 4035 | } | ||
1510 | 4036 | } | ||
1511 | 4037 | |||
1512 | 4038 | if (labelEnd && *labelEnd != '\0') { | ||
1513 | 4039 | long int outputLength = strtol(labelEnd, NULL, 10); | ||
1514 | 4040 | if (!(outputLength > 0 && outputLength <= UINT_MAX)) { | ||
1515 | 4041 | PORT_SetError(SEC_ERROR_INVALID_ARGS); | ||
1516 | 4042 | rv = SECFailure; | ||
1517 | 4043 | goto done; | ||
1518 | 4044 | } | ||
1519 | 4045 | exporter->outputLength = outputLength; | ||
1520 | 4046 | } else { | ||
1521 | 4047 | exporter->outputLength = 20; | ||
1522 | 4048 | } | ||
1523 | 4049 | |||
1524 | 4050 | char *label = PORT_Strdup(str); | ||
1525 | 4051 | exporter->label.data = (unsigned char *)label; | ||
1526 | 4052 | exporter->label.len = strlen(label); | ||
1527 | 4053 | if (PORT_Strncasecmp((char *)exporter->label.data, "0x", 2) == 0) { | ||
1528 | 4054 | rv = SECU_SECItemHexStringToBinary(&exporter->label); | ||
1529 | 4055 | if (rv != SECSuccess) { | ||
1530 | 4056 | goto done; | ||
1531 | 4057 | } | ||
1532 | 4058 | } | ||
1533 | 4059 | |||
1534 | 4060 | done: | ||
1535 | 4061 | PORT_Free(str); | ||
1536 | 4062 | |||
1537 | 4063 | return rv; | ||
1538 | 4064 | } | ||
1539 | 4065 | |||
1540 | 4066 | SECStatus | ||
1541 | 4067 | parseExporters(const char *arg, | ||
1542 | 4068 | const secuExporter **enabledExporters, | ||
1543 | 4069 | unsigned int *enabledExporterCount) | ||
1544 | 4070 | { | ||
1545 | 4071 | secuExporter *exporters; | ||
1546 | 4072 | unsigned int numValues = 0; | ||
1547 | 4073 | unsigned int count = 0; | ||
1548 | 4074 | |||
1549 | 4075 | if (countItems(arg, &numValues) != SECSuccess) { | ||
1550 | 4076 | return SECFailure; | ||
1551 | 4077 | } | ||
1552 | 4078 | exporters = PORT_ZNewArray(secuExporter, numValues); | ||
1553 | 4079 | if (!exporters) { | ||
1554 | 4080 | return SECFailure; | ||
1555 | 4081 | } | ||
1556 | 4082 | |||
1557 | 4083 | /* Get exporter definitions. */ | ||
1558 | 4084 | char *str = PORT_Strdup(arg); | ||
1559 | 4085 | if (!str) { | ||
1560 | 4086 | goto done; | ||
1561 | 4087 | } | ||
1562 | 4088 | char *p = strtok(str, ","); | ||
1563 | 4089 | while (p) { | ||
1564 | 4090 | SECStatus rv = parseExporter(p, &exporters[count++]); | ||
1565 | 4091 | if (rv != SECSuccess) { | ||
1566 | 4092 | count = 0; | ||
1567 | 4093 | goto done; | ||
1568 | 4094 | } | ||
1569 | 4095 | p = strtok(NULL, ","); | ||
1570 | 4096 | } | ||
1571 | 4097 | |||
1572 | 4098 | done: | ||
1573 | 4099 | PORT_Free(str); | ||
1574 | 4100 | if (!count) { | ||
1575 | 4101 | PORT_Free(exporters); | ||
1576 | 4102 | return SECFailure; | ||
1577 | 4103 | } | ||
1578 | 4104 | |||
1579 | 4105 | *enabledExporterCount = count; | ||
1580 | 4106 | *enabledExporters = exporters; | ||
1581 | 4107 | return SECSuccess; | ||
1582 | 4108 | } | ||
1583 | 4109 | |||
1584 | 4110 | static SECStatus | ||
1585 | 4111 | exportKeyingMaterial(PRFileDesc *fd, const secuExporter *exporter) | ||
1586 | 4112 | { | ||
1587 | 4113 | SECStatus rv = SECSuccess; | ||
1588 | 4114 | unsigned char *out = PORT_Alloc(exporter->outputLength); | ||
1589 | 4115 | |||
1590 | 4116 | if (!out) { | ||
1591 | 4117 | fprintf(stderr, "Unable to allocate buffer for keying material\n"); | ||
1592 | 4118 | return SECFailure; | ||
1593 | 4119 | } | ||
1594 | 4120 | rv = SSL_ExportKeyingMaterial(fd, | ||
1595 | 4121 | (char *)exporter->label.data, | ||
1596 | 4122 | exporter->label.len, | ||
1597 | 4123 | exporter->hasContext, | ||
1598 | 4124 | exporter->context.data, | ||
1599 | 4125 | exporter->context.len, | ||
1600 | 4126 | out, | ||
1601 | 4127 | exporter->outputLength); | ||
1602 | 4128 | if (rv != SECSuccess) { | ||
1603 | 4129 | goto done; | ||
1604 | 4130 | } | ||
1605 | 4131 | fprintf(stdout, "Exported Keying Material:\n"); | ||
1606 | 4132 | secu_PrintRawString(stdout, (SECItem *)&exporter->label, "Label", 1); | ||
1607 | 4133 | if (exporter->hasContext) { | ||
1608 | 4134 | SECU_PrintAsHex(stdout, &exporter->context, "Context", 1); | ||
1609 | 4135 | } | ||
1610 | 4136 | SECU_Indent(stdout, 1); | ||
1611 | 4137 | fprintf(stdout, "Length: %u\n", exporter->outputLength); | ||
1612 | 4138 | SECItem temp = { siBuffer, out, exporter->outputLength }; | ||
1613 | 4139 | SECU_PrintAsHex(stdout, &temp, "Keying Material", 1); | ||
1614 | 4140 | |||
1615 | 4141 | done: | ||
1616 | 4142 | PORT_Free(out); | ||
1617 | 4143 | return rv; | ||
1618 | 4144 | } | ||
1619 | 4145 | |||
1620 | 4146 | SECStatus | ||
1621 | 4147 | exportKeyingMaterials(PRFileDesc *fd, | ||
1622 | 4148 | const secuExporter *exporters, | ||
1623 | 4149 | unsigned int exporterCount) | ||
1624 | 4150 | { | ||
1625 | 4151 | unsigned int i; | ||
1626 | 4152 | |||
1627 | 4153 | for (i = 0; i < exporterCount; i++) { | ||
1628 | 4154 | SECStatus rv = exportKeyingMaterial(fd, &exporters[i]); | ||
1629 | 4155 | if (rv != SECSuccess) { | ||
1630 | 4156 | return rv; | ||
1631 | 4157 | } | ||
1632 | 4158 | } | ||
1633 | 4159 | |||
1634 | 4160 | return SECSuccess; | ||
1635 | 4161 | } | ||
1636 | diff --git a/nss/cmd/lib/secutil.h b/nss/cmd/lib/secutil.h | |||
1637 | index 90d7639..c6da961 100644 | |||
1638 | --- a/nss/cmd/lib/secutil.h | |||
1639 | +++ b/nss/cmd/lib/secutil.h | |||
1640 | @@ -409,6 +409,20 @@ SECStatus parseGroupList(const char *arg, SSLNamedGroup **enabledGroups, | |||
1641 | 409 | SECStatus parseSigSchemeList(const char *arg, | 409 | SECStatus parseSigSchemeList(const char *arg, |
1642 | 410 | const SSLSignatureScheme **enabledSigSchemes, | 410 | const SSLSignatureScheme **enabledSigSchemes, |
1643 | 411 | unsigned int *enabledSigSchemeCount); | 411 | unsigned int *enabledSigSchemeCount); |
1644 | 412 | typedef struct { | ||
1645 | 413 | SECItem label; | ||
1646 | 414 | PRBool hasContext; | ||
1647 | 415 | SECItem context; | ||
1648 | 416 | unsigned int outputLength; | ||
1649 | 417 | } secuExporter; | ||
1650 | 418 | |||
1651 | 419 | SECStatus parseExporters(const char *arg, | ||
1652 | 420 | const secuExporter **enabledExporters, | ||
1653 | 421 | unsigned int *enabledExporterCount); | ||
1654 | 422 | |||
1655 | 423 | SECStatus exportKeyingMaterials(PRFileDesc *fd, | ||
1656 | 424 | const secuExporter *exporters, | ||
1657 | 425 | unsigned int exporterCount); | ||
1658 | 412 | 426 | ||
1659 | 413 | /* | 427 | /* |
1660 | 414 | * | 428 | * |
1661 | diff --git a/nss/cmd/p7env/p7env.c b/nss/cmd/p7env/p7env.c | |||
1662 | index b35bf9a..453cbee 100644 | |||
1663 | --- a/nss/cmd/p7env/p7env.c | |||
1664 | +++ b/nss/cmd/p7env/p7env.c | |||
1665 | @@ -66,7 +66,7 @@ EncryptFile(FILE *outFile, FILE *inFile, struct recipient *recipients, | |||
1666 | 66 | SEC_PKCS7ContentInfo *cinfo; | 66 | SEC_PKCS7ContentInfo *cinfo; |
1667 | 67 | SEC_PKCS7EncoderContext *ecx; | 67 | SEC_PKCS7EncoderContext *ecx; |
1668 | 68 | struct recipient *rcpt; | 68 | struct recipient *rcpt; |
1670 | 69 | SECStatus rv; | 69 | SECStatus rv = SECFailure; |
1671 | 70 | 70 | ||
1672 | 71 | if (outFile == NULL || inFile == NULL || recipients == NULL) | 71 | if (outFile == NULL || inFile == NULL || recipients == NULL) |
1673 | 72 | return -1; | 72 | return -1; |
1674 | @@ -133,7 +133,7 @@ main(int argc, char **argv) | |||
1675 | 133 | struct recipient *recipients, *rcpt; | 133 | struct recipient *recipients, *rcpt; |
1676 | 134 | PLOptState *optstate; | 134 | PLOptState *optstate; |
1677 | 135 | PLOptStatus status; | 135 | PLOptStatus status; |
1679 | 136 | SECStatus rv; | 136 | SECStatus rv = SECFailure; |
1680 | 137 | 137 | ||
1681 | 138 | progName = strrchr(argv[0], '/'); | 138 | progName = strrchr(argv[0], '/'); |
1682 | 139 | progName = progName ? progName + 1 : argv[0]; | 139 | progName = progName ? progName + 1 : argv[0]; |
1683 | diff --git a/nss/cmd/pk11importtest/pk11importtest.c b/nss/cmd/pk11importtest/pk11importtest.c | |||
1684 | index eb8e359..e832659 100644 | |||
1685 | --- a/nss/cmd/pk11importtest/pk11importtest.c | |||
1686 | +++ b/nss/cmd/pk11importtest/pk11importtest.c | |||
1687 | @@ -176,7 +176,9 @@ cleanup: | |||
1688 | 176 | } | 176 | } |
1689 | 177 | SECITEM_FreeItem(&pubValue, PR_FALSE); | 177 | SECITEM_FreeItem(&pubValue, PR_FALSE); |
1690 | 178 | SECITEM_FreeItem(&privID, PR_FALSE); | 178 | SECITEM_FreeItem(&privID, PR_FALSE); |
1692 | 179 | PORT_FreeArena(epki->arena, PR_TRUE); | 179 | if (epki && epki->arena) { |
1693 | 180 | PORT_FreeArena(epki->arena, PR_TRUE); | ||
1694 | 181 | } | ||
1695 | 180 | SECKEY_DestroyPublicKey(pubKey); | 182 | SECKEY_DestroyPublicKey(pubKey); |
1696 | 181 | SECKEY_DestroyPrivateKey(privKey); | 183 | SECKEY_DestroyPrivateKey(privKey); |
1697 | 182 | fprintf(stderr, "%s PrivateKeyImport %s ***********************\n", | 184 | fprintf(stderr, "%s PrivateKeyImport %s ***********************\n", |
1698 | diff --git a/nss/cmd/pk11mode/pk11mode.c b/nss/cmd/pk11mode/pk11mode.c | |||
1699 | index 9989109..1655453 100644 | |||
1700 | --- a/nss/cmd/pk11mode/pk11mode.c | |||
1701 | +++ b/nss/cmd/pk11mode/pk11mode.c | |||
1702 | @@ -5229,7 +5229,7 @@ PKM_Digest(CK_FUNCTION_LIST_PTR pFunctionList, | |||
1703 | 5229 | char * | 5229 | char * |
1704 | 5230 | PKM_FilePasswd(char *pwFile) | 5230 | PKM_FilePasswd(char *pwFile) |
1705 | 5231 | { | 5231 | { |
1707 | 5232 | unsigned char phrase[200]; | 5232 | unsigned char phrase[500]; |
1708 | 5233 | PRFileDesc *fd; | 5233 | PRFileDesc *fd; |
1709 | 5234 | PRInt32 nb; | 5234 | PRInt32 nb; |
1710 | 5235 | int i; | 5235 | int i; |
1711 | diff --git a/nss/cmd/pk12util/pk12util.c b/nss/cmd/pk12util/pk12util.c | |||
1712 | index 5884713..794f17b 100644 | |||
1713 | --- a/nss/cmd/pk12util/pk12util.c | |||
1714 | +++ b/nss/cmd/pk12util/pk12util.c | |||
1715 | @@ -644,6 +644,7 @@ P12U_ExportPKCS12Object(char *nn, char *outfile, PK11SlotInfo *inSlot, | |||
1716 | 644 | } | 644 | } |
1717 | 645 | certlist = PK11_FindCertsFromNickname(nn, slotPw); | 645 | certlist = PK11_FindCertsFromNickname(nn, slotPw); |
1718 | 646 | if (!certlist) { | 646 | if (!certlist) { |
1719 | 647 | PORT_SetError(SEC_ERROR_UNKNOWN_CERT); | ||
1720 | 647 | SECU_PrintError(progName, "find user certs from nickname failed"); | 648 | SECU_PrintError(progName, "find user certs from nickname failed"); |
1721 | 648 | pk12uErrno = PK12UERR_FINDCERTBYNN; | 649 | pk12uErrno = PK12UERR_FINDCERTBYNN; |
1722 | 649 | return; | 650 | return; |
1723 | diff --git a/nss/cmd/platlibs.mk b/nss/cmd/platlibs.mk | |||
1724 | index a59d03d..6401778 100644 | |||
1725 | --- a/nss/cmd/platlibs.mk | |||
1726 | +++ b/nss/cmd/platlibs.mk | |||
1727 | @@ -144,8 +144,8 @@ endif | |||
1728 | 144 | ifeq ($(OS_ARCH), WINNT) | 144 | ifeq ($(OS_ARCH), WINNT) |
1729 | 145 | 145 | ||
1730 | 146 | EXTRA_LIBS += \ | 146 | EXTRA_LIBS += \ |
1731 | 147 | $(NSS_LIBS_1) \ | ||
1732 | 148 | $(SECTOOL_LIB) \ | 147 | $(SECTOOL_LIB) \ |
1733 | 148 | $(NSS_LIBS_1) \ | ||
1734 | 149 | $(NSS_LIBS_2) \ | 149 | $(NSS_LIBS_2) \ |
1735 | 150 | $(SOFTOKENLIB) \ | 150 | $(SOFTOKENLIB) \ |
1736 | 151 | $(CRYPTOLIB) \ | 151 | $(CRYPTOLIB) \ |
1737 | @@ -161,8 +161,8 @@ EXTRA_LIBS += \ | |||
1738 | 161 | else | 161 | else |
1739 | 162 | 162 | ||
1740 | 163 | EXTRA_LIBS += \ | 163 | EXTRA_LIBS += \ |
1741 | 164 | $(NSS_LIBS_1) \ | ||
1742 | 165 | $(SECTOOL_LIB) \ | 164 | $(SECTOOL_LIB) \ |
1743 | 165 | $(NSS_LIBS_1) \ | ||
1744 | 166 | $(NSS_LIBS_2) \ | 166 | $(NSS_LIBS_2) \ |
1745 | 167 | $(SOFTOKENLIB) \ | 167 | $(SOFTOKENLIB) \ |
1746 | 168 | $(NSS_LIBS_3) \ | 168 | $(NSS_LIBS_3) \ |
1747 | diff --git a/nss/cmd/selfserv/selfserv.c b/nss/cmd/selfserv/selfserv.c | |||
1748 | index f2b1273..03e39d6 100644 | |||
1749 | --- a/nss/cmd/selfserv/selfserv.c | |||
1750 | +++ b/nss/cmd/selfserv/selfserv.c | |||
1751 | @@ -235,7 +235,13 @@ PrintParameterUsage() | |||
1752 | 235 | " rsa_pss_pss_sha256, rsa_pss_pss_sha384, rsa_pss_pss_sha512,\n" | 235 | " rsa_pss_pss_sha256, rsa_pss_pss_sha384, rsa_pss_pss_sha512,\n" |
1753 | 236 | "-Z enable 0-RTT (for TLS 1.3; also use -u)\n" | 236 | "-Z enable 0-RTT (for TLS 1.3; also use -u)\n" |
1754 | 237 | "-E enable post-handshake authentication\n" | 237 | "-E enable post-handshake authentication\n" |
1756 | 238 | " (for TLS 1.3; only has an effect with 3 or more -r options)\n", | 238 | " (for TLS 1.3; only has an effect with 3 or more -r options)\n" |
1757 | 239 | "-x Export and print keying material after successful handshake\n" | ||
1758 | 240 | " The argument is a comma separated list of exporters in the form:\n" | ||
1759 | 241 | " LABEL[:OUTPUT-LENGTH[:CONTEXT]]\n" | ||
1760 | 242 | " where LABEL and CONTEXT can be either a free-form string or\n" | ||
1761 | 243 | " a hex string if it is preceded by \"0x\"; OUTPUT-LENGTH\n" | ||
1762 | 244 | " is a decimal integer.\n", | ||
1763 | 239 | stderr); | 245 | stderr); |
1764 | 240 | } | 246 | } |
1765 | 241 | 247 | ||
1766 | @@ -812,6 +818,8 @@ SSLNamedGroup *enabledGroups = NULL; | |||
1767 | 812 | unsigned int enabledGroupsCount = 0; | 818 | unsigned int enabledGroupsCount = 0; |
1768 | 813 | const SSLSignatureScheme *enabledSigSchemes = NULL; | 819 | const SSLSignatureScheme *enabledSigSchemes = NULL; |
1769 | 814 | unsigned int enabledSigSchemeCount = 0; | 820 | unsigned int enabledSigSchemeCount = 0; |
1770 | 821 | const secuExporter *enabledExporters = NULL; | ||
1771 | 822 | unsigned int enabledExporterCount = 0; | ||
1772 | 815 | 823 | ||
1773 | 816 | static char *virtServerNameArray[MAX_VIRT_SERVER_NAME_ARRAY_INDEX]; | 824 | static char *virtServerNameArray[MAX_VIRT_SERVER_NAME_ARRAY_INDEX]; |
1774 | 817 | static int virtServerNameIndex = 1; | 825 | static int virtServerNameIndex = 1; |
1775 | @@ -1822,6 +1830,15 @@ handshakeCallback(PRFileDesc *fd, void *client_data) | |||
1776 | 1822 | SECITEM_FreeItem(hostInfo, PR_TRUE); | 1830 | SECITEM_FreeItem(hostInfo, PR_TRUE); |
1777 | 1823 | } | 1831 | } |
1778 | 1824 | } | 1832 | } |
1779 | 1833 | if (enabledExporters) { | ||
1780 | 1834 | SECStatus rv = exportKeyingMaterials(fd, enabledExporters, enabledExporterCount); | ||
1781 | 1835 | if (rv != SECSuccess) { | ||
1782 | 1836 | PRErrorCode err = PR_GetError(); | ||
1783 | 1837 | fprintf(stderr, | ||
1784 | 1838 | "couldn't export keying material: %s\n", | ||
1785 | 1839 | SECU_Strerror(err)); | ||
1786 | 1840 | } | ||
1787 | 1841 | } | ||
1788 | 1825 | } | 1842 | } |
1789 | 1826 | 1843 | ||
1790 | 1827 | void | 1844 | void |
1791 | @@ -2012,7 +2029,7 @@ server_main( | |||
1792 | 2012 | errExit("SSL_CipherPrefSetDefault:TLS_RSA_WITH_NULL_MD5"); | 2029 | errExit("SSL_CipherPrefSetDefault:TLS_RSA_WITH_NULL_MD5"); |
1793 | 2013 | } | 2030 | } |
1794 | 2014 | 2031 | ||
1796 | 2015 | if (expectedHostNameVal) { | 2032 | if (expectedHostNameVal || enabledExporters) { |
1797 | 2016 | SSL_HandshakeCallback(model_sock, handshakeCallback, | 2033 | SSL_HandshakeCallback(model_sock, handshakeCallback, |
1798 | 2017 | (void *)expectedHostNameVal); | 2034 | (void *)expectedHostNameVal); |
1799 | 2018 | } | 2035 | } |
1800 | @@ -2246,11 +2263,11 @@ main(int argc, char **argv) | |||
1801 | 2246 | 2263 | ||
1802 | 2247 | /* please keep this list of options in ASCII collating sequence. | 2264 | /* please keep this list of options in ASCII collating sequence. |
1803 | 2248 | ** numbers, then capital letters, then lower case, alphabetical. | 2265 | ** numbers, then capital letters, then lower case, alphabetical. |
1805 | 2249 | ** XXX: 'B', 'E', 'q', and 'x' were used in the past but removed | 2266 | ** XXX: 'B', and 'q' were used in the past but removed |
1806 | 2250 | ** in 3.28, please leave some time before resuing those. | 2267 | ** in 3.28, please leave some time before resuing those. |
1807 | 2251 | ** 'z' was removed in 3.39. */ | 2268 | ** 'z' was removed in 3.39. */ |
1808 | 2252 | optstate = PL_CreateOptState(argc, argv, | 2269 | optstate = PL_CreateOptState(argc, argv, |
1810 | 2253 | "2:A:C:DEGH:I:J:L:M:NP:QRS:T:U:V:W:YZa:bc:d:e:f:g:hi:jk:lmn:op:rst:uvw:y"); | 2270 | "2:A:C:DEGH:I:J:L:M:NP:QRS:T:U:V:W:YZa:bc:d:e:f:g:hi:jk:lmn:op:rst:uvw:x:y"); |
1811 | 2254 | while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { | 2271 | while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { |
1812 | 2255 | ++optionsFound; | 2272 | ++optionsFound; |
1813 | 2256 | switch (optstate->option) { | 2273 | switch (optstate->option) { |
1814 | @@ -2496,6 +2513,17 @@ main(int argc, char **argv) | |||
1815 | 2496 | } | 2513 | } |
1816 | 2497 | break; | 2514 | break; |
1817 | 2498 | 2515 | ||
1818 | 2516 | case 'x': | ||
1819 | 2517 | rv = parseExporters(optstate->value, | ||
1820 | 2518 | &enabledExporters, &enabledExporterCount); | ||
1821 | 2519 | if (rv != SECSuccess) { | ||
1822 | 2520 | PL_DestroyOptState(optstate); | ||
1823 | 2521 | fprintf(stderr, "Bad exporter specified.\n"); | ||
1824 | 2522 | fprintf(stderr, "Run '%s -h' for usage information.\n", progName); | ||
1825 | 2523 | exit(5); | ||
1826 | 2524 | } | ||
1827 | 2525 | break; | ||
1828 | 2526 | |||
1829 | 2499 | default: | 2527 | default: |
1830 | 2500 | case '?': | 2528 | case '?': |
1831 | 2501 | fprintf(stderr, "Unrecognized or bad option specified.\n"); | 2529 | fprintf(stderr, "Unrecognized or bad option specified.\n"); |
1832 | @@ -2685,8 +2713,10 @@ main(int argc, char **argv) | |||
1833 | 2685 | } | 2713 | } |
1834 | 2686 | if (cipher > 0) { | 2714 | if (cipher > 0) { |
1835 | 2687 | rv = SSL_CipherPrefSetDefault(cipher, SSL_ALLOWED); | 2715 | rv = SSL_CipherPrefSetDefault(cipher, SSL_ALLOWED); |
1838 | 2688 | if (rv != SECSuccess) | 2716 | if (rv != SECSuccess) { |
1839 | 2689 | SECU_PrintError(progName, "SSL_CipherPrefSet()"); | 2717 | SECU_PrintError(progName, "SSL_CipherPrefSetDefault()"); |
1840 | 2718 | exit(9); | ||
1841 | 2719 | } | ||
1842 | 2690 | } else { | 2720 | } else { |
1843 | 2691 | fprintf(stderr, | 2721 | fprintf(stderr, |
1844 | 2692 | "Invalid cipher specification (-c arg).\n"); | 2722 | "Invalid cipher specification (-c arg).\n"); |
1845 | diff --git a/nss/cmd/shlibsign/shlibsign.c b/nss/cmd/shlibsign/shlibsign.c | |||
1846 | index 221d1e6..b0a7512 100644 | |||
1847 | --- a/nss/cmd/shlibsign/shlibsign.c | |||
1848 | +++ b/nss/cmd/shlibsign/shlibsign.c | |||
1849 | @@ -614,7 +614,7 @@ cleanup: | |||
1850 | 614 | static char * | 614 | static char * |
1851 | 615 | filePasswd(char *pwFile) | 615 | filePasswd(char *pwFile) |
1852 | 616 | { | 616 | { |
1854 | 617 | unsigned char phrase[200]; | 617 | unsigned char phrase[500]; |
1855 | 618 | PRFileDesc *fd; | 618 | PRFileDesc *fd; |
1856 | 619 | PRInt32 nb; | 619 | PRInt32 nb; |
1857 | 620 | int i; | 620 | int i; |
1858 | diff --git a/nss/cmd/strsclnt/strsclnt.c b/nss/cmd/strsclnt/strsclnt.c | |||
1859 | index 099b7bf..3d9fc4f 100644 | |||
1860 | --- a/nss/cmd/strsclnt/strsclnt.c | |||
1861 | +++ b/nss/cmd/strsclnt/strsclnt.c | |||
1862 | @@ -166,6 +166,9 @@ Usage(void) | |||
1863 | 166 | " -u enable TLS Session Ticket extension\n" | 166 | " -u enable TLS Session Ticket extension\n" |
1864 | 167 | " -z enable compression\n" | 167 | " -z enable compression\n" |
1865 | 168 | " -g enable false start\n" | 168 | " -g enable false start\n" |
1866 | 169 | " -4 Enforce using an IPv4 destination address\n" | ||
1867 | 170 | " -6 Enforce using an IPv6 destination address\n" | ||
1868 | 171 | " Note: Default behavior is both IPv4 and IPv6 enabled\n" | ||
1869 | 169 | " -J enable signature schemes\n" | 172 | " -J enable signature schemes\n" |
1870 | 170 | " This takes a comma separated list of signature schemes in preference\n" | 173 | " This takes a comma separated list of signature schemes in preference\n" |
1871 | 171 | " order.\n" | 174 | " order.\n" |
1872 | @@ -1061,7 +1064,9 @@ client_main( | |||
1873 | 1061 | int connections, | 1064 | int connections, |
1874 | 1062 | cert_and_key *Cert_And_Key, | 1065 | cert_and_key *Cert_And_Key, |
1875 | 1063 | const char *hostName, | 1066 | const char *hostName, |
1877 | 1064 | const char *sniHostName) | 1067 | const char *sniHostName, |
1878 | 1068 | PRBool allowIPv4, | ||
1879 | 1069 | PRBool allowIPv6) | ||
1880 | 1065 | { | 1070 | { |
1881 | 1066 | PRFileDesc *model_sock = NULL; | 1071 | PRFileDesc *model_sock = NULL; |
1882 | 1067 | int i; | 1072 | int i; |
1883 | @@ -1083,11 +1088,15 @@ client_main( | |||
1884 | 1083 | SECU_PrintError(progName, "error looking up host"); | 1088 | SECU_PrintError(progName, "error looking up host"); |
1885 | 1084 | return; | 1089 | return; |
1886 | 1085 | } | 1090 | } |
1888 | 1086 | do { | 1091 | for (;;) { |
1889 | 1087 | enumPtr = PR_EnumerateAddrInfo(enumPtr, addrInfo, port, &addr); | 1092 | enumPtr = PR_EnumerateAddrInfo(enumPtr, addrInfo, port, &addr); |
1893 | 1088 | } while (enumPtr != NULL && | 1093 | if (enumPtr == NULL) |
1894 | 1089 | addr.raw.family != PR_AF_INET && | 1094 | break; |
1895 | 1090 | addr.raw.family != PR_AF_INET6); | 1095 | if (addr.raw.family == PR_AF_INET && allowIPv4) |
1896 | 1096 | break; | ||
1897 | 1097 | if (addr.raw.family == PR_AF_INET6 && allowIPv6) | ||
1898 | 1098 | break; | ||
1899 | 1099 | } | ||
1900 | 1091 | PR_FreeAddrInfo(addrInfo); | 1100 | PR_FreeAddrInfo(addrInfo); |
1901 | 1092 | if (enumPtr == NULL) { | 1101 | if (enumPtr == NULL) { |
1902 | 1093 | SECU_PrintError(progName, "error looking up host address"); | 1102 | SECU_PrintError(progName, "error looking up host address"); |
1903 | @@ -1319,6 +1328,8 @@ main(int argc, char **argv) | |||
1904 | 1319 | int connections = 1; | 1328 | int connections = 1; |
1905 | 1320 | int exitVal; | 1329 | int exitVal; |
1906 | 1321 | int tmpInt; | 1330 | int tmpInt; |
1907 | 1331 | PRBool allowIPv4 = PR_TRUE; | ||
1908 | 1332 | PRBool allowIPv6 = PR_TRUE; | ||
1909 | 1322 | unsigned short port = 443; | 1333 | unsigned short port = 443; |
1910 | 1323 | SECStatus rv; | 1334 | SECStatus rv; |
1911 | 1324 | PLOptState *optstate; | 1335 | PLOptState *optstate; |
1912 | @@ -1338,9 +1349,25 @@ main(int argc, char **argv) | |||
1913 | 1338 | /* XXX: 'B' was used in the past but removed in 3.28, | 1349 | /* XXX: 'B' was used in the past but removed in 3.28, |
1914 | 1339 | * please leave some time before resuing it. */ | 1350 | * please leave some time before resuing it. */ |
1915 | 1340 | optstate = PL_CreateOptState(argc, argv, | 1351 | optstate = PL_CreateOptState(argc, argv, |
1917 | 1341 | "C:DJ:NP:TUV:W:a:c:d:f:gin:op:qst:uvw:z"); | 1352 | "46C:DJ:NP:TUV:W:a:c:d:f:gin:op:qst:uvw:z"); |
1918 | 1342 | while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { | 1353 | while ((status = PL_GetNextOpt(optstate)) == PL_OPT_OK) { |
1919 | 1343 | switch (optstate->option) { | 1354 | switch (optstate->option) { |
1920 | 1355 | case '4': | ||
1921 | 1356 | if (!allowIPv4) { | ||
1922 | 1357 | fprintf(stderr, "Only one of [-4, -6] can be specified.\n"); | ||
1923 | 1358 | Usage(); | ||
1924 | 1359 | } | ||
1925 | 1360 | allowIPv6 = PR_FALSE; | ||
1926 | 1361 | break; | ||
1927 | 1362 | |||
1928 | 1363 | case '6': | ||
1929 | 1364 | if (!allowIPv6) { | ||
1930 | 1365 | fprintf(stderr, "Only one of [-4, -6] can be specified.\n"); | ||
1931 | 1366 | Usage(); | ||
1932 | 1367 | } | ||
1933 | 1368 | allowIPv4 = PR_FALSE; | ||
1934 | 1369 | break; | ||
1935 | 1370 | |||
1936 | 1344 | case 'C': | 1371 | case 'C': |
1937 | 1345 | cipherString = optstate->value; | 1372 | cipherString = optstate->value; |
1938 | 1346 | break; | 1373 | break; |
1939 | @@ -1523,7 +1550,7 @@ main(int argc, char **argv) | |||
1940 | 1523 | } | 1550 | } |
1941 | 1524 | 1551 | ||
1942 | 1525 | client_main(port, connections, &Cert_And_Key, hostName, | 1552 | client_main(port, connections, &Cert_And_Key, hostName, |
1944 | 1526 | sniHostName); | 1553 | sniHostName, allowIPv4, allowIPv6); |
1945 | 1527 | 1554 | ||
1946 | 1528 | /* clean up */ | 1555 | /* clean up */ |
1947 | 1529 | if (Cert_And_Key.cert) { | 1556 | if (Cert_And_Key.cert) { |
1948 | diff --git a/nss/cmd/symkeyutil/symkeyutil.c b/nss/cmd/symkeyutil/symkeyutil.c | |||
1949 | index 31ab4dd..6304338 100644 | |||
1950 | --- a/nss/cmd/symkeyutil/symkeyutil.c | |||
1951 | +++ b/nss/cmd/symkeyutil/symkeyutil.c | |||
1952 | @@ -254,7 +254,7 @@ HexToBuf(char *inString, SECItem *outbuf) | |||
1953 | 254 | int trueLen = 0; | 254 | int trueLen = 0; |
1954 | 255 | 255 | ||
1955 | 256 | outbuf->data = PORT_Alloc(outlen); | 256 | outbuf->data = PORT_Alloc(outlen); |
1957 | 257 | if (outbuf->data) { | 257 | if (!outbuf->data) { |
1958 | 258 | return -1; | 258 | return -1; |
1959 | 259 | } | 259 | } |
1960 | 260 | 260 | ||
1961 | diff --git a/nss/cmd/tstclnt/tstclnt.c b/nss/cmd/tstclnt/tstclnt.c | |||
1962 | index 12c6df0..6fa1541 100644 | |||
1963 | --- a/nss/cmd/tstclnt/tstclnt.c | |||
1964 | +++ b/nss/cmd/tstclnt/tstclnt.c | |||
1965 | @@ -318,6 +318,13 @@ PrintParameterUsage() | |||
1966 | 318 | fprintf(stderr, "%-20s Enable post-handshake authentication\n" | 318 | fprintf(stderr, "%-20s Enable post-handshake authentication\n" |
1967 | 319 | "%-20s for TLS 1.3; need to specify -n\n", | 319 | "%-20s for TLS 1.3; need to specify -n\n", |
1968 | 320 | "-E", ""); | 320 | "-E", ""); |
1969 | 321 | fprintf(stderr, "%-20s Export and print keying material after successful handshake.\n" | ||
1970 | 322 | "%-20s The argument is a comma separated list of exporters in the form:\n" | ||
1971 | 323 | "%-20s LABEL[:OUTPUT-LENGTH[:CONTEXT]]\n" | ||
1972 | 324 | "%-20s where LABEL and CONTEXT can be either a free-form string or\n" | ||
1973 | 325 | "%-20s a hex string if it is preceded by \"0x\"; OUTPUT-LENGTH\n" | ||
1974 | 326 | "%-20s is a decimal integer.\n", | ||
1975 | 327 | "-x", "", "", "", "", ""); | ||
1976 | 321 | } | 328 | } |
1977 | 322 | 329 | ||
1978 | 323 | static void | 330 | static void |
1979 | @@ -924,7 +931,7 @@ restartHandshakeAfterServerCertIfNeeded(PRFileDesc *fd, | |||
1980 | 924 | PRBool override) | 931 | PRBool override) |
1981 | 925 | { | 932 | { |
1982 | 926 | SECStatus rv; | 933 | SECStatus rv; |
1984 | 927 | PRErrorCode error; | 934 | PRErrorCode error = 0; |
1985 | 928 | 935 | ||
1986 | 929 | if (!serverCertAuth->isPaused) | 936 | if (!serverCertAuth->isPaused) |
1987 | 930 | return SECSuccess; | 937 | return SECSuccess; |
1988 | @@ -998,6 +1005,8 @@ PRBool handshakeComplete = PR_FALSE; | |||
1989 | 998 | char *encryptedSNIKeys = NULL; | 1005 | char *encryptedSNIKeys = NULL; |
1990 | 999 | PRBool enablePostHandshakeAuth = PR_FALSE; | 1006 | PRBool enablePostHandshakeAuth = PR_FALSE; |
1991 | 1000 | PRBool enableDelegatedCredentials = PR_FALSE; | 1007 | PRBool enableDelegatedCredentials = PR_FALSE; |
1992 | 1008 | const secuExporter *enabledExporters = NULL; | ||
1993 | 1009 | unsigned int enabledExporterCount = 0; | ||
1994 | 1001 | 1010 | ||
1995 | 1002 | static int | 1011 | static int |
1996 | 1003 | writeBytesToServer(PRFileDesc *s, const PRUint8 *buf, int nb) | 1012 | writeBytesToServer(PRFileDesc *s, const PRUint8 *buf, int nb) |
1997 | @@ -1093,6 +1102,18 @@ handshakeCallback(PRFileDesc *fd, void *client_data) | |||
1998 | 1093 | requestToExit = PR_TRUE; | 1102 | requestToExit = PR_TRUE; |
1999 | 1094 | } | 1103 | } |
2000 | 1095 | handshakeComplete = PR_TRUE; | 1104 | handshakeComplete = PR_TRUE; |
2001 | 1105 | |||
2002 | 1106 | if (enabledExporters) { | ||
2003 | 1107 | SECStatus rv; | ||
2004 | 1108 | |||
2005 | 1109 | rv = exportKeyingMaterials(fd, enabledExporters, enabledExporterCount); | ||
2006 | 1110 | if (rv != SECSuccess) { | ||
2007 | 1111 | PRErrorCode err = PR_GetError(); | ||
2008 | 1112 | FPRINTF(stderr, | ||
2009 | 1113 | "couldn't export keying material: %s\n", | ||
2010 | 1114 | SECU_Strerror(err)); | ||
2011 | 1115 | } | ||
2012 | 1116 | } | ||
2013 | 1096 | } | 1117 | } |
2014 | 1097 | 1118 | ||
2015 | 1098 | static SECStatus | 1119 | static SECStatus |
2016 | @@ -1313,8 +1334,11 @@ run() | |||
2017 | 1313 | } | 1334 | } |
2018 | 1314 | if (cipher > 0) { | 1335 | if (cipher > 0) { |
2019 | 1315 | rv = SSL_CipherPrefSet(s, cipher, SSL_ALLOWED); | 1336 | rv = SSL_CipherPrefSet(s, cipher, SSL_ALLOWED); |
2021 | 1316 | if (rv != SECSuccess) | 1337 | if (rv != SECSuccess) { |
2022 | 1317 | SECU_PrintError(progName, "SSL_CipherPrefSet()"); | 1338 | SECU_PrintError(progName, "SSL_CipherPrefSet()"); |
2023 | 1339 | error = 1; | ||
2024 | 1340 | goto done; | ||
2025 | 1341 | } | ||
2026 | 1318 | } else { | 1342 | } else { |
2027 | 1319 | Usage(); | 1343 | Usage(); |
2028 | 1320 | } | 1344 | } |
2029 | @@ -1732,7 +1756,7 @@ main(int argc, char **argv) | |||
2030 | 1732 | * Please leave some time before reusing these. | 1756 | * Please leave some time before reusing these. |
2031 | 1733 | */ | 1757 | */ |
2032 | 1734 | optstate = PL_CreateOptState(argc, argv, | 1758 | optstate = PL_CreateOptState(argc, argv, |
2034 | 1735 | "46A:BCDEFGHI:J:KL:M:N:OP:QR:STUV:W:X:YZa:bc:d:fgh:m:n:op:qr:st:uvw:"); | 1759 | "46A:BCDEFGHI:J:KL:M:N:OP:QR:STUV:W:X:YZa:bc:d:fgh:m:n:op:qr:st:uvw:x:"); |
2035 | 1736 | while ((optstatus = PL_GetNextOpt(optstate)) == PL_OPT_OK) { | 1760 | while ((optstatus = PL_GetNextOpt(optstate)) == PL_OPT_OK) { |
2036 | 1737 | switch (optstate->option) { | 1761 | switch (optstate->option) { |
2037 | 1738 | case '?': | 1762 | case '?': |
2038 | @@ -1980,6 +2004,17 @@ main(int argc, char **argv) | |||
2039 | 1980 | Usage(); | 2004 | Usage(); |
2040 | 1981 | } | 2005 | } |
2041 | 1982 | break; | 2006 | break; |
2042 | 2007 | |||
2043 | 2008 | case 'x': | ||
2044 | 2009 | rv = parseExporters(optstate->value, | ||
2045 | 2010 | &enabledExporters, | ||
2046 | 2011 | &enabledExporterCount); | ||
2047 | 2012 | if (rv != SECSuccess) { | ||
2048 | 2013 | PL_DestroyOptState(optstate); | ||
2049 | 2014 | fprintf(stderr, "Bad exporter specified.\n"); | ||
2050 | 2015 | Usage(); | ||
2051 | 2016 | } | ||
2052 | 2017 | break; | ||
2053 | 1983 | } | 2018 | } |
2054 | 1984 | } | 2019 | } |
2055 | 1985 | PL_DestroyOptState(optstate); | 2020 | PL_DestroyOptState(optstate); |
2056 | diff --git a/nss/cmd/vfyserv/vfyserv.c b/nss/cmd/vfyserv/vfyserv.c | |||
2057 | index 4234ecd..3c6d014 100644 | |||
2058 | --- a/nss/cmd/vfyserv/vfyserv.c | |||
2059 | +++ b/nss/cmd/vfyserv/vfyserv.c | |||
2060 | @@ -544,7 +544,12 @@ main(int argc, char **argv) | |||
2061 | 544 | } | 544 | } |
2062 | 545 | } | 545 | } |
2063 | 546 | if (cipher > 0) { | 546 | if (cipher > 0) { |
2065 | 547 | SSL_CipherPrefSetDefault(cipher, PR_TRUE); | 547 | SECStatus rv = SSL_CipherPrefSetDefault(cipher, PR_TRUE); |
2066 | 548 | if (rv != SECSuccess) { | ||
2067 | 549 | SECU_PrintError(progName, | ||
2068 | 550 | "error setting cipher default preference"); | ||
2069 | 551 | goto cleanup; | ||
2070 | 552 | } | ||
2071 | 548 | } else { | 553 | } else { |
2072 | 549 | Usage(progName); | 554 | Usage(progName); |
2073 | 550 | } | 555 | } |
2074 | diff --git a/nss/coreconf/UNIX.mk b/nss/coreconf/UNIX.mk | |||
2075 | index b448e75..8f6042e 100644 | |||
2076 | --- a/nss/coreconf/UNIX.mk | |||
2077 | +++ b/nss/coreconf/UNIX.mk | |||
2078 | @@ -14,9 +14,7 @@ ifdef BUILD_OPT | |||
2079 | 14 | DEFINES += -UDEBUG -DNDEBUG | 14 | DEFINES += -UDEBUG -DNDEBUG |
2080 | 15 | else | 15 | else |
2081 | 16 | OPTIMIZER += -g | 16 | OPTIMIZER += -g |
2085 | 17 | USERNAME := $(shell whoami) | 17 | DEFINES += -DDEBUG -UNDEBUG |
2083 | 18 | USERNAME := $(subst -,_,$(USERNAME)) | ||
2084 | 19 | DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME) | ||
2086 | 20 | endif | 18 | endif |
2087 | 21 | 19 | ||
2088 | 22 | ifdef BUILD_TREE | 20 | ifdef BUILD_TREE |
2089 | diff --git a/nss/coreconf/WIN32.mk b/nss/coreconf/WIN32.mk | |||
2090 | index be795f0..7269cc7 100644 | |||
2091 | --- a/nss/coreconf/WIN32.mk | |||
2092 | +++ b/nss/coreconf/WIN32.mk | |||
2093 | @@ -104,7 +104,7 @@ endif | |||
2094 | 104 | DLL_SUFFIX = dll | 104 | DLL_SUFFIX = dll |
2095 | 105 | 105 | ||
2096 | 106 | ifdef NS_USE_GCC | 106 | ifdef NS_USE_GCC |
2098 | 107 | OS_CFLAGS += -mwindows -mms-bitfields | 107 | OS_CFLAGS += -mwindows |
2099 | 108 | _GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY) | 108 | _GEN_IMPORT_LIB=-Wl,--out-implib,$(IMPORT_LIBRARY) |
2100 | 109 | DLLFLAGS += -mwindows -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB)) | 109 | DLLFLAGS += -mwindows -o $@ -shared -Wl,--export-all-symbols $(if $(IMPORT_LIBRARY),$(_GEN_IMPORT_LIB)) |
2101 | 110 | ifdef BUILD_OPT | 110 | ifdef BUILD_OPT |
2102 | @@ -116,11 +116,7 @@ ifdef NS_USE_GCC | |||
2103 | 116 | DEFINES += -UDEBUG -DNDEBUG | 116 | DEFINES += -UDEBUG -DNDEBUG |
2104 | 117 | else | 117 | else |
2105 | 118 | OPTIMIZER += -g | 118 | OPTIMIZER += -g |
2111 | 119 | NULLSTRING := | 119 | DEFINES += -DDEBUG -UNDEBUG |
2107 | 120 | SPACE := $(NULLSTRING) # end of the line | ||
2108 | 121 | USERNAME := $(subst $(SPACE),_,$(USERNAME)) | ||
2109 | 122 | USERNAME := $(subst -,_,$(USERNAME)) | ||
2110 | 123 | DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME) | ||
2112 | 124 | endif | 120 | endif |
2113 | 125 | else # !NS_USE_GCC | 121 | else # !NS_USE_GCC |
2114 | 126 | WARNING_CFLAGS = -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \ | 122 | WARNING_CFLAGS = -W3 -nologo -D_CRT_SECURE_NO_WARNINGS \ |
2115 | @@ -179,10 +175,7 @@ else # !NS_USE_GCC | |||
2116 | 179 | else | 175 | else |
2117 | 180 | OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od | 176 | OPTIMIZER += -Zi -Fd$(OBJDIR)/ -Od |
2118 | 181 | NULLSTRING := | 177 | NULLSTRING := |
2123 | 182 | SPACE := $(NULLSTRING) # end of the line | 178 | DEFINES += -DDEBUG -UNDEBUG |
2120 | 183 | USERNAME := $(subst $(SPACE),_,$(USERNAME)) | ||
2121 | 184 | USERNAME := $(subst -,_,$(USERNAME)) | ||
2122 | 185 | DEFINES += -DDEBUG -UNDEBUG -DDEBUG_$(USERNAME) | ||
2124 | 186 | DLLFLAGS += -DEBUG -OUT:$@ | 179 | DLLFLAGS += -DEBUG -OUT:$@ |
2125 | 187 | LDFLAGS += -DEBUG | 180 | LDFLAGS += -DEBUG |
2126 | 188 | ifeq ($(_MSC_VER),$(_MSC_VER_6)) | 181 | ifeq ($(_MSC_VER),$(_MSC_VER_6)) |
2127 | diff --git a/nss/coreconf/config.gypi b/nss/coreconf/config.gypi | |||
2128 | index 2f17c82..f4426ac 100644 | |||
2129 | --- a/nss/coreconf/config.gypi | |||
2130 | +++ b/nss/coreconf/config.gypi | |||
2131 | @@ -96,6 +96,7 @@ | |||
2132 | 96 | 'cc_is_gcc%': '<(cc_is_gcc)', | 96 | 'cc_is_gcc%': '<(cc_is_gcc)', |
2133 | 97 | 'cc_use_gnu_ld%': '<(cc_use_gnu_ld)', | 97 | 'cc_use_gnu_ld%': '<(cc_use_gnu_ld)', |
2134 | 98 | # Some defaults | 98 | # Some defaults |
2135 | 99 | 'disable_arm_hw_aes%': 0, | ||
2136 | 99 | 'disable_tests%': 0, | 100 | 'disable_tests%': 0, |
2137 | 100 | 'disable_chachapoly%': 0, | 101 | 'disable_chachapoly%': 0, |
2138 | 101 | 'disable_dbm%': 0, | 102 | 'disable_dbm%': 0, |
2139 | diff --git a/nss/coreconf/nspr.sh b/nss/coreconf/nspr.sh | |||
2140 | index 325a188..d84674e 100644 | |||
2141 | --- a/nss/coreconf/nspr.sh | |||
2142 | +++ b/nss/coreconf/nspr.sh | |||
2143 | @@ -36,15 +36,30 @@ nspr_build() | |||
2144 | 36 | extra_params+=(--enable-64bit) | 36 | extra_params+=(--enable-64bit) |
2145 | 37 | fi | 37 | fi |
2146 | 38 | 38 | ||
2148 | 39 | echo "NSPR [1/3] configure ..." | 39 | echo "NSPR [1/5] configure ..." |
2149 | 40 | pushd "$nspr_dir" >/dev/null | 40 | pushd "$nspr_dir" >/dev/null |
2150 | 41 | CFLAGS="$nspr_cflags" CXXFLAGS="$nspr_cxxflags" \ | 41 | CFLAGS="$nspr_cflags" CXXFLAGS="$nspr_cxxflags" \ |
2151 | 42 | LDFLAGS="$nspr_ldflags" CC="$CC" CXX="$CCC" \ | 42 | LDFLAGS="$nspr_ldflags" CC="$CC" CXX="$CCC" \ |
2152 | 43 | run_verbose ../configure "${extra_params[@]}" "$@" | 43 | run_verbose ../configure "${extra_params[@]}" "$@" |
2153 | 44 | popd >/dev/null | 44 | popd >/dev/null |
2155 | 45 | echo "NSPR [2/3] make ..." | 45 | echo "NSPR [2/5] make ..." |
2156 | 46 | run_verbose make -C "$nspr_dir" | 46 | run_verbose make -C "$nspr_dir" |
2158 | 47 | echo "NSPR [3/3] install ..." | 47 | |
2159 | 48 | if [ "$build_nspr_tests" = 1 ]; then | ||
2160 | 49 | echo "NSPR [3/5] build tests ..." | ||
2161 | 50 | run_verbose make -C "$nspr_dir/pr/tests" | ||
2162 | 51 | else | ||
2163 | 52 | echo "NSPR [3/5] NOT building tests" | ||
2164 | 53 | fi | ||
2165 | 54 | |||
2166 | 55 | if [[ "$build_nspr_tests" = 1 && "$run_nspr_tests" = 1 ]]; then | ||
2167 | 56 | echo "NSPR [4/5] run tests ..." | ||
2168 | 57 | run_verbose make -C "$nspr_dir/pr/tests" runtests | ||
2169 | 58 | else | ||
2170 | 59 | echo "NSPR [4/5] NOT running tests" | ||
2171 | 60 | fi | ||
2172 | 61 | |||
2173 | 62 | echo "NSPR [5/5] install ..." | ||
2174 | 48 | run_verbose make -C "$nspr_dir" install | 63 | run_verbose make -C "$nspr_dir" install |
2175 | 49 | } | 64 | } |
2176 | 50 | 65 | ||
2177 | diff --git a/nss/cpputil/freebl_scoped_ptrs.h b/nss/cpputil/freebl_scoped_ptrs.h | |||
2178 | 51 | new file mode 100644 | 66 | new file mode 100644 |
2179 | index 0000000..2f21ca9 | |||
2180 | --- /dev/null | |||
2181 | +++ b/nss/cpputil/freebl_scoped_ptrs.h | |||
2182 | @@ -0,0 +1,33 @@ | |||
2183 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
2184 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ | ||
2185 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public | ||
2186 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
2187 | 5 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
2188 | 6 | |||
2189 | 7 | #ifndef freebl_scoped_ptrs_h__ | ||
2190 | 8 | #define freebl_scoped_ptrs_h__ | ||
2191 | 9 | |||
2192 | 10 | #include <memory> | ||
2193 | 11 | #include "blapi.h" | ||
2194 | 12 | |||
2195 | 13 | struct ScopedDelete { | ||
2196 | 14 | void operator()(CMACContext* ctx) { CMAC_Destroy(ctx, PR_TRUE); } | ||
2197 | 15 | }; | ||
2198 | 16 | |||
2199 | 17 | template <class T> | ||
2200 | 18 | struct ScopedMaybeDelete { | ||
2201 | 19 | void operator()(T* ptr) { | ||
2202 | 20 | if (ptr) { | ||
2203 | 21 | ScopedDelete del; | ||
2204 | 22 | del(ptr); | ||
2205 | 23 | } | ||
2206 | 24 | } | ||
2207 | 25 | }; | ||
2208 | 26 | |||
2209 | 27 | #define SCOPED(x) typedef std::unique_ptr<x, ScopedMaybeDelete<x> > Scoped##x | ||
2210 | 28 | |||
2211 | 29 | SCOPED(CMACContext); | ||
2212 | 30 | |||
2213 | 31 | #undef SCOPED | ||
2214 | 32 | |||
2215 | 33 | #endif // freebl_scoped_ptrs_h__ | ||
2216 | diff --git a/nss/cpputil/nss_scoped_ptrs.h b/nss/cpputil/nss_scoped_ptrs.h | |||
2217 | index 9b1fbb4..3ee7c9e 100644 | |||
2218 | --- a/nss/cpputil/nss_scoped_ptrs.h | |||
2219 | +++ b/nss/cpputil/nss_scoped_ptrs.h | |||
2220 | @@ -21,13 +21,19 @@ struct ScopedDelete { | |||
2221 | 21 | void operator()(CERTCertificateList* list) { | 21 | void operator()(CERTCertificateList* list) { |
2222 | 22 | CERT_DestroyCertificateList(list); | 22 | CERT_DestroyCertificateList(list); |
2223 | 23 | } | 23 | } |
2224 | 24 | void operator()(CERTDistNames* names) { CERT_FreeDistNames(names); } | ||
2225 | 24 | void operator()(CERTName* name) { CERT_DestroyName(name); } | 25 | void operator()(CERTName* name) { CERT_DestroyName(name); } |
2226 | 25 | void operator()(CERTCertList* list) { CERT_DestroyCertList(list); } | 26 | void operator()(CERTCertList* list) { CERT_DestroyCertList(list); } |
2227 | 26 | void operator()(CERTSubjectPublicKeyInfo* spki) { | 27 | void operator()(CERTSubjectPublicKeyInfo* spki) { |
2228 | 27 | SECKEY_DestroySubjectPublicKeyInfo(spki); | 28 | SECKEY_DestroySubjectPublicKeyInfo(spki); |
2229 | 28 | } | 29 | } |
2230 | 30 | void operator()(PK11Context* context) { PK11_DestroyContext(context, true); } | ||
2231 | 31 | void operator()(PK11GenericObject* obj) { PK11_DestroyGenericObject(obj); } | ||
2232 | 29 | void operator()(PK11SlotInfo* slot) { PK11_FreeSlot(slot); } | 32 | void operator()(PK11SlotInfo* slot) { PK11_FreeSlot(slot); } |
2233 | 30 | void operator()(PK11SymKey* key) { PK11_FreeSymKey(key); } | 33 | void operator()(PK11SymKey* key) { PK11_FreeSymKey(key); } |
2234 | 34 | void operator()(PK11URI* uri) { PK11URI_DestroyURI(uri); } | ||
2235 | 35 | void operator()(PLArenaPool* arena) { PORT_FreeArena(arena, PR_FALSE); } | ||
2236 | 36 | void operator()(PQGParams* pqg) { PK11_PQG_DestroyParams(pqg); } | ||
2237 | 31 | void operator()(PRFileDesc* fd) { PR_Close(fd); } | 37 | void operator()(PRFileDesc* fd) { PR_Close(fd); } |
2238 | 32 | void operator()(SECAlgorithmID* id) { SECOID_DestroyAlgorithmID(id, true); } | 38 | void operator()(SECAlgorithmID* id) { SECOID_DestroyAlgorithmID(id, true); } |
2239 | 33 | void operator()(SECKEYEncryptedPrivateKeyInfo* e) { | 39 | void operator()(SECKEYEncryptedPrivateKeyInfo* e) { |
2240 | @@ -39,16 +45,10 @@ struct ScopedDelete { | |||
2241 | 39 | void operator()(SECKEYPrivateKeyList* list) { | 45 | void operator()(SECKEYPrivateKeyList* list) { |
2242 | 40 | SECKEY_DestroyPrivateKeyList(list); | 46 | SECKEY_DestroyPrivateKeyList(list); |
2243 | 41 | } | 47 | } |
2249 | 42 | void operator()(PK11URI* uri) { PK11URI_DestroyURI(uri); } | 48 | void operator()(SECMODModule* module) { SECMOD_DestroyModule(module); } |
2245 | 43 | void operator()(PLArenaPool* arena) { PORT_FreeArena(arena, PR_FALSE); } | ||
2246 | 44 | void operator()(PK11Context* context) { PK11_DestroyContext(context, true); } | ||
2247 | 45 | void operator()(PK11GenericObject* obj) { PK11_DestroyGenericObject(obj); } | ||
2248 | 46 | void operator()(PQGParams* pqg) { PK11_PQG_DestroyParams(pqg); } | ||
2250 | 47 | void operator()(SEC_PKCS12DecoderContext* dcx) { | 49 | void operator()(SEC_PKCS12DecoderContext* dcx) { |
2251 | 48 | SEC_PKCS12DecoderFinish(dcx); | 50 | SEC_PKCS12DecoderFinish(dcx); |
2252 | 49 | } | 51 | } |
2253 | 50 | void operator()(CERTDistNames* names) { CERT_FreeDistNames(names); } | ||
2254 | 51 | void operator()(SECMODModule* module) { SECMOD_DestroyModule(module); } | ||
2255 | 52 | }; | 52 | }; |
2256 | 53 | 53 | ||
2257 | 54 | template <class T> | 54 | template <class T> |
2258 | @@ -63,34 +63,35 @@ struct ScopedMaybeDelete { | |||
2259 | 63 | 63 | ||
2260 | 64 | #define SCOPED(x) typedef std::unique_ptr<x, ScopedMaybeDelete<x> > Scoped##x | 64 | #define SCOPED(x) typedef std::unique_ptr<x, ScopedMaybeDelete<x> > Scoped##x |
2261 | 65 | 65 | ||
2262 | 66 | SCOPED(CERTCertList); | ||
2263 | 66 | SCOPED(CERTCertificate); | 67 | SCOPED(CERTCertificate); |
2264 | 67 | SCOPED(CERTCertificateList); | 68 | SCOPED(CERTCertificateList); |
2266 | 68 | SCOPED(CERTCertList); | 69 | SCOPED(CERTDistNames); |
2267 | 69 | SCOPED(CERTName); | 70 | SCOPED(CERTName); |
2268 | 70 | SCOPED(CERTSubjectPublicKeyInfo); | 71 | SCOPED(CERTSubjectPublicKeyInfo); |
2269 | 72 | SCOPED(PK11Context); | ||
2270 | 73 | SCOPED(PK11GenericObject); | ||
2271 | 71 | SCOPED(PK11SlotInfo); | 74 | SCOPED(PK11SlotInfo); |
2272 | 72 | SCOPED(PK11SymKey); | 75 | SCOPED(PK11SymKey); |
2273 | 76 | SCOPED(PK11URI); | ||
2274 | 77 | SCOPED(PLArenaPool); | ||
2275 | 73 | SCOPED(PQGParams); | 78 | SCOPED(PQGParams); |
2276 | 74 | SCOPED(PRFileDesc); | 79 | SCOPED(PRFileDesc); |
2277 | 75 | SCOPED(SECAlgorithmID); | 80 | SCOPED(SECAlgorithmID); |
2278 | 76 | SCOPED(SECKEYEncryptedPrivateKeyInfo); | ||
2279 | 77 | SCOPED(SECItem); | 81 | SCOPED(SECItem); |
2281 | 78 | SCOPED(SECKEYPublicKey); | 82 | SCOPED(SECKEYEncryptedPrivateKeyInfo); |
2282 | 79 | SCOPED(SECKEYPrivateKey); | 83 | SCOPED(SECKEYPrivateKey); |
2283 | 80 | SCOPED(SECKEYPrivateKeyList); | 84 | SCOPED(SECKEYPrivateKeyList); |
2290 | 81 | SCOPED(PK11URI); | 85 | SCOPED(SECKEYPublicKey); |
2285 | 82 | SCOPED(PLArenaPool); | ||
2286 | 83 | SCOPED(PK11Context); | ||
2287 | 84 | SCOPED(PK11GenericObject); | ||
2288 | 85 | SCOPED(SEC_PKCS12DecoderContext); | ||
2289 | 86 | SCOPED(CERTDistNames); | ||
2291 | 87 | SCOPED(SECMODModule); | 86 | SCOPED(SECMODModule); |
2292 | 87 | SCOPED(SEC_PKCS12DecoderContext); | ||
2293 | 88 | 88 | ||
2294 | 89 | #undef SCOPED | 89 | #undef SCOPED |
2295 | 90 | 90 | ||
2296 | 91 | struct StackSECItem : public SECItem { | 91 | struct StackSECItem : public SECItem { |
2297 | 92 | StackSECItem() : SECItem({siBuffer, nullptr, 0}) {} | 92 | StackSECItem() : SECItem({siBuffer, nullptr, 0}) {} |
2299 | 93 | ~StackSECItem() { SECITEM_FreeItem(this, PR_FALSE); } | 93 | ~StackSECItem() { Reset(); } |
2300 | 94 | void Reset() { SECITEM_FreeItem(this, PR_FALSE); } | ||
2301 | 94 | }; | 95 | }; |
2302 | 95 | 96 | ||
2303 | 96 | #endif // nss_scoped_ptrs_h__ | 97 | #endif // nss_scoped_ptrs_h__ |
2304 | diff --git a/nss/cpputil/scoped_ptrs_util.h b/nss/cpputil/scoped_ptrs_util.h | |||
2305 | index dc6e1d7..d0a42ee 100644 | |||
2306 | --- a/nss/cpputil/scoped_ptrs_util.h | |||
2307 | +++ b/nss/cpputil/scoped_ptrs_util.h | |||
2308 | @@ -37,4 +37,9 @@ SCOPED(PLArenaPool); | |||
2309 | 37 | 37 | ||
2310 | 38 | #undef SCOPED | 38 | #undef SCOPED |
2311 | 39 | 39 | ||
2312 | 40 | struct StackSECItem : public SECItem { | ||
2313 | 41 | StackSECItem() : SECItem({siBuffer, nullptr, 0}) {} | ||
2314 | 42 | ~StackSECItem() { SECITEM_FreeItem(this, PR_FALSE); } | ||
2315 | 43 | }; | ||
2316 | 44 | |||
2317 | 40 | #endif // scoped_ptrs_util_h__ | 45 | #endif // scoped_ptrs_util_h__ |
2318 | diff --git a/nss/cpputil/tls_parser.h b/nss/cpputil/tls_parser.h | |||
2319 | index 2aa7a0e..015bd20 100644 | |||
2320 | --- a/nss/cpputil/tls_parser.h | |||
2321 | +++ b/nss/cpputil/tls_parser.h | |||
2322 | @@ -47,6 +47,7 @@ const uint8_t kTlsAlertIllegalParameter = 47; | |||
2323 | 47 | const uint8_t kTlsAlertDecodeError = 50; | 47 | const uint8_t kTlsAlertDecodeError = 50; |
2324 | 48 | const uint8_t kTlsAlertDecryptError = 51; | 48 | const uint8_t kTlsAlertDecryptError = 51; |
2325 | 49 | const uint8_t kTlsAlertProtocolVersion = 70; | 49 | const uint8_t kTlsAlertProtocolVersion = 70; |
2326 | 50 | const uint8_t kTlsAlertInsufficientSecurity = 71; | ||
2327 | 50 | const uint8_t kTlsAlertInternalError = 80; | 51 | const uint8_t kTlsAlertInternalError = 80; |
2328 | 51 | const uint8_t kTlsAlertInappropriateFallback = 86; | 52 | const uint8_t kTlsAlertInappropriateFallback = 86; |
2329 | 52 | const uint8_t kTlsAlertMissingExtension = 109; | 53 | const uint8_t kTlsAlertMissingExtension = 109; |
2330 | diff --git a/nss/fuzz/fuzz.gyp b/nss/fuzz/fuzz.gyp | |||
2331 | index 91e9b25..292930a 100644 | |||
2332 | --- a/nss/fuzz/fuzz.gyp | |||
2333 | +++ b/nss/fuzz/fuzz.gyp | |||
2334 | @@ -43,6 +43,7 @@ | |||
2335 | 43 | '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7', | 43 | '<(DEPTH)/lib/pkcs7/pkcs7.gyp:pkcs7', |
2336 | 44 | # This is a static build of pk11wrap, softoken, and freebl. | 44 | # This is a static build of pk11wrap, softoken, and freebl. |
2337 | 45 | '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap_static', | 45 | '<(DEPTH)/lib/pk11wrap/pk11wrap.gyp:pk11wrap_static', |
2338 | 46 | '<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix', | ||
2339 | 46 | ], | 47 | ], |
2340 | 47 | 'cflags_cc': [ | 48 | 'cflags_cc': [ |
2341 | 48 | '-Wno-error=shadow', | 49 | '-Wno-error=shadow', |
2342 | diff --git a/nss/gtests/common/testvectors/curve25519-vectors.h b/nss/gtests/common/testvectors/curve25519-vectors.h | |||
2343 | index de44444..bf350cf 100644 | |||
2344 | --- a/nss/gtests/common/testvectors/curve25519-vectors.h | |||
2345 | +++ b/nss/gtests/common/testvectors/curve25519-vectors.h | |||
2346 | @@ -48,9 +48,9 @@ const curve25519_testvector kCurve25519Vectors[] = { | |||
2347 | 48 | 0xf4, 0xeb, 0xa4, 0xa9, 0x8e, 0xaa, 0x9b, 0x4e, 0x6a}, | 48 | 0xf4, 0xeb, 0xa4, 0xa9, 0x8e, 0xaa, 0x9b, 0x4e, 0x6a}, |
2348 | 49 | {0x30, 0x38, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, | 49 | {0x30, 0x38, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, |
2349 | 50 | 0x01, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, 0x47, 0x0f, 0x01, | 50 | 0x01, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, 0x47, 0x0f, 0x01, |
2353 | 51 | 0x03, 0x20, 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, 0xd3, 0x5b, | 51 | 0x03, 0x20, 0x00, 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, 0xd3, |
2354 | 52 | 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, 0x78, | 52 | 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, |
2355 | 53 | 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f}, | 53 | 0x78, 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b}, |
2356 | 54 | {}, | 54 | {}, |
2357 | 55 | false}, | 55 | false}, |
2358 | 56 | 56 | ||
2359 | @@ -70,6 +70,66 @@ const curve25519_testvector kCurve25519Vectors[] = { | |||
2360 | 70 | 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, | 70 | 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, |
2361 | 71 | 0x78, 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f, 0x34}, | 71 | 0x78, 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f, 0x34}, |
2362 | 72 | {}, | 72 | {}, |
2363 | 73 | false}, | ||
2364 | 74 | |||
2365 | 75 | // A private key with leading zeros (they should not be stripped) | ||
2366 | 76 | {{0x30, 0x67, 0x02, 0x01, 0x00, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86, 0x48, | ||
2367 | 77 | 0xce, 0x3d, 0x02, 0x01, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, | ||
2368 | 78 | 0x47, 0x0f, 0x01, 0x04, 0x4c, 0x30, 0x4a, 0x02, 0x01, 0x01, 0x04, 0x20, | ||
2369 | 79 | 0x00, 0x99, 0xD1, 0x90, 0x60, 0xCF, 0x79, 0xF0, 0x6F, 0x4F, 0x2E, 0x47, | ||
2370 | 80 | 0x97, 0x5B, 0x2A, 0x90, 0x01, 0x6C, 0x94, 0xF4, 0x3D, 0x94, 0x02, 0x57, | ||
2371 | 81 | 0x13, 0xDB, 0xB2, 0xA3, 0xD9, 0x54, 0x0B, 0xE5, 0xa1, 0x23, 0x03, 0x21, | ||
2372 | 82 | 0x05, 0x66, 0xA7, 0x26, 0xE0, 0xFC, 0x83, 0xEF, 0xA2, 0x56, 0xF4, 0xCC, | ||
2373 | 83 | 0xEA, 0x71, 0x07, 0x4D, 0xBB, 0x5C, 0x76, 0x0A, 0x9F, 0xF4, 0x7E, 0x5C, | ||
2374 | 84 | 0x5D, 0x4C, 0xB8, 0xDA, 0x9E, 0x44, 0x60, 0x52, 0x00}, | ||
2375 | 85 | {0x30, 0x39, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, | ||
2376 | 86 | 0x01, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, 0x47, 0x0f, 0x01, | ||
2377 | 87 | 0x03, 0x21, 0x00, 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, 0xd3, | ||
2378 | 88 | 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, | ||
2379 | 89 | 0x78, 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f}, | ||
2380 | 90 | {0xB9, 0x4B, 0x92, 0xEA, 0xDA, 0x64, 0x40, 0xD3, 0x08, 0x63, 0x06, | ||
2381 | 91 | 0x45, 0xF4, 0x4C, 0xCD, 0x19, 0x7B, 0xE6, 0x0A, 0xBC, 0x6C, 0x9D, | ||
2382 | 92 | 0x96, 0x8F, 0x5D, 0x70, 0x44, 0x55, 0xD0, 0x1B, 0xEE, 0x4A}, | ||
2383 | 93 | true}, | ||
2384 | 94 | |||
2385 | 95 | // A private key that's too short | ||
2386 | 96 | {{0x30, 0x66, 0x02, 0x01, 0x00, 0x30, 0x14, 0x06, 0x07, 0x2A, 0x86, 0x48, | ||
2387 | 97 | 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04, 0x01, 0xDA, | ||
2388 | 98 | 0x47, 0x0F, 0x01, 0x04, 0x4B, 0x30, 0x49, 0x02, 0x01, 0x01, 0x04, 0x1F, | ||
2389 | 99 | 0x07, 0x6D, 0x0A, 0x73, 0x18, 0xA5, 0x7D, 0x3C, 0x16, 0xC1, 0x72, 0x51, | ||
2390 | 100 | 0xB2, 0x66, 0x45, 0xDF, 0x4C, 0x2F, 0x87, 0xEB, 0xC0, 0x99, 0x2A, 0xB1, | ||
2391 | 101 | 0x77, 0xFB, 0xA5, 0x1D, 0xB9, 0x2C, 0x2A, 0xA1, 0x23, 0x03, 0x21, 0x00, | ||
2392 | 102 | 0x85, 0x20, 0xF0, 0x09, 0x89, 0x30, 0xA7, 0x54, 0x74, 0x8B, 0x7D, 0xDC, | ||
2393 | 103 | 0xB4, 0x3E, 0xF7, 0x5A, 0x0D, 0xBF, 0x3A, 0x0D, 0x26, 0x38, 0x1A, 0xF4, | ||
2394 | 104 | 0xEB, 0xA4, 0xA9, 0x8E, 0xAA, 0x9B, 0x4E, 0x6A}, | ||
2395 | 105 | {0x30, 0x39, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, | ||
2396 | 106 | 0x01, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, 0x47, 0x0f, 0x01, | ||
2397 | 107 | 0x03, 0x21, 0x00, 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, 0xd3, | ||
2398 | 108 | 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, | ||
2399 | 109 | 0x78, 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f}, | ||
2400 | 110 | {0x4a, 0x5d, 0x9d, 0x5b, 0xa4, 0xce, 0x2d, 0xe1, 0x72, 0x8e, 0x3b, | ||
2401 | 111 | 0xf4, 0x80, 0x35, 0x0f, 0x25, 0xe0, 0x7e, 0x21, 0xc9, 0x47, 0xd1, | ||
2402 | 112 | 0x9e, 0x33, 0x76, 0xf0, 0x9b, 0x3c, 0x1e, 0x16, 0x17, 0x42}, | ||
2403 | 113 | false}, | ||
2404 | 114 | |||
2405 | 115 | // A private key that's too long | ||
2406 | 116 | {{0x30, 0x68, 0x02, 0x01, 0x00, 0x30, 0x14, 0x06, 0x07, 0x2A, 0x86, 0x48, | ||
2407 | 117 | 0xCE, 0x3D, 0x02, 0x01, 0x06, 0x09, 0x2B, 0x06, 0x01, 0x04, 0x01, 0xDA, | ||
2408 | 118 | 0x47, 0x0F, 0x01, 0x04, 0x4D, 0x30, 0x4B, 0x02, 0x01, 0x01, 0x04, 0x21, | ||
2409 | 119 | 0x43, 0x77, 0x07, 0x6D, 0x0A, 0x73, 0x18, 0xA5, 0x7D, 0x3C, 0x16, 0xC1, | ||
2410 | 120 | 0x72, 0x51, 0xB2, 0x66, 0x45, 0xDF, 0x4C, 0x2F, 0x87, 0xEB, 0xC0, 0x99, | ||
2411 | 121 | 0x2A, 0xB1, 0x77, 0xFB, 0xA5, 0x1D, 0xB9, 0x2C, 0x2A, 0xA1, 0x23, 0x03, | ||
2412 | 122 | 0x21, 0x00, 0x85, 0x20, 0xF0, 0x09, 0x89, 0x30, 0xA7, 0x54, 0x74, 0x8B, | ||
2413 | 123 | 0x7D, 0xDC, 0xB4, 0x3E, 0xF7, 0x5A, 0x0D, 0xBF, 0x3A, 0x0D, 0x26, 0x38, | ||
2414 | 124 | 0x1A, 0xF4, 0xEB, 0xA4, 0xA9, 0x8E, 0xAA, 0x9B, 0x4E, 0x6A}, | ||
2415 | 125 | {0x30, 0x39, 0x30, 0x14, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, | ||
2416 | 126 | 0x01, 0x06, 0x09, 0x2b, 0x06, 0x01, 0x04, 0x01, 0xda, 0x47, 0x0f, 0x01, | ||
2417 | 127 | 0x03, 0x21, 0x00, 0xde, 0x9e, 0xdb, 0x7d, 0x7b, 0x7d, 0xc1, 0xb4, 0xd3, | ||
2418 | 128 | 0x5b, 0x61, 0xc2, 0xec, 0xe4, 0x35, 0x37, 0x3f, 0x83, 0x43, 0xc8, 0x5b, | ||
2419 | 129 | 0x78, 0x67, 0x4d, 0xad, 0xfc, 0x7e, 0x14, 0x6f, 0x88, 0x2b, 0x4f}, | ||
2420 | 130 | {0x4a, 0x5d, 0x9d, 0x5b, 0xa4, 0xce, 0x2d, 0xe1, 0x72, 0x8e, 0x3b, | ||
2421 | 131 | 0xf4, 0x80, 0x35, 0x0f, 0x25, 0xe0, 0x7e, 0x21, 0xc9, 0x47, 0xd1, | ||
2422 | 132 | 0x9e, 0x33, 0x76, 0xf0, 0x9b, 0x3c, 0x1e, 0x16, 0x17, 0x42}, | ||
2423 | 73 | false}}; | 133 | false}}; |
2424 | 74 | 134 | ||
2425 | 75 | // Testvectors from project wycheproof | 135 | // Testvectors from project wycheproof |
2426 | diff --git a/nss/gtests/common/testvectors/kw-vectors.h b/nss/gtests/common/testvectors/kw-vectors.h | |||
2427 | 76 | new file mode 100644 | 136 | new file mode 100644 |
2428 | index 0000000..38e641a | |||
2429 | --- /dev/null | |||
2430 | +++ b/nss/gtests/common/testvectors/kw-vectors.h | |||
2431 | @@ -0,0 +1,1940 @@ | |||
2432 | 1 | /* vim: set ts=2 et sw=2 tw=80: */ | ||
2433 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public | ||
2434 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
2435 | 4 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
2436 | 5 | |||
2437 | 6 | #ifndef kw_vectors_h__ | ||
2438 | 7 | #define kw_vectors_h__ | ||
2439 | 8 | |||
2440 | 9 | #include <string> | ||
2441 | 10 | #include <vector> | ||
2442 | 11 | #include <map> | ||
2443 | 12 | |||
2444 | 13 | /* The result struct adds some granularity to what we are testing. | ||
2445 | 14 | * With the single "valid" boolean, we don't know whether the function under | ||
2446 | 15 | * test itself is expected to fail (i.e. return SECFailure), or if we simply | ||
2447 | 16 | * expect the output to differ from what's in the test vector. Therefore, | ||
2448 | 17 | * each vector contains a map of Actions (i.e. NSS capabilities that we wish to | ||
2449 | 18 | * test) mapping to expected Result values (both in terms of return code as | ||
2450 | 19 | * well as whether or not the output should match the test vector). | ||
2451 | 20 | * | ||
2452 | 21 | * - If |output_match| is true, the function under test MUST return the same | ||
2453 | 22 | * data (length and contents). | ||
2454 | 23 | * - If |output_match| is false, the function under test MUST NOT return the | ||
2455 | 24 | * same data (length or contents must be different). | ||
2456 | 25 | */ | ||
2457 | 26 | |||
2458 | 27 | typedef struct Result { | ||
2459 | 28 | SECStatus expect_rv; | ||
2460 | 29 | bool output_match; | ||
2461 | 30 | } Result; | ||
2462 | 31 | |||
2463 | 32 | enum Action { WRAP, UNWRAP }; | ||
2464 | 33 | |||
2465 | 34 | typedef struct keywrap_vector { | ||
2466 | 35 | uint32_t test_id; | ||
2467 | 36 | std::vector<uint8_t> key; | ||
2468 | 37 | std::vector<uint8_t> msg; | ||
2469 | 38 | std::vector<uint8_t> ct; | ||
2470 | 39 | std::map<Action, Result> tests; | ||
2471 | 40 | } keywrap_vector; | ||
2472 | 41 | |||
2473 | 42 | const keywrap_vector kWycheproofAesKWVectors[] = { | ||
2474 | 43 | {1, | ||
2475 | 44 | {0x6f, 0x67, 0x48, 0x6d, 0x1e, 0x91, 0x44, 0x19, 0xcb, 0x43, 0xc2, 0x85, | ||
2476 | 45 | 0x09, 0xc7, 0xc1, 0xea}, | ||
2477 | 46 | {0x8d, 0xc0, 0x63, 0x2d, 0x92, 0xee, 0x0b, 0xe4, 0xf7, 0x40, 0x02, 0x84, | ||
2478 | 47 | 0x10, 0xb0, 0x82, 0x70}, | ||
2479 | 48 | {0x9d, 0xe4, 0x53, 0xce, 0xd5, 0xd4, 0xab, 0x46, 0xa5, 0x60, 0x17, 0x08, | ||
2480 | 49 | 0xee, 0xef, 0xef, 0xb5, 0xe5, 0x93, 0xe6, 0xae, 0x8e, 0x86, 0xb2, 0x6b}, | ||
2481 | 50 | {{Action::WRAP, {SECSuccess, true}}, | ||
2482 | 51 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2483 | 52 | |||
2484 | 53 | {2, | ||
2485 | 54 | {0xa0, 0xb1, 0x71, 0x72, 0xbb, 0x29, 0x6d, 0xb7, 0xf5, 0xc8, 0x69, 0xe9, | ||
2486 | 55 | 0xa3, 0x6b, 0x5c, 0xe3}, | ||
2487 | 56 | {0x61, 0x5d, 0xd0, 0x22, 0xd6, 0x07, 0xc9, 0x10, 0xf2, 0x01, 0x78, 0xcb, | ||
2488 | 57 | 0xdf, 0x42, 0x06, 0x0f}, | ||
2489 | 58 | {0x8c, 0x3a, 0xba, 0x85, 0xcc, 0x0a, 0xe1, 0xae, 0x10, 0xb3, 0x66, 0x58, | ||
2490 | 59 | 0xb0, 0x68, 0xf5, 0x95, 0xba, 0xf8, 0xca, 0xaf, 0xb7, 0x45, 0xef, 0x3c}, | ||
2491 | 60 | {{Action::WRAP, {SECSuccess, true}}, | ||
2492 | 61 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2493 | 62 | |||
2494 | 63 | {3, | ||
2495 | 64 | {0x0e, 0x49, 0xd5, 0x71, 0xc1, 0x9b, 0x52, 0x50, 0xef, 0xfd, 0x41, 0xd9, | ||
2496 | 65 | 0x4b, 0xde, 0x39, 0xd6}, | ||
2497 | 66 | {0xf2, 0x5e, 0x4d, 0xe8, 0xca, 0xca, 0x36, 0x3f, 0xd5, 0xf2, 0x94, 0x42, | ||
2498 | 67 | 0xeb, 0x14, 0x7b, 0x55}, | ||
2499 | 68 | {0x1d, 0xe0, 0x93, 0x65, 0x48, 0x26, 0xf1, 0x8f, 0xcd, 0x0f, 0x3f, 0xd4, | ||
2500 | 69 | 0x99, 0x41, 0x6f, 0xf2, 0x2e, 0xd7, 0x5e, 0xe1, 0x2f, 0xe0, 0xb6, 0x24}, | ||
2501 | 70 | {{Action::WRAP, {SECSuccess, true}}, | ||
2502 | 71 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2503 | 72 | |||
2504 | 73 | {4, // wrapped key is longer than wrapping key | ||
2505 | 74 | {0xe0, 0xe1, 0x29, 0x59, 0x10, 0x91, 0x03, 0xe3, 0x0a, 0xe8, 0xb5, 0x68, | ||
2506 | 75 | 0x4a, 0x22, 0xe6, 0x62}, | ||
2507 | 76 | {0xdb, 0xb0, 0xf2, 0xbb, 0x2b, 0xe9, 0x12, 0xa2, 0x04, 0x30, 0x97, 0x2d, | ||
2508 | 77 | 0x98, 0x42, 0xce, 0x3f, 0xd3, 0xb9, 0x28, 0xe5, 0x73, 0xe1, 0xac, 0x8e}, | ||
2509 | 78 | {0x9c, 0x3d, 0xdc, 0x23, 0x82, 0x7b, 0x7b, 0x3c, 0x13, 0x10, 0x5f, | ||
2510 | 79 | 0x9e, 0x8b, 0x11, 0x52, 0x3b, 0xac, 0xcd, 0xfb, 0x6c, 0x8b, 0x7e, | ||
2511 | 80 | 0x78, 0x25, 0x49, 0x6e, 0x7a, 0x84, 0x0b, 0xd3, 0x2a, 0xec}, | ||
2512 | 81 | {{Action::WRAP, {SECSuccess, true}}, | ||
2513 | 82 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2514 | 83 | |||
2515 | 84 | {5, // wrapped key is longer than wrapping key | ||
2516 | 85 | {0xdd, 0x58, 0x3d, 0x9f, 0x10, 0x59, 0x86, 0x14, 0x30, 0xec, 0x8b, 0x5d, | ||
2517 | 86 | 0x8a, 0x18, 0x0e, 0x9b}, | ||
2518 | 87 | {0xf2, 0xe3, 0x4f, 0x35, 0x63, 0x62, 0xa3, 0x1b, 0x51, 0xd6, 0xe0, 0x2b, | ||
2519 | 88 | 0xcd, 0x33, 0x3c, 0x9e, 0x61, 0x70, 0x49, 0x4c, 0xa5, 0xff, 0x54, 0x87}, | ||
2520 | 89 | {0xaf, 0xb7, 0x44, 0xaa, 0xf7, 0x46, 0xdc, 0xc0, 0xb5, 0x7f, 0x8b, | ||
2521 | 90 | 0x37, 0x8c, 0x40, 0x4c, 0xbe, 0x87, 0x7f, 0x44, 0xcf, 0x3d, 0x45, | ||
2522 | 91 | 0x14, 0x0d, 0x60, 0x81, 0x4e, 0xda, 0x3f, 0x54, 0x1f, 0x01}, | ||
2523 | 92 | {{Action::WRAP, {SECSuccess, true}}, | ||
2524 | 93 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2525 | 94 | |||
2526 | 95 | {6, // wrapped key is longer than wrapping key | ||
2527 | 96 | {0xfa, 0xf5, 0xcc, 0xfa, 0xe4, 0x2b, 0x43, 0xce, 0xe2, 0xc5, 0xf0, 0xf3, | ||
2528 | 97 | 0x17, 0x7a, 0x7c, 0x5d}, | ||
2529 | 98 | {0x4e, 0x02, 0x08, 0x48, 0x33, 0x66, 0x0c, 0x46, 0x38, 0x30, 0x48, 0x3b, | ||
2530 | 99 | 0x36, 0xda, 0xb8, 0x66, 0xc6, 0x4c, 0x8c, 0xf7, 0x42, 0x9c, 0xac, 0x3d}, | ||
2531 | 100 | {0xcf, 0xf9, 0x8c, 0xd6, 0x4c, 0xb5, 0x1a, 0xb9, 0x9b, 0x81, 0xae, | ||
2532 | 101 | 0xe8, 0x2c, 0xee, 0x42, 0x74, 0xd0, 0xdf, 0x3e, 0x1b, 0x6a, 0x49, | ||
2533 | 102 | 0x43, 0xd3, 0x92, 0x36, 0xea, 0x98, 0x98, 0x46, 0xd0, 0xcc}, | ||
2534 | 103 | {{Action::WRAP, {SECSuccess, true}}, | ||
2535 | 104 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2536 | 105 | |||
2537 | 106 | {7, // wrapped key is longer than wrapping key | ||
2538 | 107 | {0xc2, 0xb9, 0xd2, 0x3f, 0x28, 0x31, 0xdd, 0xcd, 0xeb, 0x45, 0x68, 0x53, | ||
2539 | 108 | 0xd4, 0x01, 0x4d, 0xb9}, | ||
2540 | 109 | {0xf4, 0xcf, 0xea, 0x98, 0xe5, 0x8b, 0x93, 0x9c, 0xc8, 0x59, 0x55, | ||
2541 | 110 | 0x43, 0x85, 0xcf, 0x3a, 0x6c, 0x7f, 0x82, 0x17, 0xf7, 0x28, 0xef, | ||
2542 | 111 | 0xb4, 0x31, 0xc9, 0x64, 0x78, 0x6d, 0xe8, 0x27, 0x49, 0x07}, | ||
2543 | 112 | {0x58, 0xdc, 0xfb, 0x0e, 0x7e, 0xc4, 0xd3, 0xbc, 0x80, 0x03, | ||
2544 | 113 | 0x41, 0x8d, 0x86, 0x5f, 0xbd, 0x52, 0x0c, 0x6b, 0x24, 0xb2, | ||
2545 | 114 | 0xbd, 0xe3, 0x5b, 0x1b, 0xe5, 0xb1, 0xc5, 0xff, 0x32, 0xa1, | ||
2546 | 115 | 0x30, 0xf3, 0x3d, 0x03, 0x5e, 0x59, 0x32, 0x61, 0x60, 0x83}, | ||
2547 | 116 | {{Action::WRAP, {SECSuccess, true}}, | ||
2548 | 117 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2549 | 118 | |||
2550 | 119 | {8, // wrapped key is longer than wrapping key | ||
2551 | 120 | {0x62, 0x0a, 0x08, 0xf3, 0x20, 0xcd, 0xed, 0xbf, 0x7a, 0xe5, 0x51, 0xad, | ||
2552 | 121 | 0xd3, 0x48, 0xd9, 0x5e}, | ||
2553 | 122 | {0xce, 0xc3, 0x4e, 0xaf, 0x8e, 0x67, 0xe1, 0xce, 0x61, 0x9d, 0xdf, | ||
2554 | 123 | 0xc3, 0x09, 0x53, 0x1c, 0x42, 0xf1, 0x60, 0x33, 0xa7, 0xe2, 0xcb, | ||
2555 | 124 | 0xc4, 0xf5, 0xeb, 0x3a, 0x54, 0x81, 0x64, 0xe9, 0xb2, 0x91}, | ||
2556 | 125 | {0x4e, 0xe4, 0x7b, 0xd6, 0x8d, 0x41, 0x85, 0x86, 0xc4, 0x47, | ||
2557 | 126 | 0xa3, 0x91, 0x11, 0xe2, 0xec, 0x15, 0x02, 0xff, 0x0f, 0x17, | ||
2558 | 127 | 0x26, 0xea, 0x91, 0xc5, 0xd9, 0x73, 0x70, 0x40, 0x9d, 0x89, | ||
2559 | 128 | 0xb8, 0xe6, 0x6e, 0x88, 0x9b, 0x63, 0x8a, 0xc4, 0x0c, 0xed}, | ||
2560 | 129 | {{Action::WRAP, {SECSuccess, true}}, | ||
2561 | 130 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2562 | 131 | |||
2563 | 132 | {9, // wrapped key is longer than wrapping key | ||
2564 | 133 | {0xed, 0x08, 0x9a, 0xc2, 0x74, 0xf8, 0xc7, 0xce, 0xa2, 0x41, 0x56, 0x71, | ||
2565 | 134 | 0xa9, 0x4b, 0x5e, 0x53}, | ||
2566 | 135 | {0x60, 0x65, 0xe4, 0x1d, 0xf1, 0x4d, 0xae, 0xee, 0xfa, 0xca, 0xc5, | ||
2567 | 136 | 0xda, 0xeb, 0x76, 0x74, 0xcd, 0xc9, 0xc1, 0xf6, 0x86, 0x01, 0x3b, | ||
2568 | 137 | 0x79, 0x71, 0x53, 0xe8, 0x0e, 0xf2, 0x15, 0x89, 0x32, 0x99}, | ||
2569 | 138 | {0xd3, 0xb0, 0x93, 0xfd, 0x82, 0x2c, 0xe4, 0x54, 0xeb, 0xc2, | ||
2570 | 139 | 0x51, 0xc6, 0xf2, 0x1f, 0xa7, 0x1c, 0x38, 0x58, 0xee, 0x7e, | ||
2571 | 140 | 0x62, 0x3e, 0xcb, 0xfb, 0xbf, 0x88, 0x73, 0x98, 0xa3, 0x0b, | ||
2572 | 141 | 0x40, 0xc5, 0x5d, 0x05, 0x65, 0xc7, 0xa1, 0x5e, 0x40, 0x15}, | ||
2573 | 142 | {{Action::WRAP, {SECSuccess, true}}, | ||
2574 | 143 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2575 | 144 | |||
2576 | 145 | {10, // Round counter overflows 256 | ||
2577 | 146 | {0x31, 0xca, 0xcb, 0xb1, 0x7d, 0x6d, 0xbb, 0xec, 0xae, 0x40, 0x72, 0x7c, | ||
2578 | 147 | 0x50, 0x48, 0xfe, 0x0c}, | ||
2579 | 148 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2580 | 149 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2581 | 150 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2582 | 151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2583 | 152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2584 | 153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2585 | 154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2586 | 155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2587 | 156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2588 | 157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2589 | 158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2590 | 159 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2591 | 160 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2592 | 161 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2593 | 162 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2594 | 163 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2595 | 164 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2596 | 165 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2597 | 166 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2598 | 167 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2599 | 168 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2600 | 169 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2601 | 170 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2602 | 171 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2603 | 172 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2604 | 173 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2605 | 174 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2606 | 175 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2607 | 176 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2608 | 177 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2609 | 178 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
2610 | 179 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, | ||
2611 | 180 | {0x22, 0x2d, 0xea, 0xdd, 0xe6, 0xef, 0xb7, 0x60, 0xca, 0xe4, 0x2f, 0xa1, | ||
2612 | 181 | 0x88, 0x31, 0x0e, 0x0c, 0x07, 0xe7, 0xd5, 0x57, 0x52, 0x97, 0x66, 0x44, | ||
2613 | 182 | 0x4a, 0x9e, 0xfb, 0x33, 0x09, 0x07, 0xd4, 0x2f, 0x0d, 0xd8, 0xf3, 0xd1, | ||
2614 | 183 | 0x7b, 0x3a, 0x38, 0xbf, 0x40, 0xd6, 0x8c, 0x09, 0x5a, 0x9c, 0xce, 0x19, | ||
2615 | 184 | 0xda, 0xf9, 0x07, 0xbf, 0x2c, 0x92, 0xf1, 0xe5, 0x9b, 0x18, 0xb2, 0x77, | ||
2616 | 185 | 0xff, 0x03, 0x97, 0xfc, 0x50, 0xf4, 0x5f, 0x58, 0x2d, 0xb9, 0x36, 0xaa, | ||
2617 | 186 | 0x8a, 0xfb, 0x94, 0x3d, 0xe0, 0x1b, 0x58, 0xab, 0xfd, 0xc8, 0x1d, 0xae, | ||
2618 | 187 | 0xf4, 0xe0, 0x38, 0xc9, 0x9e, 0x4c, 0x1e, 0xb3, 0xee, 0x44, 0x74, 0x64, | ||
2619 | 188 | 0xbb, 0x8f, 0x89, 0xa4, 0xea, 0x81, 0xe5, 0x65, 0x56, 0xcc, 0x26, 0xc7, | ||
2620 | 189 | 0x28, 0x83, 0xc0, 0x6a, 0x7f, 0xe8, 0x50, 0xd0, 0x43, 0x47, 0xd6, 0x8b, | ||
2621 | 190 | 0xba, 0xdc, 0x4a, 0x06, 0x77, 0x50, 0x30, 0x67, 0x6d, 0xb8, 0xcc, 0x34, | ||
2622 | 191 | 0xae, 0xb0, 0x7e, 0x39, 0xc7, 0xf0, 0x59, 0xc2, 0xbf, 0xf7, 0x6a, 0x7f, | ||
2623 | 192 | 0x2b, 0xaf, 0x07, 0x67, 0x49, 0x00, 0x4e, 0xf7, 0x18, 0x9f, 0x88, 0x7f, | ||
2624 | 193 | 0x89, 0x02, 0x9f, 0x88, 0xc5, 0xc1, 0xd0, 0xf5, 0xee, 0x62, 0x32, 0x0b, | ||
2625 | 194 | 0x42, 0x30, 0x48, 0xe2, 0xad, 0x81, 0x86, 0xe6, 0x3b, 0xe2, 0x3c, 0x55, | ||
2626 | 195 | 0x3f, 0x55, 0x76, 0xa4, 0x0d, 0x96, 0x7e, 0x8b, 0x52, 0x7c, 0xcd, 0x78, | ||
2627 | 196 | 0x3c, 0x41, 0xab, 0xc6, 0x4b, 0xea, 0x1a, 0xec, 0x8a, 0x76, 0xde, 0xb3, | ||
2628 | 197 | 0xe9, 0xc9, 0xa6, 0x65, 0x67, 0x56, 0xe1, 0xda, 0xc3, 0x8b, 0xd2, 0x5f, | ||
2629 | 198 | 0xf0, 0x08, 0x88, 0x8a, 0x55, 0x91, 0xaf, 0x76, 0x3f, 0xd7, 0x3f, 0x5a, | ||
2630 | 199 | 0xdd, 0xd7, 0x49, 0x79, 0x48, 0x17, 0x07, 0x09, 0x90, 0x48, 0x46, 0x54, | ||
2631 | 200 | 0xa4, 0x6e, 0xf4, 0x42, 0xad, 0xae, 0xac, 0xab, 0x14, 0xd1, 0x2d, 0xaa, | ||
2632 | 201 | 0xf8, 0x7b, 0xcb, 0x91, 0x66, 0x1a, 0x21, 0x59, 0x37, 0x17, 0xd9, 0xb9, | ||
2633 | 202 | 0x35, 0x29, 0xd8, 0x13, 0xea, 0x5f, 0xc8, 0x12, 0xd7, 0x08, 0xc0, 0xd8, | ||
2634 | 203 | 0xe9, 0xb6, 0x81, 0x22, 0xd9, 0xf5, 0xe6, 0x26, 0x7c, 0xde, 0x36, 0x37, | ||
2635 | 204 | 0x80, 0xa4, 0x5d, 0x07, 0xe4, 0xca, 0xa5, 0xbf, 0x14, 0xf2, 0x33, 0x4f, | ||
2636 | 205 | 0x25, 0xb9, 0xd1, 0x77, 0x63, 0x2b, 0xb8, 0x0a, 0x82, 0x89, 0x4a, 0xa4, | ||
2637 | 206 | 0x7b, 0x6f, 0x36, 0x0b, 0x2d, 0xa1, 0x13, 0x8d, 0xed, 0xd4, 0x33, 0x1f, | ||
2638 | 207 | 0x07, 0x7c, 0x90, 0x05, 0x54, 0xc7, 0xa6, 0x8b, 0x5d, 0x15, 0x49, 0x80, | ||
2639 | 208 | 0xbb, 0x35, 0x17, 0xac, 0x20, 0xa7, 0x8a, 0x51, 0xf6, 0xf2, 0x1e, 0x42, | ||
2640 | 209 | 0xb2, 0xc4, 0xc9, 0x60, 0xd3, 0x1c, 0xbd, 0x22, 0xbd, 0x61, 0x08, 0x19, | ||
2641 | 210 | 0x18, 0x2c, 0x5e, 0x45, 0x6b, 0xa7, 0xd7, 0xe9, 0x03, 0xf5, 0xe6, 0x0f, | ||
2642 | 211 | 0x6e, 0x0c, 0x4c, 0xc0, 0x14, 0xfe, 0xb4, 0xf8, 0x19, 0x73, 0xce, 0x48, | ||
2643 | 212 | 0xad, 0x6f, 0x4d, 0xab, 0x8d, 0xa5, 0x1e, 0xb7}, | ||
2644 | 213 | {{Action::WRAP, {SECSuccess, true}}, | ||
2645 | 214 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2646 | 215 | |||
2647 | 216 | {11, // empty keys cannot be wrapped | ||
2648 | 217 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2649 | 218 | 0xa7, 0xda, 0x64, 0x95}, | ||
2650 | 219 | {}, | ||
2651 | 220 | {0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6}, | ||
2652 | 221 | {{Action::WRAP, {SECFailure, false}}, | ||
2653 | 222 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2654 | 223 | |||
2655 | 224 | {12, // keys of size 8 byte cannot be wrapped | ||
2656 | 225 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2657 | 226 | 0xa7, 0xda, 0x64, 0x95}, | ||
2658 | 227 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, | ||
2659 | 228 | {0xdc, 0x26, 0xfb, 0x69, 0x11, 0xd7, 0x19, 0x71, 0xdf, 0x03, 0x56, 0xd6, | ||
2660 | 229 | 0xbb, 0x9e, 0xd6, 0xe6}, | ||
2661 | 230 | {{Action::WRAP, {SECFailure, false}}, | ||
2662 | 231 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2663 | 232 | |||
2664 | 233 | {13, // wrapped key size must be divisible by 8 | ||
2665 | 234 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2666 | 235 | 0xa7, 0xda, 0x64, 0x95}, | ||
2667 | 236 | {0x00}, | ||
2668 | 237 | {}, | ||
2669 | 238 | {{Action::WRAP, {SECFailure, false}}, | ||
2670 | 239 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2671 | 240 | |||
2672 | 241 | {14, // wrapped key size must be divisible by 8 | ||
2673 | 242 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2674 | 243 | 0xa7, 0xda, 0x64, 0x95}, | ||
2675 | 244 | {0x00, 0x01}, | ||
2676 | 245 | {}, | ||
2677 | 246 | {{Action::WRAP, {SECFailure, false}}, | ||
2678 | 247 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2679 | 248 | |||
2680 | 249 | {15, // wrapped key size must be divisible by 8 | ||
2681 | 250 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2682 | 251 | 0xa7, 0xda, 0x64, 0x95}, | ||
2683 | 252 | {0x00, 0x01, 0x02}, | ||
2684 | 253 | {}, | ||
2685 | 254 | {{Action::WRAP, {SECFailure, false}}, | ||
2686 | 255 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2687 | 256 | |||
2688 | 257 | {16, // wrapped key size must be divisible by 8 | ||
2689 | 258 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2690 | 259 | 0xa7, 0xda, 0x64, 0x95}, | ||
2691 | 260 | {0x00, 0x01, 0x02, 0x03}, | ||
2692 | 261 | {}, | ||
2693 | 262 | {{Action::WRAP, {SECFailure, false}}, | ||
2694 | 263 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2695 | 264 | |||
2696 | 265 | {17, // wrapped key size must be divisible by 8 | ||
2697 | 266 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2698 | 267 | 0xa7, 0xda, 0x64, 0x95}, | ||
2699 | 268 | {0x00, 0x01, 0x02, 0x03, 0x04}, | ||
2700 | 269 | {}, | ||
2701 | 270 | {{Action::WRAP, {SECFailure, false}}, | ||
2702 | 271 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2703 | 272 | |||
2704 | 273 | {18, // wrapped key size must be divisible by 8 | ||
2705 | 274 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2706 | 275 | 0xa7, 0xda, 0x64, 0x95}, | ||
2707 | 276 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05}, | ||
2708 | 277 | {}, | ||
2709 | 278 | {{Action::WRAP, {SECFailure, false}}}}, | ||
2710 | 279 | |||
2711 | 280 | {19, // wrapped key size must be divisible by 8 | ||
2712 | 281 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2713 | 282 | 0xa7, 0xda, 0x64, 0x95}, | ||
2714 | 283 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06}, | ||
2715 | 284 | {}, | ||
2716 | 285 | {{Action::WRAP, {SECFailure, false}}, | ||
2717 | 286 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2718 | 287 | |||
2719 | 288 | {20, // wrapped key size must be divisible by 8 | ||
2720 | 289 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
2721 | 290 | 0xa7, 0xda, 0x64, 0x95}, | ||
2722 | 291 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, | ||
2723 | 292 | 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13}, | ||
2724 | 293 | {}, | ||
2725 | 294 | {{Action::WRAP, {SECFailure, false}}, | ||
2726 | 295 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2727 | 296 | |||
2728 | 297 | {21, // invalid size of wrapped key | ||
2729 | 298 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2730 | 299 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2731 | 300 | {}, | ||
2732 | 301 | {}, | ||
2733 | 302 | {{Action::WRAP, {SECFailure, false}}, | ||
2734 | 303 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2735 | 304 | |||
2736 | 305 | {22, // invalid size of wrapped key | ||
2737 | 306 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2738 | 307 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2739 | 308 | {}, | ||
2740 | 309 | {0x9f}, | ||
2741 | 310 | {{Action::WRAP, {SECFailure, false}}, | ||
2742 | 311 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2743 | 312 | |||
2744 | 313 | {23, // invalid size of wrapped key | ||
2745 | 314 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2746 | 315 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2747 | 316 | {}, | ||
2748 | 317 | {0xdc, 0x9e, 0x95, 0x80}, | ||
2749 | 318 | {{Action::WRAP, {SECFailure, false}}, | ||
2750 | 319 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2751 | 320 | |||
2752 | 321 | {24, // invalid size of wrapped key | ||
2753 | 322 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2754 | 323 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2755 | 324 | {}, | ||
2756 | 325 | {0xb9, 0xb2, 0x82, 0xd1, 0x38, 0x69, 0x30, 0x00}, | ||
2757 | 326 | {{Action::WRAP, {SECFailure, false}}, | ||
2758 | 327 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2759 | 328 | |||
2760 | 329 | {25, // invalid size of wrapped key | ||
2761 | 330 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2762 | 331 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2763 | 332 | {}, | ||
2764 | 333 | {0x0e, 0xfc, 0x63, 0x5b, 0x2d, 0x61, 0xe2, 0x44, 0x05, 0x6b, 0x9d, 0x45, | ||
2765 | 334 | 0x91, 0xca, 0x6b}, | ||
2766 | 335 | {{Action::WRAP, {SECFailure, false}}, | ||
2767 | 336 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2768 | 337 | |||
2769 | 338 | {26, // invalid size of wrapped key | ||
2770 | 339 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2771 | 340 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2772 | 341 | {}, | ||
2773 | 342 | {0x4a, 0x30, 0x5d, 0xae, 0x08, 0x7b, 0x0d, 0x24, 0xd6, 0x2a, 0xf4, 0x18, | ||
2774 | 343 | 0x31, 0x33, 0x8f, 0x33, 0xae}, | ||
2775 | 344 | {{Action::WRAP, {SECFailure, false}}, | ||
2776 | 345 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2777 | 346 | |||
2778 | 347 | {27, // invalid size of wrapped key | ||
2779 | 348 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2780 | 349 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2781 | 350 | {}, | ||
2782 | 351 | {0x82, 0xcb, 0x92, 0x70, 0x97, 0xcf, 0x31, 0xea, 0x4a, 0xff, | ||
2783 | 352 | 0xea, 0x44, 0x0b, 0x0d, 0x8c, 0xa6, 0xa2, 0x40, 0xb9, 0x00}, | ||
2784 | 353 | {{Action::WRAP, {SECFailure, false}}, | ||
2785 | 354 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2786 | 355 | |||
2787 | 356 | {28, // bytes appended to wrapped key | ||
2788 | 357 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2789 | 358 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2790 | 359 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
2791 | 360 | 0x0c, 0x0d, 0x0e, 0x0f}, | ||
2792 | 361 | {0x97, 0x90, 0xab, 0x51, 0xfb, 0xcb, 0x85, 0x0d, 0xf6, 0x76, 0x4e, 0x01, | ||
2793 | 362 | 0x1a, 0xe9, 0x7c, 0x85, 0x78, 0x5b, 0xed, 0x26, 0x33, 0xae, 0xa6, 0x65}, | ||
2794 | 363 | {{Action::WRAP, {SECSuccess, true}}, | ||
2795 | 364 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2796 | 365 | |||
2797 | 366 | {28, // Bytes appended to wrapped key | ||
2798 | 367 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
2799 | 368 | 0xe8, 0x21, 0x82, 0xf7}, | ||
2800 | 369 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
2801 | 370 | 0x0c, 0x0d, 0x0e, 0x0f}, | ||
2802 | 371 | {0x97, 0x90, 0xab, 0x51, 0xfb, 0xcb, 0x85, 0x0d, 0xf6, | ||
2803 | 372 | 0x76, 0x4e, 0x01, 0x1a, 0xe9, 0x7c, 0x85, 0x78, 0x5b, | ||
2804 | 373 | 0xed, 0x26, 0x33, 0xae, 0xa6, 0x65, 0x00}, | ||
2805 | 374 | {{Action::UNWRAP, {SECFailure, false}}}}, | ||
2806 | 375 | |||
2807 | 376 | {29, // Incorrect IV | ||
2808 | 377 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2809 | 378 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2810 | 379 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2811 | 380 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2812 | 381 | {0x0a, 0xac, 0x32, 0x9c, 0xcd, 0x51, 0x3e, 0xdb, 0xdd, 0x63, 0x67, 0xdf, | ||
2813 | 382 | 0x67, 0x99, 0x9e, 0xaa, 0xc9, 0xe7, 0xb5, 0x19, 0x84, 0xc4, 0xd3, 0x8d}, | ||
2814 | 383 | {{Action::WRAP, {SECSuccess, false}}, | ||
2815 | 384 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2816 | 385 | |||
2817 | 386 | {30, // Incorrect IV | ||
2818 | 387 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2819 | 388 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2820 | 389 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2821 | 390 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2822 | 391 | {0x5a, 0x55, 0xdc, 0x42, 0x97, 0x49, 0xca, 0x49, 0xbb, 0x4a, 0xb0, 0x1d, | ||
2823 | 392 | 0x96, 0x6b, 0x19, 0xea, 0x9a, 0x9e, 0x14, 0x02, 0xe6, 0xab, 0x29, 0x62}, | ||
2824 | 393 | {{Action::WRAP, {SECSuccess, false}}, | ||
2825 | 394 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2826 | 395 | |||
2827 | 396 | {31, // Incorrect IV | ||
2828 | 397 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2829 | 398 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2830 | 399 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2831 | 400 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2832 | 401 | {0x45, 0xf5, 0x33, 0xf6, 0x07, 0x2f, 0x64, 0x0e, 0xb7, 0xe1, 0xe5, 0x12, | ||
2833 | 402 | 0xd5, 0x60, 0x72, 0x08, 0x55, 0x67, 0xf4, 0xad, 0x60, 0x12, 0xa9, 0x7a}, | ||
2834 | 403 | {{Action::WRAP, {SECSuccess, false}}, | ||
2835 | 404 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2836 | 405 | |||
2837 | 406 | {32, // Incorrect IV | ||
2838 | 407 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2839 | 408 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2840 | 409 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2841 | 410 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2842 | 411 | {0x84, 0xf2, 0x84, 0x56, 0x5d, 0xf4, 0x7c, 0x40, 0x91, 0x07, 0xf7, 0xa0, | ||
2843 | 412 | 0xa7, 0x1b, 0xc3, 0x70, 0xa8, 0xed, 0x44, 0x89, 0xd4, 0x14, 0xb9, 0xe9}, | ||
2844 | 413 | {{Action::WRAP, {SECSuccess, false}}, | ||
2845 | 414 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2846 | 415 | |||
2847 | 416 | {33, // Incorrect IV | ||
2848 | 417 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2849 | 418 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2850 | 419 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2851 | 420 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2852 | 421 | {0x39, 0x41, 0xc3, 0x66, 0x55, 0x4f, 0xc8, 0x96, 0xe9, 0xfe, 0x52, 0xf0, | ||
2853 | 422 | 0x24, 0x93, 0xca, 0x03, 0xd4, 0x39, 0xeb, 0x17, 0xc2, 0x36, 0x14, 0x6d}, | ||
2854 | 423 | {{Action::WRAP, {SECSuccess, false}}, | ||
2855 | 424 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2856 | 425 | |||
2857 | 426 | {34, // Incorrect IV | ||
2858 | 427 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2859 | 428 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2860 | 429 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2861 | 430 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2862 | 431 | {0x45, 0xc9, 0xd4, 0x23, 0x63, 0xd9, 0x81, 0xd0, 0x86, 0xa9, 0x72, 0x72, | ||
2863 | 432 | 0x8e, 0x13, 0x0a, 0x42, 0xf5, 0xdd, 0x90, 0xbd, 0xa5, 0x62, 0xa8, 0x5a}, | ||
2864 | 433 | {{Action::WRAP, {SECSuccess, false}}, | ||
2865 | 434 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2866 | 435 | |||
2867 | 436 | {35, // Incorrect IV | ||
2868 | 437 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2869 | 438 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2870 | 439 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2871 | 440 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2872 | 441 | {0x03, 0x7d, 0x17, 0x85, 0x95, 0x19, 0xd6, 0xc0, 0x72, 0x8a, 0x9e, 0xb6, | ||
2873 | 442 | 0xe6, 0x41, 0x13, 0xe8, 0x69, 0x19, 0xde, 0xca, 0xbd, 0x3b, 0xbb, 0x88}, | ||
2874 | 443 | {{Action::WRAP, {SECSuccess, false}}, | ||
2875 | 444 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2876 | 445 | |||
2877 | 446 | {36, // Incorrect IV | ||
2878 | 447 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2879 | 448 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2880 | 449 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2881 | 450 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2882 | 451 | {0x1a, 0xd1, 0x0a, 0xf7, 0xf6, 0xc0, 0x42, 0xb2, 0x67, 0xa0, 0xc7, 0xbc, | ||
2883 | 452 | 0x4d, 0x25, 0xd2, 0x7c, 0x00, 0x3d, 0xeb, 0x50, 0xe2, 0xcc, 0x56, 0x6a}, | ||
2884 | 453 | {{Action::WRAP, {SECSuccess, false}}, | ||
2885 | 454 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2886 | 455 | |||
2887 | 456 | {37, // Incorrect IV | ||
2888 | 457 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2889 | 458 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2890 | 459 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2891 | 460 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2892 | 461 | {0x63, 0x0c, 0x57, 0x1b, 0x7f, 0xb8, 0x64, 0x7a, 0xc5, 0x36, 0x0a, 0x25, | ||
2893 | 462 | 0x5f, 0x9f, 0x5d, 0x36, 0x45, 0x79, 0x5a, 0xc4, 0x52, 0x85, 0xcb, 0xaa}, | ||
2894 | 463 | {{Action::WRAP, {SECSuccess, false}}, | ||
2895 | 464 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2896 | 465 | |||
2897 | 466 | {38, // Incorrect IV | ||
2898 | 467 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2899 | 468 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2900 | 469 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2901 | 470 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2902 | 471 | {0x16, 0xdb, 0x55, 0x3e, 0x46, 0x7d, 0x40, 0x29, 0xd0, 0xfe, 0xa6, 0x2b, | ||
2903 | 472 | 0x2c, 0x44, 0x0e, 0x5d, 0xf6, 0xc6, 0x59, 0x1f, 0x04, 0x97, 0xa9, 0x9d}, | ||
2904 | 473 | {{Action::WRAP, {SECSuccess, false}}, | ||
2905 | 474 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2906 | 475 | |||
2907 | 476 | {39, // Incorrect IV | ||
2908 | 477 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2909 | 478 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2910 | 479 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2911 | 480 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2912 | 481 | {0x09, 0x79, 0x91, 0x09, 0x0a, 0x15, 0x60, 0x47, 0xd4, 0x78, 0x4b, 0x75, | ||
2913 | 482 | 0x7f, 0x26, 0x2e, 0x12, 0xce, 0x57, 0xe1, 0x3a, 0x3d, 0x5d, 0x28, 0x6c}, | ||
2914 | 483 | {{Action::WRAP, {SECSuccess, false}}, | ||
2915 | 484 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2916 | 485 | |||
2917 | 486 | {40, // Incorrect IV | ||
2918 | 487 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
2919 | 488 | 0x52, 0xfa, 0x8b, 0xc1}, | ||
2920 | 489 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
2921 | 490 | 0x01, 0xd0, 0x70, 0xa5}, | ||
2922 | 491 | {0x39, 0x57, 0xc3, 0x38, 0xb7, 0x50, 0xa3, 0x28, 0x5e, 0xb7, 0xb6, 0x5c, | ||
2923 | 492 | 0x9c, 0xfe, 0x77, 0x05, 0x3d, 0xd7, 0xd8, 0x14, 0x9f, 0x42, 0xca, 0xa1}, | ||
2924 | 493 | {{Action::WRAP, {SECSuccess, false}}, | ||
2925 | 494 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
2926 | 495 | |||
2927 | 496 | {41, // RFC 3394 | ||
2928 | 497 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
2929 | 498 | 0x0c, 0x0d, 0x0e, 0x0f}, | ||
2930 | 499 | {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, | ||
2931 | 500 | 0xcc, 0xdd, 0xee, 0xff}, | ||
2932 | 501 | {0x1f, 0xa6, 0x8b, 0x0a, 0x81, 0x12, 0xb4, 0x47, 0xae, 0xf3, 0x4b, 0xd8, | ||
2933 | 502 | 0xfb, 0x5a, 0x7b, 0x82, 0x9d, 0x3e, 0x86, 0x23, 0x71, 0xd2, 0xcf, 0xe5}, | ||
2934 | 503 | {{Action::WRAP, {SECSuccess, true}}, | ||
2935 | 504 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2936 | 505 | |||
2937 | 506 | {42, | ||
2938 | 507 | {0xf7, 0x5a, 0x2f, 0x49, 0xa6, 0x30, 0xc7, 0xdc, 0x91, 0x62, 0x6b, 0x00, | ||
2939 | 508 | 0xce, 0x02, 0x9f, 0x0b, 0xd2, 0x98, 0x1d, 0x7c, 0x74, 0xa9, 0x3e, 0xbe}, | ||
2940 | 509 | {0x9a, 0xdb, 0xc0, 0x0c, 0x71, 0x0b, 0x11, 0x01, 0xbd, 0xf6, 0xa4, 0xed, | ||
2941 | 510 | 0x65, 0xb3, 0x2d, 0x72}, | ||
2942 | 511 | {0x00, 0xbe, 0x1c, 0xad, 0xdf, 0xd5, 0xad, 0x76, 0x97, 0x87, 0x70, 0x17, | ||
2943 | 512 | 0x79, 0x5f, 0x9c, 0xee, 0x4b, 0xce, 0x5a, 0x61, 0x68, 0x7a, 0x61, 0x26}, | ||
2944 | 513 | {{Action::WRAP, {SECSuccess, true}}, | ||
2945 | 514 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2946 | 515 | |||
2947 | 516 | {43, | ||
2948 | 517 | {0xb7, 0x13, 0xf6, 0xb7, 0x81, 0x4f, 0x98, 0x89, 0x4d, 0x7b, 0x15, 0x39, | ||
2949 | 518 | 0x74, 0x68, 0x43, 0x59, 0xf1, 0x46, 0x02, 0x13, 0xeb, 0x74, 0xbe, 0x68}, | ||
2950 | 519 | {0x78, 0x58, 0x5f, 0x0c, 0x49, 0x92, 0x2e, 0x82, 0xca, 0xf1, 0x7e, 0xbc, | ||
2951 | 520 | 0x37, 0x21, 0xb4, 0xdb}, | ||
2952 | 521 | {0x54, 0xe7, 0xf2, 0x78, 0xb5, 0xa1, 0xfb, 0x4c, 0x31, 0xa0, 0xd7, 0x9a, | ||
2953 | 522 | 0xc1, 0xf6, 0x15, 0xed, 0xd9, 0x10, 0xbf, 0x22, 0x01, 0x5a, 0x06, 0x68}, | ||
2954 | 523 | {{Action::WRAP, {SECSuccess, true}}, | ||
2955 | 524 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2956 | 525 | |||
2957 | 526 | {44, | ||
2958 | 527 | {0x13, 0xec, 0xf4, 0x23, 0x21, 0x1c, 0xaa, 0x33, 0x4b, 0xa6, 0xdb, 0x37, | ||
2959 | 528 | 0x25, 0x9a, 0x53, 0x5c, 0x20, 0xde, 0x8a, 0xd1, 0x0f, 0xc8, 0xc4, 0x32}, | ||
2960 | 529 | {0x4f, 0xc7, 0x5d, 0x0f, 0x22, 0x1e, 0x22, 0x40, 0x8a, 0x37, 0xe1, 0x12, | ||
2961 | 530 | 0x65, 0xd4, 0x9a, 0x05}, | ||
2962 | 531 | {0x51, 0x04, 0x55, 0xbd, 0x9c, 0x07, 0x8a, 0xc1, 0xf0, 0x7b, 0xb3, 0x75, | ||
2963 | 532 | 0x2c, 0xbd, 0x04, 0xe4, 0x21, 0xb0, 0xdd, 0x63, 0x51, 0x90, 0xfa, 0x62}, | ||
2964 | 533 | {{Action::WRAP, {SECSuccess, true}}, | ||
2965 | 534 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2966 | 535 | |||
2967 | 536 | {45, | ||
2968 | 537 | {0x44, 0x17, 0xfb, 0xbe, 0xa5, 0x1b, 0xdd, 0x91, 0x81, 0x8d, 0x74, 0x05, | ||
2969 | 538 | 0x19, 0x57, 0xdd, 0x70, 0xe1, 0x35, 0xc5, 0xcf, 0x37, 0x32, 0xbd, 0xf1}, | ||
2970 | 539 | {0xf5, 0x35, 0x7d, 0xa9, 0xf8, 0xfd, 0x4a, 0x11, 0x90, 0xf3, 0x6e, 0x9f, | ||
2971 | 540 | 0xa0, 0x9a, 0x90, 0xfc, 0xf1, 0x4d, 0x87, 0xd6, 0x23, 0x32, 0xf1, 0xa5}, | ||
2972 | 541 | {0x88, 0x0d, 0xa5, 0xb4, 0x10, 0xf9, 0x13, 0xad, 0x72, 0xcc, 0x93, | ||
2973 | 542 | 0xf4, 0x63, 0x44, 0xf1, 0x15, 0x21, 0x65, 0xbd, 0xea, 0x14, 0x66, | ||
2974 | 543 | 0x4f, 0xd2, 0xd3, 0xaf, 0xbd, 0x87, 0xb8, 0xcc, 0x5c, 0xfd}, | ||
2975 | 544 | {{Action::WRAP, {SECSuccess, true}}, | ||
2976 | 545 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2977 | 546 | |||
2978 | 547 | {46, | ||
2979 | 548 | {0xb3, 0xf2, 0x6d, 0x8a, 0x22, 0xfd, 0xd6, 0x1f, 0x70, 0x98, 0x41, 0x23, | ||
2980 | 549 | 0x1f, 0xbd, 0xe6, 0x95, 0xb3, 0xf2, 0x8d, 0xdd, 0xce, 0xd6, 0xd4, 0x1e}, | ||
2981 | 550 | {0x0d, 0x0a, 0xf9, 0x55, 0xd2, 0xe3, 0x82, 0x9c, 0xc3, 0xd6, 0x43, 0x21, | ||
2982 | 551 | 0x9b, 0x30, 0x1e, 0x64, 0xe0, 0x51, 0x0d, 0xfb, 0xc4, 0x28, 0x11, 0x9a}, | ||
2983 | 552 | {0x27, 0x65, 0x4c, 0xf6, 0xa6, 0x3d, 0x60, 0x04, 0xae, 0x83, 0xda, | ||
2984 | 553 | 0x54, 0xc2, 0xe5, 0xd7, 0xb5, 0xfa, 0xd2, 0x08, 0x78, 0xf3, 0x50, | ||
2985 | 554 | 0x08, 0x7d, 0xdd, 0x17, 0xac, 0x44, 0xa2, 0xbe, 0x86, 0x8f}, | ||
2986 | 555 | {{Action::WRAP, {SECSuccess, true}}, | ||
2987 | 556 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2988 | 557 | |||
2989 | 558 | {47, | ||
2990 | 559 | {0xf7, 0x0c, 0xfb, 0x26, 0x2c, 0x72, 0x9a, 0x18, 0x20, 0x6c, 0x8a, 0xfd, | ||
2991 | 560 | 0x74, 0x35, 0x6e, 0xc7, 0xe0, 0x49, 0xd1, 0x0b, 0x44, 0xa6, 0xe0, 0x00}, | ||
2992 | 561 | {0x24, 0x1c, 0xed, 0xfa, 0x64, 0xc4, 0xe7, 0xbe, 0xc5, 0x41, 0xa2, 0xeb, | ||
2993 | 562 | 0x4c, 0x36, 0x82, 0x69, 0xe0, 0xf0, 0xdd, 0xeb, 0xc5, 0x82, 0x67, 0xea}, | ||
2994 | 563 | {0xad, 0x7c, 0xa6, 0x6a, 0xd4, 0x66, 0x4f, 0x43, 0xe4, 0xdd, 0x09, | ||
2995 | 564 | 0x29, 0x6a, 0x6e, 0x6f, 0x02, 0xd5, 0xaf, 0x44, 0x08, 0xf2, 0x25, | ||
2996 | 565 | 0xc0, 0xab, 0xeb, 0x0d, 0x9b, 0x76, 0xc8, 0xd1, 0xe9, 0x82}, | ||
2997 | 566 | {{Action::WRAP, {SECSuccess, true}}, | ||
2998 | 567 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
2999 | 568 | |||
3000 | 569 | {48, // wrapped key is longer than wrapping key | ||
3001 | 570 | {0x16, 0x39, 0xf9, 0xf8, 0x1e, 0x53, 0xe2, 0xee, 0xb6, 0x77, 0xa2, 0x49, | ||
3002 | 571 | 0xe5, 0xec, 0xed, 0x3a, 0xf1, 0x08, 0x97, 0x13, 0x01, 0x60, 0x1a, 0x7b}, | ||
3003 | 572 | {0xec, 0x3c, 0x6a, 0x1f, 0x1a, 0x95, 0x85, 0x32, 0x7f, 0xe6, 0x58, | ||
3004 | 573 | 0x49, 0x0c, 0x74, 0x63, 0x5e, 0x53, 0x00, 0x87, 0x6d, 0xa5, 0x84, | ||
3005 | 574 | 0x6a, 0x62, 0x93, 0x98, 0x98, 0x4f, 0xb5, 0x51, 0xd6, 0x91}, | ||
3006 | 575 | {0xe2, 0x45, 0xc9, 0x0a, 0x6b, 0x46, 0xca, 0xec, 0xe9, 0x4f, | ||
3007 | 576 | 0x47, 0x11, 0x7d, 0x60, 0x83, 0x31, 0x95, 0x8c, 0x8f, 0x75, | ||
3008 | 577 | 0xf5, 0x31, 0xeb, 0xcd, 0xc9, 0x02, 0xc0, 0x21, 0x3d, 0x91, | ||
3009 | 578 | 0x05, 0xf2, 0x15, 0x5a, 0xf0, 0x7d, 0xaa, 0x62, 0xd1, 0x32}, | ||
3010 | 579 | {{Action::WRAP, {SECSuccess, true}}, | ||
3011 | 580 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3012 | 581 | |||
3013 | 582 | {49, // wrapped key is longer than wrapping key | ||
3014 | 583 | {0x1f, 0x22, 0xd5, 0x65, 0x8a, 0xa6, 0x85, 0xb8, 0xba, 0x86, 0x59, 0xdc, | ||
3015 | 584 | 0x34, 0x28, 0x80, 0xd5, 0xb2, 0x39, 0x9e, 0x6a, 0x81, 0x50, 0x05, 0xb0}, | ||
3016 | 585 | {0x50, 0xbe, 0x4c, 0x1b, 0x2f, 0x29, 0xa6, 0x3f, 0x44, 0xd7, 0xfc, | ||
3017 | 586 | 0x63, 0x73, 0x7f, 0x60, 0x0f, 0x01, 0x94, 0xea, 0x3f, 0xb3, 0x6e, | ||
3018 | 587 | 0x17, 0x3d, 0x2d, 0xdd, 0x19, 0xf2, 0x18, 0x65, 0x63, 0x80}, | ||
3019 | 588 | {0x8a, 0x32, 0xb9, 0xf2, 0x07, 0xae, 0x5a, 0xae, 0xdb, 0x7e, | ||
3020 | 589 | 0x8a, 0x0d, 0x94, 0x51, 0x07, 0x41, 0x2c, 0x1b, 0xd0, 0x69, | ||
3021 | 590 | 0x99, 0xbc, 0x5a, 0xc8, 0x3c, 0x1f, 0x95, 0x8d, 0xfb, 0x77, | ||
3022 | 591 | 0xeb, 0xdc, 0xf9, 0xd9, 0x8c, 0x60, 0xdb, 0xd4, 0x65, 0x0a}, | ||
3023 | 592 | {{Action::WRAP, {SECSuccess, true}}, | ||
3024 | 593 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3025 | 594 | |||
3026 | 595 | {50, // wrapped key is longer than wrapping key | ||
3027 | 596 | {0x3a, 0x2f, 0x4a, 0xa5, 0x04, 0x41, 0x95, 0x4b, 0xba, 0x5a, 0x18, 0x36, | ||
3028 | 597 | 0x29, 0x4c, 0xe0, 0x71, 0xf9, 0x29, 0x6b, 0x23, 0xdb, 0xed, 0x67, 0x71}, | ||
3029 | 598 | {0x65, 0xda, 0x02, 0xff, 0x21, 0xb4, 0x83, 0xa1, 0xe3, 0x95, 0x75, | ||
3030 | 599 | 0x49, 0x0b, 0x43, 0x19, 0xe8, 0x4a, 0xe0, 0x29, 0x9f, 0x1f, 0x00, | ||
3031 | 600 | 0xb3, 0x85, 0x9f, 0xbe, 0x2e, 0x74, 0xb3, 0xec, 0x2a, 0xaf}, | ||
3032 | 601 | {0x4a, 0x58, 0x42, 0xb1, 0x0d, 0x2d, 0xb9, 0x6e, 0xa1, 0x03, | ||
3033 | 602 | 0x9e, 0xf4, 0x78, 0x5c, 0xe7, 0x22, 0x55, 0x5b, 0x37, 0x51, | ||
3034 | 603 | 0xa9, 0xb6, 0xdd, 0x39, 0x12, 0x6a, 0xd3, 0x63, 0x37, 0x8c, | ||
3035 | 604 | 0x72, 0x32, 0x0d, 0x83, 0xea, 0x7a, 0xdb, 0x81, 0x61, 0x5a}, | ||
3036 | 605 | {{Action::WRAP, {SECSuccess, true}}, | ||
3037 | 606 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3038 | 607 | |||
3039 | 608 | {51, // Round counter overflows 256 | ||
3040 | 609 | {0x31, 0xca, 0xcb, 0xb1, 0x7d, 0x6d, 0xbb, 0xec, 0xae, 0x40, 0x72, 0x7c, | ||
3041 | 610 | 0x50, 0x48, 0xfe, 0x0c, 0x01, 0xbc, 0x53, 0xb2, 0x3a, 0xb6, 0x35, 0x02}, | ||
3042 | 611 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3043 | 612 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3044 | 613 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3045 | 614 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3046 | 615 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3047 | 616 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3048 | 617 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3049 | 618 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3050 | 619 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3051 | 620 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3052 | 621 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3053 | 622 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3054 | 623 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3055 | 624 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3056 | 625 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3057 | 626 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3058 | 627 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3059 | 628 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3060 | 629 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3061 | 630 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3062 | 631 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3063 | 632 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3064 | 633 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3065 | 634 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3066 | 635 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3067 | 636 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3068 | 637 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3069 | 638 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3070 | 639 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3071 | 640 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3072 | 641 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3073 | 642 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, | ||
3074 | 643 | {0xe2, 0x19, 0x25, 0x98, 0xe6, 0x12, 0x4f, 0x27, 0x91, 0xb2, 0x75, 0x1f, | ||
3075 | 644 | 0x93, 0x09, 0x58, 0x43, 0x5b, 0xb1, 0xd0, 0x2e, 0x98, 0xaa, 0x1e, 0x09, | ||
3076 | 645 | 0x78, 0x1b, 0xba, 0x0b, 0x15, 0x94, 0x35, 0xdb, 0x65, 0x9f, 0xa7, 0x3f, | ||
3077 | 646 | 0xa3, 0x10, 0x11, 0x17, 0x04, 0x69, 0x2c, 0x68, 0xe1, 0x6d, 0xdf, 0x4b, | ||
3078 | 647 | 0xe0, 0x60, 0x22, 0xc5, 0x2f, 0xe9, 0xdb, 0xa6, 0x27, 0x9a, 0xad, 0x1a, | ||
3079 | 648 | 0xeb, 0x81, 0x41, 0x25, 0xd0, 0xdd, 0xf3, 0x3f, 0x31, 0xe5, 0x8e, 0x62, | ||
3080 | 649 | 0x5a, 0xf3, 0x23, 0x05, 0x05, 0x0c, 0xfe, 0xa3, 0x90, 0xd8, 0x78, 0x2d, | ||
3081 | 650 | 0x32, 0xca, 0xac, 0x55, 0x88, 0x89, 0xca, 0x8e, 0x64, 0x19, 0x08, 0x20, | ||
3082 | 651 | 0x8d, 0xa6, 0x97, 0x65, 0x42, 0xb4, 0x0d, 0xbd, 0x09, 0x01, 0x78, 0xe2, | ||
3083 | 652 | 0xa6, 0x81, 0x2a, 0x43, 0x6c, 0x18, 0xa5, 0xe8, 0x91, 0xac, 0x80, 0x83, | ||
3084 | 653 | 0x17, 0x6a, 0xce, 0x1d, 0xdf, 0xee, 0x4d, 0x38, 0x28, 0x56, 0xa5, 0x9c, | ||
3085 | 654 | 0x80, 0xc6, 0x43, 0xec, 0xd5, 0xc1, 0xab, 0x68, 0xc6, 0x6b, 0x2b, 0x89, | ||
3086 | 655 | 0x84, 0xce, 0x6e, 0x0e, 0x38, 0x6f, 0x65, 0x54, 0xa9, 0xcb, 0x91, 0xd3, | ||
3087 | 656 | 0x63, 0xbb, 0x4a, 0xcc, 0xf0, 0x28, 0x87, 0x8e, 0xc2, 0x0b, 0x8b, 0x2e, | ||
3088 | 657 | 0x37, 0x21, 0x4f, 0x7b, 0x12, 0xdb, 0xcd, 0x78, 0xfb, 0x38, 0xf7, 0x11, | ||
3089 | 658 | 0xa9, 0x0f, 0xe2, 0x62, 0xc7, 0x84, 0x91, 0xb9, 0x05, 0x83, 0x54, 0xe2, | ||
3090 | 659 | 0x7b, 0x34, 0xfc, 0x92, 0xef, 0x0d, 0x70, 0x28, 0x59, 0x4c, 0xb0, 0x82, | ||
3091 | 660 | 0x59, 0xf8, 0x6b, 0x54, 0xcb, 0x1d, 0x31, 0x7e, 0xc5, 0x5f, 0x2e, 0xf2, | ||
3092 | 661 | 0xab, 0x7e, 0x8b, 0x14, 0x16, 0x71, 0xf8, 0xbc, 0xb1, 0xa9, 0x0b, 0xb7, | ||
3093 | 662 | 0xd8, 0x2b, 0xc8, 0xcb, 0x4f, 0xb0, 0x2c, 0x9c, 0xe4, 0x30, 0xef, 0x4a, | ||
3094 | 663 | 0xe0, 0xdc, 0x84, 0x7e, 0x91, 0xe7, 0xd4, 0xfb, 0x46, 0x3e, 0xb9, 0xdd, | ||
3095 | 664 | 0x87, 0xfc, 0x9d, 0xc9, 0x56, 0x8f, 0x3a, 0x4e, 0xf5, 0x04, 0xd7, 0x4c, | ||
3096 | 665 | 0x13, 0x4d, 0xcb, 0x60, 0xca, 0x01, 0xb3, 0x6c, 0xe1, 0x0c, 0xb4, 0x67, | ||
3097 | 666 | 0x26, 0x8e, 0xa2, 0x97, 0xc0, 0x51, 0x8a, 0x50, 0xd1, 0x2c, 0xc0, 0x25, | ||
3098 | 667 | 0xcf, 0xee, 0xa1, 0x38, 0x1d, 0xdd, 0x7d, 0xd6, 0x3e, 0x4a, 0xc9, 0x48, | ||
3099 | 668 | 0x90, 0xa0, 0xea, 0xe9, 0xdb, 0xd8, 0xdb, 0x24, 0x46, 0x25, 0xa3, 0xc8, | ||
3100 | 669 | 0xaf, 0x2e, 0x1a, 0xff, 0x6a, 0x81, 0x12, 0xc4, 0xd3, 0xd9, 0x8e, 0x82, | ||
3101 | 670 | 0x63, 0x58, 0x8e, 0xe1, 0xdd, 0x90, 0x63, 0xb7, 0x09, 0xb8, 0xec, 0x00, | ||
3102 | 671 | 0x47, 0x4c, 0x4e, 0xa4, 0x13, 0xa8, 0x02, 0xb8, 0xcd, 0xe8, 0x14, 0xe7, | ||
3103 | 672 | 0xb3, 0x73, 0x14, 0x10, 0x80, 0x9e, 0xd0, 0x00, 0x06, 0x0f, 0xb7, 0xb9, | ||
3104 | 673 | 0xb0, 0xbf, 0x85, 0x09, 0xef, 0x17, 0x51, 0x5f, 0x33, 0x3e, 0x86, 0x8b, | ||
3105 | 674 | 0x18, 0x8e, 0xa1, 0x64, 0x45, 0xf3, 0x80, 0xb3, 0xa7, 0xd4, 0x27, 0x74, | ||
3106 | 675 | 0xf6, 0x45, 0x6c, 0xdf, 0x72, 0x42, 0x46, 0xfa}, | ||
3107 | 676 | {{Action::WRAP, | ||
3108 | 677 | {SECSuccess, true}}, // Round counter overflows - acceptable | ||
3109 | 678 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3110 | 679 | |||
3111 | 680 | {52, // empty keys cannot be wrapped | ||
3112 | 681 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3113 | 682 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3114 | 683 | {}, | ||
3115 | 684 | {0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6}, | ||
3116 | 685 | {{Action::WRAP, {SECFailure, false}}, | ||
3117 | 686 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3118 | 687 | |||
3119 | 688 | {53, // keys of size 8 byte cannot be wrapped | ||
3120 | 689 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3121 | 690 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3122 | 691 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, | ||
3123 | 692 | {0x38, 0xd8, 0x23, 0x8c, 0xdb, 0x0d, 0x9a, 0x2d, 0xa2, 0x8d, 0x6d, 0x56, | ||
3124 | 693 | 0x19, 0x4f, 0x2e, 0x78}, | ||
3125 | 694 | {{Action::WRAP, {SECFailure, false}}, | ||
3126 | 695 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3127 | 696 | |||
3128 | 697 | {54, // wrapped key size must be divisible by 8 | ||
3129 | 698 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3130 | 699 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3131 | 700 | {0x00}, | ||
3132 | 701 | {}, | ||
3133 | 702 | {{Action::WRAP, {SECFailure, false}}, | ||
3134 | 703 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3135 | 704 | |||
3136 | 705 | {55, // wrapped key size must be divisible by 8 | ||
3137 | 706 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3138 | 707 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3139 | 708 | {0x00, 0x01}, | ||
3140 | 709 | {}, | ||
3141 | 710 | {{Action::WRAP, {SECFailure, false}}, | ||
3142 | 711 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3143 | 712 | |||
3144 | 713 | {56, // wrapped key size must be divisible by 8 | ||
3145 | 714 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3146 | 715 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3147 | 716 | {0x00, 0x01, 0x02}, | ||
3148 | 717 | {}, | ||
3149 | 718 | {{Action::WRAP, {SECFailure, false}}, | ||
3150 | 719 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3151 | 720 | |||
3152 | 721 | {57, // wrapped key size must be divisible by 8 | ||
3153 | 722 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3154 | 723 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3155 | 724 | {0x00, 0x01, 0x02, 0x03}, | ||
3156 | 725 | {}, | ||
3157 | 726 | {{Action::WRAP, {SECFailure, false}}, | ||
3158 | 727 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3159 | 728 | |||
3160 | 729 | {58, // wrapped key size must be divisible by 8 | ||
3161 | 730 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3162 | 731 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3163 | 732 | {0x00, 0x01, 0x02, 0x03, 0x04}, | ||
3164 | 733 | {}, | ||
3165 | 734 | {{Action::WRAP, {SECFailure, false}}, | ||
3166 | 735 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3167 | 736 | |||
3168 | 737 | {59, // wrapped key size must be divisible by 8 | ||
3169 | 738 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3170 | 739 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3171 | 740 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05}, | ||
3172 | 741 | {}, | ||
3173 | 742 | {{Action::WRAP, {SECFailure, false}}, | ||
3174 | 743 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3175 | 744 | |||
3176 | 745 | {60, // wrapped key size must be divisible by 8 | ||
3177 | 746 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3178 | 747 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3179 | 748 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06}, | ||
3180 | 749 | {}, | ||
3181 | 750 | {{Action::WRAP, {SECFailure, false}}, | ||
3182 | 751 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3183 | 752 | |||
3184 | 753 | {61, // wrapped key size must be divisible by 8 | ||
3185 | 754 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, 0xa9, | ||
3186 | 755 | 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, 0xed, 0x76}, | ||
3187 | 756 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, | ||
3188 | 757 | 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13}, | ||
3189 | 758 | {}, | ||
3190 | 759 | {{Action::WRAP, {SECFailure, false}}, | ||
3191 | 760 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3192 | 761 | |||
3193 | 762 | {62, // invalid size of wrapped key | ||
3194 | 763 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3195 | 764 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3196 | 765 | {}, | ||
3197 | 766 | {}, | ||
3198 | 767 | {{Action::WRAP, {SECFailure, false}}, | ||
3199 | 768 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3200 | 769 | |||
3201 | 770 | {63, // invalid size of wrapped key | ||
3202 | 771 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3203 | 772 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3204 | 773 | {}, | ||
3205 | 774 | {0x9f}, | ||
3206 | 775 | {{Action::WRAP, {SECFailure, false}}, | ||
3207 | 776 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3208 | 777 | |||
3209 | 778 | {64, // invalid size of wrapped key | ||
3210 | 779 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3211 | 780 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3212 | 781 | {}, | ||
3213 | 782 | {0xdc, 0x9e, 0x95, 0x80}, | ||
3214 | 783 | {{Action::WRAP, {SECFailure, false}}, | ||
3215 | 784 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3216 | 785 | |||
3217 | 786 | {65, // invalid size of wrapped key | ||
3218 | 787 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3219 | 788 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3220 | 789 | {}, | ||
3221 | 790 | {0xb9, 0xb2, 0x82, 0xd1, 0x38, 0x69, 0x30, 0x00}, | ||
3222 | 791 | {{Action::WRAP, {SECFailure, false}}, | ||
3223 | 792 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3224 | 793 | |||
3225 | 794 | {66, // invalid size of wrapped key | ||
3226 | 795 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3227 | 796 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3228 | 797 | {}, | ||
3229 | 798 | {0x0e, 0xfc, 0x63, 0x5b, 0x2d, 0x61, 0xe2, 0x44, 0x05, 0x6b, 0x9d, 0x45, | ||
3230 | 799 | 0x91, 0xca, 0x6b}, | ||
3231 | 800 | {{Action::WRAP, {SECFailure, false}}, | ||
3232 | 801 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3233 | 802 | |||
3234 | 803 | {67, // invalid size of wrapped key | ||
3235 | 804 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3236 | 805 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3237 | 806 | {}, | ||
3238 | 807 | {0x4a, 0x30, 0x5d, 0xae, 0x08, 0x7b, 0x0d, 0x24, 0xd6, 0x2a, 0xf4, 0x18, | ||
3239 | 808 | 0x31, 0x33, 0x8f, 0x33, 0xae}, | ||
3240 | 809 | {{Action::WRAP, {SECFailure, false}}, | ||
3241 | 810 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3242 | 811 | |||
3243 | 812 | {68, // invalid size of wrapped key | ||
3244 | 813 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3245 | 814 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3246 | 815 | {}, | ||
3247 | 816 | {0x82, 0xcb, 0x92, 0x70, 0x97, 0xcf, 0x31, 0xea, 0x4a, 0xff, | ||
3248 | 817 | 0xea, 0x44, 0x0b, 0x0d, 0x8c, 0xa6, 0xa2, 0x40, 0xb9, 0x00}, | ||
3249 | 818 | {{Action::WRAP, {SECFailure, false}}, | ||
3250 | 819 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3251 | 820 | |||
3252 | 821 | {69, // bytes appended to wrapped key | ||
3253 | 822 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, 0xa4, | ||
3254 | 823 | 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, 0xfd, 0x97}, | ||
3255 | 824 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
3256 | 825 | 0x0c, 0x0d, 0x0e, 0x0f}, | ||
3257 | 826 | {0x55, 0xdf, 0xb2, 0xf7, 0xe0, 0xc1, 0xea, 0x04, 0xfe, | ||
3258 | 827 | 0xad, 0x89, 0x7c, 0x45, 0x1c, 0x05, 0x05, 0x92, 0x1d, | ||
3259 | 828 | 0xc4, 0x7f, 0x30, 0x8c, 0x49, 0x17, 0x00}, | ||
3260 | 829 | {{Action::WRAP, {SECSuccess, false}}, | ||
3261 | 830 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3262 | 831 | |||
3263 | 832 | {70, // Incorrect IV | ||
3264 | 833 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3265 | 834 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3266 | 835 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3267 | 836 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3268 | 837 | {0x9b, 0x15, 0x93, 0xfd, 0x7d, 0x4f, 0xe2, 0x5a, 0x66, 0x0b, 0xbc, 0x19, | ||
3269 | 838 | 0x76, 0xea, 0x4a, 0xb6, 0x8b, 0xcc, 0x53, 0xf8, 0x48, 0xa8, 0xeb, 0x9d}, | ||
3270 | 839 | {{Action::WRAP, {SECSuccess, false}}, | ||
3271 | 840 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3272 | 841 | |||
3273 | 842 | {71, // Incorrect IV | ||
3274 | 843 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3275 | 844 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3276 | 845 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3277 | 846 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3278 | 847 | {0xe7, 0xed, 0xb8, 0x47, 0xfa, 0x91, 0xe2, 0xde, 0xde, 0xd7, 0x26, 0xed, | ||
3279 | 848 | 0xf3, 0xab, 0x93, 0xda, 0x91, 0x15, 0x16, 0x97, 0x42, 0x5f, 0xee, 0x28}, | ||
3280 | 849 | {{Action::WRAP, {SECSuccess, false}}, | ||
3281 | 850 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3282 | 851 | |||
3283 | 852 | {72, // Incorrect IV | ||
3284 | 853 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3285 | 854 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3286 | 855 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3287 | 856 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3288 | 857 | {0x1b, 0x51, 0xa7, 0xc0, 0x33, 0xc1, 0xef, 0xb5, 0xee, 0x29, 0x94, 0x25, | ||
3289 | 858 | 0x9c, 0x40, 0xf0, 0x3b, 0xb5, 0x7d, 0x8c, 0xc0, 0x9e, 0x50, 0x7e, 0x6e}, | ||
3290 | 859 | {{Action::WRAP, {SECSuccess, false}}, | ||
3291 | 860 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3292 | 861 | |||
3293 | 862 | {73, // Incorrect IV | ||
3294 | 863 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3295 | 864 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3296 | 865 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3297 | 866 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3298 | 867 | {0xc4, 0x0b, 0x61, 0x4a, 0x50, 0x62, 0xf5, 0xfd, 0x04, 0x9c, 0x53, 0x79, | ||
3299 | 868 | 0xb3, 0xe8, 0x14, 0x16, 0x14, 0xc2, 0xda, 0x97, 0x89, 0x35, 0x89, 0xfb}, | ||
3300 | 869 | {{Action::WRAP, {SECSuccess, false}}, | ||
3301 | 870 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3302 | 871 | |||
3303 | 872 | {74, // Incorrect IV | ||
3304 | 873 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3305 | 874 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3306 | 875 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3307 | 876 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3308 | 877 | {0xd7, 0x57, 0x5e, 0xf0, 0x2d, 0xf5, 0x4b, 0x30, 0x86, 0xeb, 0x49, 0x03, | ||
3309 | 878 | 0x5e, 0xea, 0xfb, 0xce, 0x0e, 0x08, 0x33, 0x6e, 0x89, 0xb3, 0x5a, 0xb0}, | ||
3310 | 879 | {{Action::WRAP, {SECSuccess, false}}, | ||
3311 | 880 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3312 | 881 | |||
3313 | 882 | {75, // Incorrect IV | ||
3314 | 883 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3315 | 884 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3316 | 885 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3317 | 886 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3318 | 887 | {0x0d, 0x61, 0x7f, 0x1c, 0x12, 0x48, 0x5a, 0x35, 0x91, 0x7d, 0x2a, 0x94, | ||
3319 | 888 | 0x1e, 0x94, 0x9d, 0x2f, 0xdb, 0xf0, 0x3a, 0x34, 0x68, 0x89, 0xb8, 0x50}, | ||
3320 | 889 | {{Action::WRAP, {SECSuccess, false}}, | ||
3321 | 890 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3322 | 891 | |||
3323 | 892 | {76, // Incorrect IV | ||
3324 | 893 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3325 | 894 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3326 | 895 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3327 | 896 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3328 | 897 | {0xc7, 0xdf, 0x34, 0x72, 0x91, 0x74, 0xdb, 0x2e, 0x83, 0xee, 0x16, 0xc6, | ||
3329 | 898 | 0xde, 0x74, 0xd5, 0xeb, 0x97, 0x66, 0x71, 0x5f, 0xad, 0x04, 0x9b, 0x40}, | ||
3330 | 899 | {{Action::WRAP, {SECSuccess, false}}, | ||
3331 | 900 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3332 | 901 | |||
3333 | 902 | {77, // Incorrect IV | ||
3334 | 903 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3335 | 904 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3336 | 905 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3337 | 906 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3338 | 907 | {0xc3, 0xed, 0x38, 0xd6, 0xf9, 0xcc, 0xb9, 0xbf, 0x3c, 0x56, 0xbb, 0x31, | ||
3339 | 908 | 0x76, 0xf0, 0x0d, 0x3c, 0xe9, 0x88, 0x75, 0x21, 0xf8, 0xd4, 0xc7, 0x0b}, | ||
3340 | 909 | {{Action::WRAP, {SECSuccess, false}}, | ||
3341 | 910 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3342 | 911 | |||
3343 | 912 | {78, // Incorrect IV | ||
3344 | 913 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3345 | 914 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3346 | 915 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3347 | 916 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3348 | 917 | {0x65, 0x82, 0xb5, 0xf4, 0x65, 0x27, 0x44, 0xb0, 0x53, 0x7e, 0x97, 0xe7, | ||
3349 | 918 | 0xcd, 0xae, 0x0f, 0x44, 0x31, 0x30, 0x14, 0x0d, 0xba, 0xea, 0x60, 0x4c}, | ||
3350 | 919 | {{Action::WRAP, {SECSuccess, false}}, | ||
3351 | 920 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3352 | 921 | |||
3353 | 922 | {79, // Incorrect IV | ||
3354 | 923 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3355 | 924 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3356 | 925 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3357 | 926 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3358 | 927 | {0xfc, 0x9b, 0x9b, 0xdf, 0x25, 0xf2, 0xb4, 0x8a, 0xd7, 0x99, 0x34, 0xc8, | ||
3359 | 928 | 0xd3, 0x48, 0x97, 0xcd, 0xbf, 0x4c, 0x84, 0x6f, 0x8c, 0xb4, 0xb1, 0x1d}, | ||
3360 | 929 | {{Action::WRAP, {SECSuccess, false}}, | ||
3361 | 930 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3362 | 931 | |||
3363 | 932 | {80, // Incorrect IV | ||
3364 | 933 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3365 | 934 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3366 | 935 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3367 | 936 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3368 | 937 | {0xfc, 0x23, 0xc7, 0xf4, 0xfe, 0x20, 0xaa, 0x81, 0x10, 0x5e, 0xfc, 0x1a, | ||
3369 | 938 | 0x71, 0x05, 0xa5, 0x31, 0x6b, 0x23, 0x39, 0x9a, 0xc7, 0x92, 0xc8, 0x24}, | ||
3370 | 939 | {{Action::WRAP, {SECSuccess, false}}, | ||
3371 | 940 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3372 | 941 | |||
3373 | 942 | {81, // Incorrect IV | ||
3374 | 943 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3375 | 944 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3376 | 945 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3377 | 946 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3378 | 947 | {0x37, 0xb4, 0xa2, 0x61, 0xb9, 0x6b, 0xce, 0xc9, 0xcc, 0x93, 0xee, 0xf5, | ||
3379 | 948 | 0xb2, 0xfb, 0xbb, 0xe8, 0x46, 0x34, 0xf9, 0x78, 0xc5, 0x89, 0x3d, 0xda}, | ||
3380 | 949 | {{Action::WRAP, {SECSuccess, false}}, | ||
3381 | 950 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3382 | 951 | |||
3383 | 952 | {82, // Incorrect IV | ||
3384 | 953 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3385 | 954 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3386 | 955 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3387 | 956 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3388 | 957 | {0x18, 0x31, 0x10, 0x98, 0x47, 0xd1, 0x7d, 0x01, 0x0b, 0xfc, 0xd9, | ||
3389 | 958 | 0x3f, 0xb4, 0x6f, 0x31, 0x50, 0xcd, 0xaf, 0xd5, 0x27, 0x33, 0xdb, | ||
3390 | 959 | 0x74, 0xc2, 0x21, 0xb0, 0x34, 0xfe, 0x8e, 0x15, 0x52, 0xc0}, | ||
3391 | 960 | {{Action::WRAP, {SECSuccess, false}}, | ||
3392 | 961 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3393 | 962 | |||
3394 | 963 | {83, // Incorrect IV | ||
3395 | 964 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3396 | 965 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3397 | 966 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3398 | 967 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3399 | 968 | {0x2b, 0x2b, 0x89, 0xc3, 0xc6, 0xb2, 0xdb, 0x49, 0x03, 0x87, 0x7a, | ||
3400 | 969 | 0xd4, 0x62, 0x2c, 0xa3, 0x3f, 0x3a, 0x3c, 0xb7, 0xe6, 0x70, 0x1d, | ||
3401 | 970 | 0x13, 0x40, 0xe6, 0xaf, 0xc0, 0xfd, 0xab, 0x7d, 0xbd, 0x72}, | ||
3402 | 971 | {{Action::WRAP, {SECSuccess, false}}, | ||
3403 | 972 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3404 | 973 | |||
3405 | 974 | {84, // Incorrect IV | ||
3406 | 975 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3407 | 976 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3408 | 977 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3409 | 978 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3410 | 979 | {0x3c, 0x69, 0x03, 0xf3, 0x7d, 0xa5, 0x71, 0x61, 0xaf, 0x67, 0x06, | ||
3411 | 980 | 0x05, 0x0a, 0x2e, 0xd7, 0x47, 0xcd, 0x55, 0x34, 0x4d, 0x86, 0x91, | ||
3412 | 981 | 0x89, 0xfd, 0x49, 0xd2, 0x53, 0x6f, 0xf9, 0x48, 0x12, 0x9d}, | ||
3413 | 982 | {{Action::WRAP, {SECSuccess, false}}, | ||
3414 | 983 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3415 | 984 | |||
3416 | 985 | {85, // Incorrect IV | ||
3417 | 986 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3418 | 987 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3419 | 988 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3420 | 989 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3421 | 990 | {0x8a, 0x8d, 0xc8, 0xb1, 0x31, 0xc6, 0xb9, 0x68, 0xb6, 0x0c, 0x1d, | ||
3422 | 991 | 0xd8, 0x19, 0xa6, 0x55, 0x39, 0x2d, 0x1a, 0x96, 0xd6, 0xca, 0xfa, | ||
3423 | 992 | 0x48, 0xe3, 0x0f, 0xb1, 0x14, 0x6f, 0x09, 0x62, 0x29, 0xc6}, | ||
3424 | 993 | {{Action::WRAP, {SECSuccess, false}}, | ||
3425 | 994 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3426 | 995 | |||
3427 | 996 | {86, // Incorrect IV | ||
3428 | 997 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3429 | 998 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3430 | 999 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3431 | 1000 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3432 | 1001 | {0x30, 0x3e, 0x0b, 0x36, 0x02, 0xd5, 0x14, 0xa7, 0xd5, 0x2e, 0xdb, | ||
3433 | 1002 | 0xa3, 0x30, 0x6d, 0x73, 0x83, 0xe8, 0x99, 0x9e, 0x7c, 0x65, 0x2a, | ||
3434 | 1003 | 0x51, 0x03, 0x35, 0xa8, 0x94, 0x9e, 0xfb, 0x42, 0xeb, 0x66}, | ||
3435 | 1004 | {{Action::WRAP, {SECSuccess, false}}, | ||
3436 | 1005 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3437 | 1006 | |||
3438 | 1007 | {87, // Incorrect IV | ||
3439 | 1008 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3440 | 1009 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3441 | 1010 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3442 | 1011 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3443 | 1012 | {0x31, 0x9b, 0xef, 0xbf, 0x2d, 0xdb, 0xb4, 0x75, 0x72, 0x3f, 0xb2, | ||
3444 | 1013 | 0xfa, 0x30, 0xf2, 0xae, 0x7f, 0xc1, 0xce, 0xb1, 0xe6, 0xf3, 0x61, | ||
3445 | 1014 | 0x71, 0x5e, 0xca, 0x72, 0x09, 0x60, 0x88, 0x73, 0xc7, 0xfc}, | ||
3446 | 1015 | {{Action::WRAP, {SECSuccess, false}}, | ||
3447 | 1016 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3448 | 1017 | |||
3449 | 1018 | {88, // Incorrect IV | ||
3450 | 1019 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3451 | 1020 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3452 | 1021 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3453 | 1022 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3454 | 1023 | {0x9b, 0x3e, 0x44, 0x03, 0x41, 0xc5, 0xda, 0x13, 0x15, 0x59, 0x95, | ||
3455 | 1024 | 0x9d, 0xb6, 0xb3, 0x55, 0x3a, 0x53, 0x46, 0x91, 0x16, 0x2f, 0x4f, | ||
3456 | 1025 | 0x00, 0x93, 0x27, 0xbf, 0x2c, 0x21, 0xd6, 0xfe, 0x5a, 0xda}, | ||
3457 | 1026 | {{Action::WRAP, {SECSuccess, false}}, | ||
3458 | 1027 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3459 | 1028 | |||
3460 | 1029 | {89, // Incorrect IV | ||
3461 | 1030 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3462 | 1031 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3463 | 1032 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3464 | 1033 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3465 | 1034 | {0xeb, 0xa6, 0xcc, 0x09, 0x59, 0xe6, 0xa5, 0x63, 0x39, 0xb1, 0x41, | ||
3466 | 1035 | 0x62, 0x98, 0x40, 0xad, 0xd8, 0x0f, 0x45, 0x65, 0x65, 0x6d, 0xc6, | ||
3467 | 1036 | 0x87, 0xa3, 0xb9, 0x96, 0x96, 0x0c, 0x99, 0x4d, 0xfd, 0x26}, | ||
3468 | 1037 | {{Action::WRAP, {SECSuccess, false}}, | ||
3469 | 1038 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3470 | 1039 | |||
3471 | 1040 | {90, // Incorrect IV | ||
3472 | 1041 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3473 | 1042 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3474 | 1043 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3475 | 1044 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3476 | 1045 | {0xb7, 0x03, 0xb6, 0xcf, 0x45, 0x87, 0x70, 0x93, 0x53, 0xc7, 0xe4, | ||
3477 | 1046 | 0x00, 0x4d, 0x3d, 0xa6, 0x1c, 0xe5, 0xf5, 0xde, 0xaf, 0x71, 0x63, | ||
3478 | 1047 | 0xca, 0x9d, 0x61, 0x58, 0xdd, 0xe9, 0x19, 0xe0, 0xac, 0x34}, | ||
3479 | 1048 | {{Action::WRAP, {SECSuccess, false}}, | ||
3480 | 1049 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3481 | 1050 | |||
3482 | 1051 | {91, // Incorrect IV | ||
3483 | 1052 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3484 | 1053 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3485 | 1054 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3486 | 1055 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3487 | 1056 | {0x72, 0x54, 0x9d, 0x52, 0xd6, 0xf4, 0xff, 0x91, 0x2d, 0x83, 0x3c, | ||
3488 | 1057 | 0x74, 0x13, 0x6d, 0x90, 0x63, 0x4c, 0xe8, 0xaf, 0xa4, 0xf8, 0x44, | ||
3489 | 1058 | 0x12, 0xbb, 0xee, 0x80, 0x74, 0x08, 0x4d, 0x4c, 0xec, 0xff}, | ||
3490 | 1059 | {{Action::WRAP, {SECSuccess, false}}, | ||
3491 | 1060 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3492 | 1061 | |||
3493 | 1062 | {92, // Incorrect IV | ||
3494 | 1063 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3495 | 1064 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3496 | 1065 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3497 | 1066 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3498 | 1067 | {0x13, 0x37, 0xc8, 0xbd, 0x6c, 0x8a, 0x5d, 0xd4, 0x3a, 0xba, 0x8d, | ||
3499 | 1068 | 0x29, 0x88, 0x64, 0xff, 0xe7, 0x6a, 0xd6, 0xea, 0x90, 0x9f, 0x34, | ||
3500 | 1069 | 0x88, 0x15, 0x7a, 0x15, 0xe6, 0xc4, 0x6a, 0xcf, 0x22, 0x14}, | ||
3501 | 1070 | {{Action::WRAP, {SECSuccess, false}}, | ||
3502 | 1071 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3503 | 1072 | |||
3504 | 1073 | {93, // Incorrect IV | ||
3505 | 1074 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, 0xdc, | ||
3506 | 1075 | 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, 0x84, 0xb4}, | ||
3507 | 1076 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3508 | 1077 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
3509 | 1078 | {0x4a, 0xaf, 0xfa, 0xca, 0x5f, 0xe8, 0x58, 0x14, 0xd0, 0x40, 0xaa, | ||
3510 | 1079 | 0x2a, 0x30, 0x6b, 0xa4, 0xd1, 0xd4, 0x47, 0x46, 0xcf, 0xe4, 0x6c, | ||
3511 | 1080 | 0x97, 0x8a, 0xa0, 0x57, 0xb5, 0x3f, 0xd2, 0x53, 0x16, 0xc1}, | ||
3512 | 1081 | {{Action::WRAP, {SECSuccess, false}}, | ||
3513 | 1082 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3514 | 1083 | |||
3515 | 1084 | {94, // RFC 3394 | ||
3516 | 1085 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
3517 | 1086 | 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17}, | ||
3518 | 1087 | {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, | ||
3519 | 1088 | 0xcc, 0xdd, 0xee, 0xff}, | ||
3520 | 1089 | {0x96, 0x77, 0x8b, 0x25, 0xae, 0x6c, 0xa4, 0x35, 0xf9, 0x2b, 0x5b, 0x97, | ||
3521 | 1090 | 0xc0, 0x50, 0xae, 0xd2, 0x46, 0x8a, 0xb8, 0xa1, 0x7a, 0xd8, 0x4e, 0x5d}, | ||
3522 | 1091 | {{Action::WRAP, {SECSuccess, true}}, | ||
3523 | 1092 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3524 | 1093 | |||
3525 | 1094 | {95, // RFC 3394 | ||
3526 | 1095 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
3527 | 1096 | 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17}, | ||
3528 | 1097 | {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, | ||
3529 | 1098 | 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, | ||
3530 | 1099 | {0x03, 0x1d, 0x33, 0x26, 0x4e, 0x15, 0xd3, 0x32, 0x68, 0xf2, 0x4e, | ||
3531 | 1100 | 0xc2, 0x60, 0x74, 0x3e, 0xdc, 0xe1, 0xc6, 0xc7, 0xdd, 0xee, 0x72, | ||
3532 | 1101 | 0x5a, 0x93, 0x6b, 0xa8, 0x14, 0x91, 0x5c, 0x67, 0x62, 0xd2}, | ||
3533 | 1102 | {{Action::WRAP, {SECSuccess, true}}, | ||
3534 | 1103 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3535 | 1104 | |||
3536 | 1105 | {96, | ||
3537 | 1106 | {0xfc, 0xe0, 0x42, 0x9c, 0x61, 0x06, 0x58, 0xef, 0x8e, 0x7c, 0xfb, | ||
3538 | 1107 | 0x01, 0x54, 0xc5, 0x1d, 0xe2, 0x23, 0x9a, 0x8a, 0x31, 0x7f, 0x5a, | ||
3539 | 1108 | 0xf5, 0xb6, 0x71, 0x4f, 0x98, 0x5f, 0xb5, 0xc4, 0xd7, 0x5c}, | ||
3540 | 1109 | {0x28, 0x73, 0x26, 0xb5, 0xed, 0x00, 0x78, 0xe7, 0xca, 0x01, 0x64, 0xd7, | ||
3541 | 1110 | 0x48, 0xf6, 0x67, 0xe7}, | ||
3542 | 1111 | {0x94, 0x0b, 0x1c, 0x58, 0x0e, 0x0c, 0x72, 0x33, 0xa7, 0x91, 0xb0, 0xf1, | ||
3543 | 1112 | 0x92, 0x43, 0x8d, 0x2e, 0xac, 0xe1, 0x42, 0x14, 0xce, 0xe4, 0x55, 0xb7}, | ||
3544 | 1113 | {{Action::WRAP, {SECSuccess, true}}, | ||
3545 | 1114 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3546 | 1115 | |||
3547 | 1116 | {97, | ||
3548 | 1117 | {0x0d, 0xda, 0x6d, 0xa5, 0x12, 0x3e, 0x2c, 0x37, 0xc6, 0xfa, 0x16, | ||
3549 | 1118 | 0xba, 0x0d, 0x33, 0x4c, 0xd0, 0x1a, 0xcd, 0x65, 0x2f, 0x89, 0x94, | ||
3550 | 1119 | 0x21, 0x17, 0x51, 0xdf, 0xab, 0x4f, 0xaa, 0xc2, 0xfc, 0x22}, | ||
3551 | 1120 | {0xb4, 0x0b, 0x68, 0x28, 0x72, 0x9b, 0x45, 0x63, 0x22, 0xa8, 0xd0, 0x65, | ||
3552 | 1121 | 0xab, 0xc0, 0xd0, 0x81}, | ||
3553 | 1122 | {0x93, 0x9b, 0x33, 0x89, 0x33, 0x6f, 0xea, 0x4a, 0x97, 0x51, 0xbf, 0x01, | ||
3554 | 1123 | 0x4e, 0xf1, 0x80, 0x11, 0x32, 0x30, 0x90, 0xe8, 0xa0, 0x50, 0x0b, 0xc4}, | ||
3555 | 1124 | {{Action::WRAP, {SECSuccess, true}}, | ||
3556 | 1125 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3557 | 1126 | |||
3558 | 1127 | {98, | ||
3559 | 1128 | {0xd6, 0x92, 0x59, 0x14, 0xcd, 0x06, 0x30, 0x8f, 0x81, 0xad, 0x91, | ||
3560 | 1129 | 0xe2, 0x30, 0x73, 0x59, 0x3d, 0x99, 0xd4, 0xe5, 0x03, 0x51, 0xb2, | ||
3561 | 1130 | 0x0e, 0xb2, 0xa8, 0xd1, 0xa1, 0xac, 0x4c, 0xed, 0x65, 0x88}, | ||
3562 | 1131 | {0x03, 0x7b, 0x27, 0xb3, 0xdc, 0x95, 0xb1, 0x9d, 0x15, 0xbd, 0x40, 0x91, | ||
3563 | 1132 | 0xe3, 0x20, 0xbf, 0xe1}, | ||
3564 | 1133 | {0x59, 0xee, 0x8e, 0x51, 0x98, 0x86, 0x12, 0x37, 0xf6, 0x82, 0xed, 0xec, | ||
3565 | 1134 | 0x6b, 0xa9, 0x06, 0x52, 0x6c, 0x01, 0x6d, 0x4d, 0x93, 0x59, 0x42, 0xbd}, | ||
3566 | 1135 | {{Action::WRAP, {SECSuccess, true}}, | ||
3567 | 1136 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3568 | 1137 | |||
3569 | 1138 | {99, | ||
3570 | 1139 | {0x07, 0x51, 0x8a, 0x82, 0xcb, 0xc8, 0xda, 0x1d, 0xce, 0xc5, 0x5f, | ||
3571 | 1140 | 0x37, 0x63, 0xa2, 0x06, 0xd2, 0x77, 0x48, 0x7a, 0xbd, 0x03, 0xce, | ||
3572 | 1141 | 0xdd, 0x0b, 0x8b, 0xef, 0x9e, 0xe2, 0xfb, 0x15, 0x71, 0x21}, | ||
3573 | 1142 | {0xfa, 0xa4, 0x66, 0x4d, 0x79, 0xfc, 0xe3, 0xc7, 0xd2, 0xfd, 0xd4, 0x62, | ||
3574 | 1143 | 0xf6, 0xc1, 0xc4, 0x23, 0xc2, 0xf8, 0xe6, 0xb6, 0x9b, 0xe2, 0xe0, 0x71}, | ||
3575 | 1144 | {0x1a, 0xb5, 0x3a, 0x06, 0x5d, 0x8f, 0x77, 0x6a, 0x08, 0xb3, 0x3e, | ||
3576 | 1145 | 0x51, 0x38, 0x30, 0x71, 0xb6, 0xf1, 0x54, 0x61, 0x21, 0x16, 0x65, | ||
3577 | 1146 | 0x51, 0x37, 0xbd, 0x3b, 0x7e, 0xc2, 0x9b, 0x70, 0xfd, 0x56}, | ||
3578 | 1147 | {{Action::WRAP, {SECSuccess, true}}, | ||
3579 | 1148 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3580 | 1149 | |||
3581 | 1150 | {100, | ||
3582 | 1151 | {0xea, 0x46, 0x99, 0x1d, 0x4e, 0x71, 0xf5, 0x3d, 0xd6, 0x24, 0xe7, | ||
3583 | 1152 | 0xfe, 0x7f, 0xde, 0x11, 0x94, 0x4a, 0x7c, 0x59, 0x42, 0xd2, 0x32, | ||
3584 | 1153 | 0x36, 0x9b, 0x80, 0x65, 0xd4, 0x2b, 0x8c, 0xd2, 0xdd, 0xe1}, | ||
3585 | 1154 | {0xdf, 0xfc, 0x5c, 0xf1, 0xdd, 0x54, 0x11, 0xd0, 0x15, 0xd8, 0x46, 0x01, | ||
3586 | 1155 | 0xfa, 0x38, 0xdf, 0x5e, 0xff, 0xe8, 0x85, 0xc7, 0xf2, 0x6a, 0x48, 0x25}, | ||
3587 | 1156 | {0xa1, 0xbf, 0x8e, 0x73, 0xe3, 0xfa, 0x1d, 0xb7, 0x59, 0xf0, 0xab, | ||
3588 | 1157 | 0x2a, 0xb0, 0xb1, 0xca, 0x6f, 0x2c, 0x85, 0xb6, 0x3d, 0x83, 0xe2, | ||
3589 | 1158 | 0x5f, 0x7a, 0x0b, 0x52, 0x93, 0xd0, 0xa2, 0x16, 0xa2, 0xb7}, | ||
3590 | 1159 | {{Action::WRAP, {SECSuccess, true}}, | ||
3591 | 1160 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3592 | 1161 | |||
3593 | 1162 | {101, | ||
3594 | 1163 | {0xfd, 0xcf, 0xa9, 0x02, 0xc6, 0xf2, 0x22, 0xf5, 0x27, 0xaf, 0x84, | ||
3595 | 1164 | 0xda, 0x53, 0x3b, 0x14, 0xb5, 0x2e, 0x26, 0x15, 0xda, 0x3a, 0x89, | ||
3596 | 1165 | 0xd1, 0xd3, 0x57, 0x08, 0xb0, 0xcd, 0x49, 0xf6, 0x0d, 0x87}, | ||
3597 | 1166 | {0x96, 0x6b, 0x07, 0x04, 0x73, 0x54, 0x96, 0x6a, 0x70, 0x3e, 0x79, 0x60, | ||
3598 | 1167 | 0x7b, 0x55, 0x60, 0x32, 0xf4, 0xf5, 0x96, 0xb7, 0xf9, 0x20, 0x6f, 0x05}, | ||
3599 | 1168 | {0x27, 0x30, 0x8a, 0x0e, 0x1a, 0x6c, 0x0a, 0x1d, 0x15, 0xd6, 0x17, | ||
3600 | 1169 | 0x4a, 0xb7, 0xd6, 0x86, 0x75, 0x20, 0x7b, 0x61, 0x5d, 0xf1, 0x6f, | ||
3601 | 1170 | 0xcf, 0x7a, 0x3c, 0x69, 0xb2, 0x5f, 0x55, 0x1c, 0xca, 0x9f}, | ||
3602 | 1171 | {{Action::WRAP, {SECSuccess, true}}, | ||
3603 | 1172 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3604 | 1173 | |||
3605 | 1174 | {102, | ||
3606 | 1175 | {0x38, 0xe1, 0xb1, 0xd0, 0x75, 0xd9, 0xd8, 0x52, 0xb9, 0xa6, 0xc0, | ||
3607 | 1176 | 0x1c, 0x8f, 0xf6, 0x96, 0x5a, 0xf0, 0x1b, 0xac, 0x45, 0x7a, 0x4e, | ||
3608 | 1177 | 0x33, 0x9a, 0xe3, 0xe1, 0xd7, 0xb2, 0xff, 0xac, 0xc0, 0xcd}, | ||
3609 | 1178 | {0x80, 0xad, 0x68, 0x20, 0xf1, 0xc9, 0x09, 0x81, 0xe2, 0xca, 0x42, | ||
3610 | 1179 | 0xb8, 0x17, 0xa3, 0x45, 0xc1, 0x17, 0x9d, 0x0a, 0x11, 0xd8, 0xe2, | ||
3611 | 1180 | 0x3a, 0x8a, 0xdc, 0x05, 0x05, 0xe1, 0x3d, 0x87, 0x29, 0x5a}, | ||
3612 | 1181 | {0x71, 0x55, 0xee, 0x93, 0x2b, 0x03, 0x58, 0xd9, 0x81, 0x82, | ||
3613 | 1182 | 0xa2, 0x3f, 0x7f, 0x42, 0x7c, 0x77, 0x4a, 0xb3, 0x40, 0xa4, | ||
3614 | 1183 | 0x75, 0x7d, 0x0b, 0x6a, 0x63, 0xfa, 0xcd, 0x3d, 0xe9, 0x05, | ||
3615 | 1184 | 0x78, 0x43, 0x8c, 0xf0, 0x32, 0x01, 0xc3, 0xf8, 0x80, 0x57}, | ||
3616 | 1185 | {{Action::WRAP, {SECSuccess, true}}, | ||
3617 | 1186 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3618 | 1187 | |||
3619 | 1188 | {103, | ||
3620 | 1189 | {0xc6, 0x41, 0xf1, 0x68, 0x9d, 0x81, 0xca, 0xa8, 0xba, 0x37, 0xd8, | ||
3621 | 1190 | 0x95, 0x27, 0x22, 0x40, 0x66, 0x40, 0x54, 0xed, 0x97, 0x4c, 0xff, | ||
3622 | 1191 | 0xfc, 0x40, 0xe6, 0xc5, 0xc0, 0xca, 0xd1, 0xb9, 0x16, 0xc7}, | ||
3623 | 1192 | {0x3f, 0xd0, 0xba, 0x19, 0x95, 0x5e, 0x46, 0x74, 0x9f, 0x54, 0xd8, | ||
3624 | 1193 | 0x8e, 0x99, 0xd0, 0x80, 0xb7, 0x33, 0x9d, 0x58, 0x8f, 0xe6, 0x12, | ||
3625 | 1194 | 0xec, 0x0f, 0x40, 0x21, 0xca, 0x3c, 0xa2, 0x10, 0x42, 0x70}, | ||
3626 | 1195 | {0xf2, 0x0b, 0x9b, 0x55, 0x3b, 0xc0, 0x84, 0x75, 0x29, 0xf8, | ||
3627 | 1196 | 0xd4, 0x37, 0x9f, 0xa9, 0x09, 0x21, 0x1e, 0x68, 0x24, 0x9b, | ||
3628 | 1197 | 0xd4, 0x29, 0xf4, 0x36, 0xc6, 0x15, 0xc4, 0xc4, 0xa5, 0xd9, | ||
3629 | 1198 | 0xf1, 0xa1, 0x96, 0x8f, 0x0b, 0x89, 0xc5, 0x23, 0x7b, 0x30}, | ||
3630 | 1199 | {{Action::WRAP, {SECSuccess, true}}, | ||
3631 | 1200 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3632 | 1201 | |||
3633 | 1202 | {104, | ||
3634 | 1203 | {0xaa, 0x0a, 0xb9, 0xd6, 0x8e, 0xd4, 0xa0, 0x4e, 0x72, 0x3f, 0x81, | ||
3635 | 1204 | 0xb4, 0x4c, 0x0c, 0x88, 0xd0, 0xbc, 0xde, 0x7a, 0x80, 0xcf, 0xd4, | ||
3636 | 1205 | 0x76, 0xeb, 0x4b, 0x88, 0x36, 0xd9, 0xaa, 0x01, 0xec, 0x4c}, | ||
3637 | 1206 | {0x57, 0xfa, 0xa8, 0x76, 0x6f, 0x6d, 0x6a, 0x0a, 0xa1, 0xcf, 0x64, | ||
3638 | 1207 | 0x3f, 0x85, 0x7c, 0x15, 0x0d, 0xf5, 0xb3, 0x13, 0x03, 0xb5, 0x0a, | ||
3639 | 1208 | 0xf4, 0x80, 0xe2, 0x1c, 0x4b, 0x5e, 0x8c, 0x8a, 0x15, 0xd5}, | ||
3640 | 1209 | {0x28, 0x11, 0x71, 0x68, 0x54, 0xa2, 0x14, 0xae, 0xcd, 0xd3, | ||
3641 | 1210 | 0x18, 0xc6, 0x67, 0x0b, 0x9b, 0x2a, 0x75, 0x11, 0x71, 0x3c, | ||
3642 | 1211 | 0x9a, 0x0c, 0x0f, 0xa8, 0x05, 0x23, 0x0f, 0xf0, 0x5c, 0xf8, | ||
3643 | 1212 | 0x4a, 0xf7, 0x95, 0xdd, 0x72, 0xf6, 0xc1, 0xa4, 0x45, 0x12}, | ||
3644 | 1213 | {{Action::WRAP, {SECSuccess, true}}, | ||
3645 | 1214 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3646 | 1215 | |||
3647 | 1216 | {105, // Round counter overflows 256 | ||
3648 | 1217 | {0x31, 0xca, 0xcb, 0xb1, 0x7d, 0x6d, 0xbb, 0xec, 0xae, 0x40, 0x72, | ||
3649 | 1218 | 0x7c, 0x50, 0x48, 0xfe, 0x0c, 0x01, 0xbc, 0x53, 0xb2, 0x3a, 0xb6, | ||
3650 | 1219 | 0x35, 0x02, 0x5c, 0xba, 0xc1, 0xec, 0xf5, 0x2c, 0xa4, 0x95}, | ||
3651 | 1220 | {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3652 | 1221 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3653 | 1222 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3654 | 1223 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3655 | 1224 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3656 | 1225 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3657 | 1226 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3658 | 1227 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3659 | 1228 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3660 | 1229 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3661 | 1230 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3662 | 1231 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3663 | 1232 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3664 | 1233 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3665 | 1234 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3666 | 1235 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3667 | 1236 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3668 | 1237 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3669 | 1238 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3670 | 1239 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3671 | 1240 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3672 | 1241 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3673 | 1242 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3674 | 1243 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3675 | 1244 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3676 | 1245 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3677 | 1246 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3678 | 1247 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3679 | 1248 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3680 | 1249 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3681 | 1250 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
3682 | 1251 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, | ||
3683 | 1252 | {0x53, 0x22, 0xbc, 0x62, 0xbd, 0x83, 0x79, 0xab, 0xbb, 0x75, 0xf6, 0x96, | ||
3684 | 1253 | 0x88, 0xb8, 0xf0, 0x0e, 0x31, 0x96, 0x2b, 0x8f, 0x9a, 0xe1, 0xe8, 0x97, | ||
3685 | 1254 | 0x71, 0x95, 0x2d, 0x8a, 0x2a, 0x74, 0x9e, 0x13, 0x52, 0xec, 0x33, 0xb5, | ||
3686 | 1255 | 0x43, 0x5a, 0x67, 0x42, 0x71, 0xb3, 0x14, 0x76, 0x0a, 0xb9, 0xf7, 0x53, | ||
3687 | 1256 | 0xb1, 0x67, 0x26, 0x18, 0x5e, 0xc7, 0xd3, 0x19, 0xac, 0x60, 0x53, 0x13, | ||
3688 | 1257 | 0x55, 0x34, 0x4c, 0x1d, 0x53, 0xc7, 0x90, 0x30, 0x00, 0xa8, 0x03, 0x9e, | ||
3689 | 1258 | 0xb4, 0x0f, 0x70, 0x56, 0x4a, 0x0a, 0xd3, 0xf4, 0x1b, 0x23, 0x55, 0xea, | ||
3690 | 1259 | 0x5d, 0xfa, 0x6a, 0x1d, 0x46, 0x39, 0x2f, 0x1d, 0x10, 0x6a, 0x5d, 0xa5, | ||
3691 | 1260 | 0x69, 0xbf, 0xb0, 0x49, 0x3b, 0xf7, 0xc1, 0x2d, 0xff, 0x04, 0xba, 0xfe, | ||
3692 | 1261 | 0xae, 0x37, 0x7d, 0xf4, 0xbb, 0x47, 0xcd, 0x44, 0x0b, 0x6f, 0x60, 0xfb, | ||
3693 | 1262 | 0xab, 0x2a, 0x54, 0xa9, 0x85, 0x51, 0xb7, 0x62, 0x73, 0xe0, 0x2c, 0xac, | ||
3694 | 1263 | 0x8d, 0x7b, 0xe9, 0xf2, 0x34, 0x3d, 0x3a, 0xbb, 0x2a, 0x23, 0xaf, 0x1c, | ||
3695 | 1264 | 0x91, 0xa7, 0x01, 0x1c, 0x67, 0xa7, 0x90, 0x72, 0x60, 0x11, 0x6b, 0x67, | ||
3696 | 1265 | 0xd5, 0x10, 0xaa, 0xbe, 0x5c, 0x7c, 0xa4, 0x6c, 0x1c, 0x20, 0xf7, 0x71, | ||
3697 | 1266 | 0x06, 0xc4, 0x59, 0x66, 0x58, 0x3b, 0x3e, 0x4e, 0xd7, 0x99, 0xa4, 0x7e, | ||
3698 | 1267 | 0xe1, 0x9b, 0xb4, 0x22, 0x32, 0x09, 0x26, 0x5c, 0x2b, 0x1a, 0xc8, 0x18, | ||
3699 | 1268 | 0x3a, 0x67, 0x8f, 0xf4, 0x3b, 0xc9, 0xa3, 0x47, 0x0a, 0x50, 0xb9, 0xee, | ||
3700 | 1269 | 0x4d, 0x10, 0xf6, 0x06, 0x74, 0x26, 0x8d, 0x72, 0xc6, 0x8b, 0xe0, 0x03, | ||
3701 | 1270 | 0xa0, 0xd9, 0xdd, 0x68, 0x49, 0xab, 0xa8, 0x36, 0xfe, 0x8a, 0x17, 0x92, | ||
3702 | 1271 | 0xb8, 0x1c, 0x90, 0xe1, 0x29, 0x45, 0xbf, 0xe1, 0xf2, 0x7a, 0x9c, 0x6b, | ||
3703 | 1272 | 0x2a, 0xf6, 0x6a, 0x06, 0x3c, 0xdb, 0x77, 0x21, 0xa7, 0xf2, 0x3f, 0xb3, | ||
3704 | 1273 | 0x0a, 0xfd, 0xbd, 0x8b, 0x18, 0xdb, 0x37, 0x7d, 0xd1, 0x69, 0x7f, 0x15, | ||
3705 | 1274 | 0x7b, 0xe8, 0x1c, 0x15, 0x78, 0xd0, 0x8b, 0x06, 0x6c, 0x71, 0xb0, 0xc5, | ||
3706 | 1275 | 0xca, 0x7f, 0xee, 0xca, 0xc1, 0xcd, 0xd9, 0x38, 0xcf, 0x9a, 0xd5, 0x25, | ||
3707 | 1276 | 0xf7, 0x48, 0x44, 0x66, 0x09, 0x08, 0x19, 0x4b, 0x28, 0xe5, 0x4e, 0xdd, | ||
3708 | 1277 | 0xb1, 0x58, 0xf6, 0xe4, 0xc9, 0x21, 0xb8, 0x11, 0xd9, 0x0d, 0xb7, 0x1a, | ||
3709 | 1278 | 0x92, 0xff, 0x87, 0x2d, 0xb2, 0x25, 0x0d, 0xcc, 0x3f, 0x84, 0x7f, 0xc7, | ||
3710 | 1279 | 0x52, 0xb6, 0x6d, 0x77, 0xe3, 0x3c, 0x85, 0x08, 0x4d, 0x3f, 0xa5, 0x3b, | ||
3711 | 1280 | 0x4f, 0x30, 0x50, 0x3d, 0x2a, 0x06, 0xe6, 0xca, 0xbb, 0x90, 0x33, 0xd5, | ||
3712 | 1281 | 0x9f, 0xc1, 0xdc, 0x15, 0xe3, 0x2f, 0x19, 0x84, 0x6a, 0x03, 0x9b, 0x91, | ||
3713 | 1282 | 0x59, 0x7b, 0x0b, 0xa3, 0x14, 0x1a, 0x7d, 0x97, 0x17, 0x63, 0x00, 0x62, | ||
3714 | 1283 | 0x17, 0x01, 0x17, 0xb2, 0x13, 0x1d, 0xab, 0x77, 0x40, 0x6e, 0x9e, 0xd7, | ||
3715 | 1284 | 0xd6, 0x6b, 0x2c, 0x75, 0x4d, 0x84, 0x9c, 0x60}, | ||
3716 | 1285 | {{Action::WRAP, | ||
3717 | 1286 | {SECSuccess, true}}, // Round counter overflows - acceptable | ||
3718 | 1287 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
3719 | 1288 | |||
3720 | 1289 | {106, // empty keys cannot be wrapped | ||
3721 | 1290 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3722 | 1291 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3723 | 1292 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3724 | 1293 | {}, | ||
3725 | 1294 | {0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6, 0xa6}, | ||
3726 | 1295 | {{Action::WRAP, {SECFailure, false}}, | ||
3727 | 1296 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3728 | 1297 | |||
3729 | 1298 | {107, // keys of size 8 byte cannot be wrapped | ||
3730 | 1299 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3731 | 1300 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3732 | 1301 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3733 | 1302 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, | ||
3734 | 1303 | {0x18, 0x1b, 0xa6, 0xa3, 0xa4, 0x39, 0x24, 0x69, 0xe3, 0xde, 0x98, 0xdd, | ||
3735 | 1304 | 0xbb, 0xdd, 0x24, 0x32}, | ||
3736 | 1305 | {{Action::WRAP, {SECFailure, false}}, | ||
3737 | 1306 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3738 | 1307 | |||
3739 | 1308 | {108, // wrapped key size must be divisible by 8 | ||
3740 | 1309 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3741 | 1310 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3742 | 1311 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3743 | 1312 | {0x00}, | ||
3744 | 1313 | {}, | ||
3745 | 1314 | {{Action::WRAP, {SECFailure, false}}, | ||
3746 | 1315 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3747 | 1316 | |||
3748 | 1317 | {109, // wrapped key size must be divisible by 8 | ||
3749 | 1318 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3750 | 1319 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3751 | 1320 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3752 | 1321 | {0x00, 0x01}, | ||
3753 | 1322 | {}, | ||
3754 | 1323 | {{Action::WRAP, {SECFailure, false}}, | ||
3755 | 1324 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3756 | 1325 | |||
3757 | 1326 | {110, // wrapped key size must be divisible by 8 | ||
3758 | 1327 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3759 | 1328 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3760 | 1329 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3761 | 1330 | {0x00, 0x01, 0x02}, | ||
3762 | 1331 | {}, | ||
3763 | 1332 | {{Action::WRAP, {SECFailure, false}}, | ||
3764 | 1333 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3765 | 1334 | |||
3766 | 1335 | {111, // wrapped key size must be divisible by 8 | ||
3767 | 1336 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3768 | 1337 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3769 | 1338 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3770 | 1339 | {0x00, 0x01, 0x02, 0x03}, | ||
3771 | 1340 | {}, | ||
3772 | 1341 | {{Action::WRAP, {SECFailure, false}}, | ||
3773 | 1342 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3774 | 1343 | |||
3775 | 1344 | {112, // wrapped key size must be divisible by 8 | ||
3776 | 1345 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3777 | 1346 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3778 | 1347 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3779 | 1348 | {0x00, 0x01, 0x02, 0x03, 0x04}, | ||
3780 | 1349 | {}, | ||
3781 | 1350 | {{Action::WRAP, {SECFailure, false}}, | ||
3782 | 1351 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3783 | 1352 | |||
3784 | 1353 | {113, // wrapped key size must be divisible by 8 | ||
3785 | 1354 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3786 | 1355 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3787 | 1356 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3788 | 1357 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05}, | ||
3789 | 1358 | {}, | ||
3790 | 1359 | {{Action::WRAP, {SECFailure, false}}, | ||
3791 | 1360 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3792 | 1361 | |||
3793 | 1362 | {114, // wrapped key size must be divisible by 8 | ||
3794 | 1363 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3795 | 1364 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3796 | 1365 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3797 | 1366 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06}, | ||
3798 | 1367 | {}, | ||
3799 | 1368 | {{Action::WRAP, {SECFailure, false}}, | ||
3800 | 1369 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3801 | 1370 | |||
3802 | 1371 | {115, // wrapped key size must be divisible by 8 | ||
3803 | 1372 | {0x57, 0x49, 0x57, 0x15, 0x1f, 0xc2, 0xaf, 0xe0, 0xfa, 0x3d, 0xc7, | ||
3804 | 1373 | 0xa9, 0xa7, 0xda, 0x64, 0x95, 0x39, 0x8f, 0x18, 0xea, 0x0d, 0x8e, | ||
3805 | 1374 | 0xed, 0x76, 0xa5, 0x1a, 0xac, 0x96, 0x03, 0x8a, 0xd6, 0x92}, | ||
3806 | 1375 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, | ||
3807 | 1376 | 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13}, | ||
3808 | 1377 | {}, | ||
3809 | 1378 | {{Action::WRAP, {SECFailure, false}}, | ||
3810 | 1379 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3811 | 1380 | |||
3812 | 1381 | {116, // invalid size of wrapped key | ||
3813 | 1382 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3814 | 1383 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3815 | 1384 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3816 | 1385 | {}, | ||
3817 | 1386 | {}, | ||
3818 | 1387 | {{Action::WRAP, {SECFailure, false}}, | ||
3819 | 1388 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3820 | 1389 | |||
3821 | 1390 | {117, // invalid size of wrapped key | ||
3822 | 1391 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3823 | 1392 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3824 | 1393 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3825 | 1394 | {}, | ||
3826 | 1395 | {0x9f}, | ||
3827 | 1396 | {{Action::WRAP, {SECFailure, false}}, | ||
3828 | 1397 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3829 | 1398 | |||
3830 | 1399 | {118, // invalid size of wrapped key | ||
3831 | 1400 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3832 | 1401 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3833 | 1402 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3834 | 1403 | {}, | ||
3835 | 1404 | {0xdc, 0x9e, 0x95, 0x80}, | ||
3836 | 1405 | {{Action::WRAP, {SECFailure, false}}, | ||
3837 | 1406 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3838 | 1407 | |||
3839 | 1408 | {119, // invalid size of wrapped key | ||
3840 | 1409 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3841 | 1410 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3842 | 1411 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3843 | 1412 | {}, | ||
3844 | 1413 | {0xb9, 0xb2, 0x82, 0xd1, 0x38, 0x69, 0x30, 0x00}, | ||
3845 | 1414 | {{Action::WRAP, {SECFailure, false}}, | ||
3846 | 1415 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3847 | 1416 | |||
3848 | 1417 | {120, // invalid size of wrapped key | ||
3849 | 1418 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3850 | 1419 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3851 | 1420 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3852 | 1421 | {}, | ||
3853 | 1422 | {0x0e, 0xfc, 0x63, 0x5b, 0x2d, 0x61, 0xe2, 0x44, 0x05, 0x6b, 0x9d, 0x45, | ||
3854 | 1423 | 0x91, 0xca, 0x6b}, | ||
3855 | 1424 | {{Action::WRAP, {SECFailure, false}}, | ||
3856 | 1425 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3857 | 1426 | |||
3858 | 1427 | {121, // invalid size of wrapped key | ||
3859 | 1428 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3860 | 1429 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3861 | 1430 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3862 | 1431 | {}, | ||
3863 | 1432 | {0x4a, 0x30, 0x5d, 0xae, 0x08, 0x7b, 0x0d, 0x24, 0xd6, 0x2a, 0xf4, 0x18, | ||
3864 | 1433 | 0x31, 0x33, 0x8f, 0x33, 0xae}, | ||
3865 | 1434 | {{Action::WRAP, {SECFailure, false}}, | ||
3866 | 1435 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3867 | 1436 | |||
3868 | 1437 | {122, // invalid size of wrapped key | ||
3869 | 1438 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3870 | 1439 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3871 | 1440 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3872 | 1441 | {}, | ||
3873 | 1442 | {0x82, 0xcb, 0x92, 0x70, 0x97, 0xcf, 0x31, 0xea, 0x4a, 0xff, | ||
3874 | 1443 | 0xea, 0x44, 0x0b, 0x0d, 0x8c, 0xa6, 0xa2, 0x40, 0xb9, 0x00}, | ||
3875 | 1444 | {{Action::WRAP, {SECFailure, false}}, | ||
3876 | 1445 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3877 | 1446 | |||
3878 | 1447 | {123, // bytes appended to wrapped key | ||
3879 | 1448 | {0xfe, 0x60, 0xfc, 0x8d, 0xf7, 0xd9, 0xf4, 0xeb, 0xb5, 0x41, 0x6c, | ||
3880 | 1449 | 0xa4, 0xe8, 0x21, 0x82, 0xf7, 0xe9, 0x92, 0x3a, 0x74, 0x61, 0x10, | ||
3881 | 1450 | 0xfd, 0x97, 0x8e, 0x3b, 0xd2, 0xde, 0xfc, 0x1c, 0x10, 0xd7}, | ||
3882 | 1451 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, | ||
3883 | 1452 | 0x0c, 0x0d, 0x0e, 0x0f}, | ||
3884 | 1453 | {0x7d, 0xfb, 0xd7, 0xcf, 0x61, 0x58, 0xd7, 0x5b, 0xb5, | ||
3885 | 1454 | 0x90, 0x0b, 0x3b, 0xf1, 0xe3, 0x87, 0x10, 0x03, 0x40, | ||
3886 | 1455 | 0x2a, 0x65, 0x08, 0xb1, 0x91, 0x28, 0x00}, | ||
3887 | 1456 | {{Action::WRAP, {SECSuccess, false}}, | ||
3888 | 1457 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3889 | 1458 | |||
3890 | 1459 | {124, // Incorrect IV | ||
3891 | 1460 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3892 | 1461 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3893 | 1462 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3894 | 1463 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3895 | 1464 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3896 | 1465 | {0xa4, 0x17, 0x67, 0x1b, 0xc6, 0x2a, 0x23, 0xc7, 0xa6, 0x55, 0x43, 0x09, | ||
3897 | 1466 | 0x21, 0x24, 0x02, 0x4d, 0xf7, 0x2c, 0x04, 0x8d, 0x8d, 0xb3, 0x30, 0xc7}, | ||
3898 | 1467 | {{Action::WRAP, {SECSuccess, false}}, | ||
3899 | 1468 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3900 | 1469 | |||
3901 | 1470 | {125, // Incorrect IV | ||
3902 | 1471 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3903 | 1472 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3904 | 1473 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3905 | 1474 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3906 | 1475 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3907 | 1476 | {0x95, 0x18, 0xd0, 0xf9, 0x9d, 0x7a, 0x73, 0xed, 0x4a, 0x50, 0x2b, 0x44, | ||
3908 | 1477 | 0x9c, 0x14, 0xc2, 0x85, 0x97, 0x1b, 0x0e, 0x61, 0x77, 0xce, 0x0e, 0xca}, | ||
3909 | 1478 | {{Action::WRAP, {SECSuccess, false}}, | ||
3910 | 1479 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3911 | 1480 | |||
3912 | 1481 | {126, // Incorrect IV | ||
3913 | 1482 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3914 | 1483 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3915 | 1484 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3916 | 1485 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3917 | 1486 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3918 | 1487 | {0xf3, 0x51, 0x1f, 0x04, 0x91, 0xbd, 0x74, 0xae, 0x1d, 0xef, 0xb5, 0x30, | ||
3919 | 1488 | 0x7f, 0x0e, 0x18, 0xdb, 0x86, 0x4b, 0x57, 0xb5, 0xc4, 0x04, 0xd4, 0x28}, | ||
3920 | 1489 | {{Action::WRAP, {SECSuccess, false}}, | ||
3921 | 1490 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3922 | 1491 | |||
3923 | 1492 | {127, // Incorrect IV | ||
3924 | 1493 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3925 | 1494 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3926 | 1495 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3927 | 1496 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3928 | 1497 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3929 | 1498 | {0x6c, 0x03, 0xce, 0x77, 0x92, 0x59, 0x66, 0x1c, 0x43, 0xd4, 0x1d, 0x5d, | ||
3930 | 1499 | 0x0e, 0x45, 0x68, 0x7f, 0x87, 0x43, 0x53, 0xbb, 0xa5, 0x16, 0xc7, 0x3e}, | ||
3931 | 1500 | {{Action::WRAP, {SECSuccess, false}}, | ||
3932 | 1501 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3933 | 1502 | |||
3934 | 1503 | {128, // Incorrect IV | ||
3935 | 1504 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3936 | 1505 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3937 | 1506 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3938 | 1507 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3939 | 1508 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3940 | 1509 | {0x8d, 0xf0, 0x19, 0x69, 0xa1, 0x1c, 0x87, 0x02, 0x65, 0x35, 0xbf, 0xcc, | ||
3941 | 1510 | 0xf7, 0x2b, 0x1d, 0x06, 0x4c, 0x86, 0xec, 0xc7, 0xe5, 0x22, 0x71, 0x57}, | ||
3942 | 1511 | {{Action::WRAP, {SECSuccess, false}}, | ||
3943 | 1512 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3944 | 1513 | |||
3945 | 1514 | {129, // Incorrect IV | ||
3946 | 1515 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3947 | 1516 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3948 | 1517 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3949 | 1518 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3950 | 1519 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3951 | 1520 | {0x8e, 0xd1, 0xcd, 0xe2, 0x28, 0xd9, 0xc8, 0xd0, 0x46, 0xdc, 0xa6, 0x5c, | ||
3952 | 1521 | 0x7a, 0x27, 0xae, 0xf2, 0xed, 0xf8, 0xae, 0x90, 0xc7, 0x05, 0xd1, 0xe9}, | ||
3953 | 1522 | {{Action::WRAP, {SECSuccess, false}}, | ||
3954 | 1523 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3955 | 1524 | |||
3956 | 1525 | {130, // Incorrect IV | ||
3957 | 1526 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3958 | 1527 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3959 | 1528 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3960 | 1529 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3961 | 1530 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3962 | 1531 | {0xd6, 0x9b, 0x3e, 0x34, 0xe9, 0xde, 0x38, 0xd4, 0x4d, 0xe1, 0x99, 0x89, | ||
3963 | 1532 | 0x92, 0x36, 0x2a, 0x6f, 0xa1, 0xf6, 0x96, 0xb5, 0xac, 0xab, 0x3f, 0x10}, | ||
3964 | 1533 | {{Action::WRAP, {SECSuccess, false}}, | ||
3965 | 1534 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3966 | 1535 | |||
3967 | 1536 | {131, // Incorrect IV | ||
3968 | 1537 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3969 | 1538 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3970 | 1539 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3971 | 1540 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3972 | 1541 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3973 | 1542 | {0x67, 0x86, 0x51, 0x22, 0xaf, 0x32, 0x94, 0xb8, 0xda, 0x05, 0x88, 0x77, | ||
3974 | 1543 | 0x51, 0x25, 0xcb, 0xd6, 0xdc, 0x19, 0xd5, 0xe5, 0xca, 0xb9, 0x7b, 0x6d}, | ||
3975 | 1544 | {{Action::WRAP, {SECSuccess, false}}, | ||
3976 | 1545 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3977 | 1546 | |||
3978 | 1547 | {132, // Incorrect IV | ||
3979 | 1548 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3980 | 1549 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3981 | 1550 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3982 | 1551 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3983 | 1552 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3984 | 1553 | {0x9f, 0x0f, 0xa5, 0x23, 0x63, 0xdd, 0x55, 0xdf, 0x47, 0x2d, 0x86, 0x7e, | ||
3985 | 1554 | 0x6f, 0xaf, 0x5d, 0xa8, 0xeb, 0x20, 0x4a, 0x1d, 0x6d, 0x49, 0x70, 0x30}, | ||
3986 | 1555 | {{Action::WRAP, {SECSuccess, false}}, | ||
3987 | 1556 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3988 | 1557 | |||
3989 | 1558 | {133, // Incorrect IV | ||
3990 | 1559 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
3991 | 1560 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
3992 | 1561 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
3993 | 1562 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
3994 | 1563 | 0x01, 0xd0, 0x70, 0xa5}, | ||
3995 | 1564 | {0xc3, 0x99, 0xf9, 0x99, 0xc9, 0x6a, 0x42, 0x04, 0x32, 0x5e, 0x7f, 0x08, | ||
3996 | 1565 | 0xd6, 0xa4, 0xde, 0x25, 0x6f, 0xaf, 0x21, 0xec, 0x2c, 0x00, 0x7d, 0xdf}, | ||
3997 | 1566 | {{Action::WRAP, {SECSuccess, false}}, | ||
3998 | 1567 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
3999 | 1568 | |||
4000 | 1569 | {134, // Incorrect IV | ||
4001 | 1570 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4002 | 1571 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4003 | 1572 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4004 | 1573 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4005 | 1574 | 0x01, 0xd0, 0x70, 0xa5}, | ||
4006 | 1575 | {0x28, 0x20, 0x82, 0x26, 0x4a, 0x87, 0xdc, 0x35, 0xce, 0x1c, 0xc5, 0xb9, | ||
4007 | 1576 | 0x93, 0x1b, 0x77, 0xd8, 0x0d, 0x82, 0xfc, 0xac, 0xc0, 0x92, 0x7f, 0x85}, | ||
4008 | 1577 | {{Action::WRAP, {SECSuccess, false}}, | ||
4009 | 1578 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4010 | 1579 | |||
4011 | 1580 | {135, // Incorrect IV | ||
4012 | 1581 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4013 | 1582 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4014 | 1583 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4015 | 1584 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4016 | 1585 | 0x01, 0xd0, 0x70, 0xa5}, | ||
4017 | 1586 | {0xc1, 0x92, 0xc9, 0x0b, 0x83, 0x00, 0x3c, 0xa9, 0x67, 0x44, 0x49, 0x80, | ||
4018 | 1587 | 0x14, 0xb6, 0xad, 0x6b, 0xed, 0xda, 0x83, 0x79, 0x55, 0x26, 0x98, 0x19}, | ||
4019 | 1588 | {{Action::WRAP, {SECSuccess, false}}, | ||
4020 | 1589 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4021 | 1590 | |||
4022 | 1591 | {136, // Incorrect IV | ||
4023 | 1592 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4024 | 1593 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4025 | 1594 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4026 | 1595 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4027 | 1596 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4028 | 1597 | {0x30, 0xa9, 0x83, 0xcd, 0x9e, 0x69, 0xd5, 0x61, 0xac, 0xc9, 0x5c, | ||
4029 | 1598 | 0x42, 0xb2, 0x52, 0xab, 0xa4, 0x18, 0x5f, 0x83, 0x92, 0xf2, 0xe6, | ||
4030 | 1599 | 0xc9, 0x35, 0xc8, 0xeb, 0x10, 0x5a, 0xf8, 0x08, 0x2e, 0x34}, | ||
4031 | 1600 | {{Action::WRAP, {SECSuccess, false}}, | ||
4032 | 1601 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4033 | 1602 | |||
4034 | 1603 | {137, // Incorrect IV | ||
4035 | 1604 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4036 | 1605 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4037 | 1606 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4038 | 1607 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4039 | 1608 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4040 | 1609 | {0x4d, 0xe9, 0xa6, 0x39, 0xb7, 0x99, 0x63, 0x0b, 0x45, 0xb4, 0x9e, | ||
4041 | 1610 | 0x28, 0xdb, 0xfc, 0x44, 0xda, 0xbb, 0x98, 0x43, 0xee, 0x58, 0x8a, | ||
4042 | 1611 | 0x8c, 0xff, 0x28, 0x6b, 0x8d, 0x5f, 0xbd, 0x7b, 0x32, 0xee}, | ||
4043 | 1612 | {{Action::WRAP, {SECSuccess, false}}, | ||
4044 | 1613 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4045 | 1614 | |||
4046 | 1615 | {138, // Incorrect IV | ||
4047 | 1616 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4048 | 1617 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4049 | 1618 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4050 | 1619 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4051 | 1620 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4052 | 1621 | {0xd9, 0x15, 0xb2, 0xcd, 0xfb, 0x76, 0x9d, 0x9d, 0x82, 0x25, 0x9d, | ||
4053 | 1622 | 0xc3, 0xd1, 0x24, 0x64, 0x6b, 0xbf, 0x97, 0x2b, 0x83, 0xef, 0xd4, | ||
4054 | 1623 | 0xc2, 0xea, 0xe9, 0xb9, 0xf7, 0x51, 0x07, 0x3f, 0x78, 0xd6}, | ||
4055 | 1624 | {{Action::WRAP, {SECSuccess, false}}, | ||
4056 | 1625 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4057 | 1626 | |||
4058 | 1627 | {139, // Incorrect IV | ||
4059 | 1628 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4060 | 1629 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4061 | 1630 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4062 | 1631 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4063 | 1632 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4064 | 1633 | {0x11, 0x7d, 0x65, 0x3f, 0x48, 0x0b, 0x69, 0xfc, 0xe5, 0x64, 0xf1, | ||
4065 | 1634 | 0xfe, 0x99, 0x57, 0x24, 0x92, 0x94, 0x51, 0x89, 0xed, 0x5a, 0xf7, | ||
4066 | 1635 | 0x89, 0xce, 0x05, 0xa2, 0x65, 0x1b, 0xaf, 0x90, 0xbb, 0x5e}, | ||
4067 | 1636 | {{Action::WRAP, {SECSuccess, false}}, | ||
4068 | 1637 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4069 | 1638 | |||
4070 | 1639 | {140, // Incorrect IV | ||
4071 | 1640 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4072 | 1641 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4073 | 1642 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4074 | 1643 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4075 | 1644 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4076 | 1645 | {0x82, 0x26, 0xd0, 0x7a, 0x2f, 0x91, 0x9e, 0x24, 0xad, 0xa1, 0x08, | ||
4077 | 1646 | 0x1c, 0x69, 0xa7, 0x55, 0x20, 0xbe, 0x89, 0x5e, 0x3a, 0x2b, 0xda, | ||
4078 | 1647 | 0x9b, 0x80, 0x5d, 0x97, 0x47, 0x77, 0x3d, 0xde, 0xaa, 0x38}, | ||
4079 | 1648 | {{Action::WRAP, {SECSuccess, false}}, | ||
4080 | 1649 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4081 | 1650 | |||
4082 | 1651 | {141, // Incorrect IV | ||
4083 | 1652 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4084 | 1653 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4085 | 1654 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4086 | 1655 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4087 | 1656 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4088 | 1657 | {0xb0, 0xa7, 0x43, 0x45, 0xbe, 0xdf, 0x88, 0x65, 0x34, 0x8d, 0xaf, | ||
4089 | 1658 | 0x45, 0xd0, 0x54, 0xb9, 0x9c, 0xe5, 0x15, 0xea, 0x8b, 0xe1, 0x36, | ||
4090 | 1659 | 0x27, 0x0d, 0x1c, 0xf7, 0x1e, 0x1c, 0xfa, 0x7a, 0xa4, 0xa2}, | ||
4091 | 1660 | {{Action::WRAP, {SECSuccess, false}}, | ||
4092 | 1661 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4093 | 1662 | |||
4094 | 1663 | {142, // Incorrect IV | ||
4095 | 1664 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4096 | 1665 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4097 | 1666 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4098 | 1667 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4099 | 1668 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4100 | 1669 | {0xa2, 0x61, 0xdb, 0x77, 0xf1, 0x7f, 0x7e, 0xc7, 0x36, 0xd1, 0xa8, | ||
4101 | 1670 | 0xbe, 0x16, 0xe5, 0xf9, 0xae, 0x43, 0x2f, 0xe2, 0xa1, 0x70, 0x12, | ||
4102 | 1671 | 0xe5, 0xa6, 0xf0, 0x7c, 0x54, 0x26, 0xa9, 0xf0, 0xca, 0x59}, | ||
4103 | 1672 | {{Action::WRAP, {SECSuccess, false}}, | ||
4104 | 1673 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4105 | 1674 | |||
4106 | 1675 | {143, // Incorrect IV | ||
4107 | 1676 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4108 | 1677 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4109 | 1678 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4110 | 1679 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4111 | 1680 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4112 | 1681 | {0xc5, 0x3a, 0xcb, 0x5e, 0x09, 0x6b, 0x54, 0x54, 0x8e, 0x13, 0x85, | ||
4113 | 1682 | 0xb2, 0xff, 0x18, 0xea, 0xef, 0x68, 0xd2, 0x35, 0xc9, 0x5b, 0x01, | ||
4114 | 1683 | 0x94, 0xe7, 0x4a, 0x23, 0x83, 0xd3, 0xa7, 0xa5, 0x30, 0xdc}, | ||
4115 | 1684 | {{Action::WRAP, {SECSuccess, false}}, | ||
4116 | 1685 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4117 | 1686 | |||
4118 | 1687 | {144, // Incorrect IV | ||
4119 | 1688 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4120 | 1689 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4121 | 1690 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4122 | 1691 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4123 | 1692 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4124 | 1693 | {0xfa, 0xef, 0x48, 0x2d, 0x99, 0xeb, 0xb1, 0x80, 0xe5, 0xbc, 0x5e, | ||
4125 | 1694 | 0x3c, 0xf7, 0x75, 0xba, 0x29, 0x2c, 0x2a, 0x3b, 0x6c, 0x44, 0xaa, | ||
4126 | 1695 | 0x4a, 0x21, 0xad, 0x40, 0x09, 0x06, 0xf1, 0x1a, 0xf3, 0x92}, | ||
4127 | 1696 | {{Action::WRAP, {SECSuccess, false}}, | ||
4128 | 1697 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4129 | 1698 | |||
4130 | 1699 | {145, // Incorrect IV | ||
4131 | 1700 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4132 | 1701 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4133 | 1702 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4134 | 1703 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4135 | 1704 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4136 | 1705 | {0x73, 0xa4, 0x50, 0xb6, 0x3b, 0x07, 0xb3, 0xae, 0xce, 0x9d, 0x1a, | ||
4137 | 1706 | 0xe5, 0xbf, 0x09, 0x7a, 0x3d, 0xd3, 0xfc, 0xf7, 0x3e, 0x3e, 0xc2, | ||
4138 | 1707 | 0xf1, 0xbd, 0x8f, 0xc3, 0xb5, 0x58, 0x6c, 0xb9, 0xbd, 0x73}, | ||
4139 | 1708 | {{Action::WRAP, {SECSuccess, false}}, | ||
4140 | 1709 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4141 | 1710 | |||
4142 | 1711 | {146, // Incorrect IV | ||
4143 | 1712 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4144 | 1713 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4145 | 1714 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4146 | 1715 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4147 | 1716 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4148 | 1717 | {0xd3, 0x4b, 0x6e, 0xe1, 0x84, 0xd3, 0x87, 0xc9, 0xaa, 0x4b, 0x2d, | ||
4149 | 1718 | 0x18, 0x0a, 0xe0, 0xa8, 0x94, 0x98, 0x01, 0x4e, 0x55, 0xfe, 0x8e, | ||
4150 | 1719 | 0x41, 0x6b, 0xe4, 0xf8, 0x26, 0xfc, 0xf7, 0xd5, 0x65, 0x22}, | ||
4151 | 1720 | {{Action::WRAP, {SECSuccess, false}}, | ||
4152 | 1721 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4153 | 1722 | |||
4154 | 1723 | {147, // Incorrect IV | ||
4155 | 1724 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4156 | 1725 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4157 | 1726 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4158 | 1727 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, 0xfa, | ||
4159 | 1728 | 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, 0xe4, 0xf1}, | ||
4160 | 1729 | {0x2a, 0xf8, 0x23, 0xd1, 0x60, 0x28, 0x03, 0x74, 0x0b, 0xfa, 0x90, | ||
4161 | 1730 | 0x40, 0xc2, 0xc4, 0xe7, 0x69, 0xa5, 0xb6, 0xde, 0x91, 0x9d, 0x40, | ||
4162 | 1731 | 0x3c, 0xfb, 0xa9, 0xad, 0x36, 0x0f, 0x63, 0xaf, 0x11, 0x13}, | ||
4163 | 1732 | {{Action::WRAP, {SECSuccess, false}}, | ||
4164 | 1733 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4165 | 1734 | |||
4166 | 1735 | {148, // Incorrect IV | ||
4167 | 1736 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4168 | 1737 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4169 | 1738 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4170 | 1739 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4171 | 1740 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4172 | 1741 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4173 | 1742 | {0xdd, 0x78, 0xeb, 0xd3, 0x09, 0x1c, 0x55, 0xa5, 0xda, 0x5b, | ||
4174 | 1743 | 0x24, 0x50, 0x42, 0x00, 0xf7, 0xfa, 0xdd, 0x1b, 0x3a, 0xc6, | ||
4175 | 1744 | 0xad, 0x35, 0xf8, 0x14, 0xf7, 0x33, 0xe6, 0x03, 0xc1, 0x39, | ||
4176 | 1745 | 0x36, 0x24, 0x5d, 0x69, 0xd8, 0x3f, 0x26, 0x2f, 0x6b, 0x1e}, | ||
4177 | 1746 | {{Action::WRAP, {SECSuccess, false}}, | ||
4178 | 1747 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4179 | 1748 | |||
4180 | 1749 | {149, // Incorrect IV | ||
4181 | 1750 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4182 | 1751 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4183 | 1752 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4184 | 1753 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4185 | 1754 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4186 | 1755 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4187 | 1756 | {0x3d, 0x83, 0x38, 0xea, 0xe7, 0xde, 0x32, 0x23, 0x99, 0xe1, | ||
4188 | 1757 | 0xd1, 0xb4, 0xa3, 0xdf, 0x54, 0x32, 0x6b, 0x24, 0x2b, 0x56, | ||
4189 | 1758 | 0x36, 0x12, 0xea, 0x4b, 0x27, 0xda, 0x22, 0xa0, 0x41, 0xd3, | ||
4190 | 1759 | 0xc8, 0x09, 0x66, 0x91, 0x1b, 0xc0, 0x09, 0x91, 0x17, 0x61}, | ||
4191 | 1760 | {{Action::WRAP, {SECSuccess, false}}, | ||
4192 | 1761 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4193 | 1762 | |||
4194 | 1763 | {150, // Incorrect IV | ||
4195 | 1764 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4196 | 1765 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4197 | 1766 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4198 | 1767 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4199 | 1768 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4200 | 1769 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4201 | 1770 | {0xd0, 0x4b, 0xf7, 0x5c, 0xad, 0xd3, 0xb5, 0xf0, 0x99, 0xc3, | ||
4202 | 1771 | 0x4b, 0x27, 0xa9, 0x1e, 0x64, 0xa8, 0xf2, 0xdb, 0xcf, 0x08, | ||
4203 | 1772 | 0xe8, 0xc5, 0xc1, 0xc9, 0xf0, 0x7a, 0x77, 0x7e, 0xeb, 0x80, | ||
4204 | 1773 | 0x5d, 0x5d, 0x0e, 0x8c, 0x5c, 0x01, 0xaf, 0xc4, 0x39, 0x44}, | ||
4205 | 1774 | {{Action::WRAP, {SECSuccess, false}}, | ||
4206 | 1775 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4207 | 1776 | |||
4208 | 1777 | {151, // Incorrect IV | ||
4209 | 1778 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4210 | 1779 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4211 | 1780 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4212 | 1781 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4213 | 1782 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4214 | 1783 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4215 | 1784 | {0xbe, 0x0c, 0x5d, 0x19, 0x3b, 0x61, 0xc5, 0x13, 0x7a, 0x8f, | ||
4216 | 1785 | 0xd8, 0xa6, 0xd7, 0xd1, 0xed, 0x8f, 0x0f, 0xa2, 0x8c, 0xec, | ||
4217 | 1786 | 0x51, 0x6f, 0x54, 0x46, 0x97, 0xc1, 0x2a, 0xdd, 0x4f, 0x8f, | ||
4218 | 1787 | 0x4d, 0x5c, 0xfc, 0xa6, 0x5e, 0xde, 0xb1, 0x01, 0x99, 0x74}, | ||
4219 | 1788 | {{Action::WRAP, {SECSuccess, false}}, | ||
4220 | 1789 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4221 | 1790 | |||
4222 | 1791 | {152, // Incorrect IV | ||
4223 | 1792 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4224 | 1793 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4225 | 1794 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4226 | 1795 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4227 | 1796 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4228 | 1797 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4229 | 1798 | {0xa8, 0x3e, 0xbc, 0xbe, 0xb2, 0xbe, 0x9d, 0x68, 0x07, 0xb5, | ||
4230 | 1799 | 0xcf, 0xc3, 0x1c, 0x89, 0x84, 0x9d, 0x13, 0x43, 0xdd, 0x4e, | ||
4231 | 1800 | 0xb2, 0x2e, 0x5b, 0xfe, 0x9e, 0x2b, 0x2b, 0x37, 0x90, 0xad, | ||
4232 | 1801 | 0x89, 0x00, 0x60, 0x1f, 0x1f, 0x5d, 0x54, 0xfd, 0x47, 0x2f}, | ||
4233 | 1802 | {{Action::WRAP, {SECSuccess, false}}, | ||
4234 | 1803 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4235 | 1804 | |||
4236 | 1805 | {153, // Incorrect IV | ||
4237 | 1806 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4238 | 1807 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4239 | 1808 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4240 | 1809 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4241 | 1810 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4242 | 1811 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4243 | 1812 | {0x41, 0x62, 0x21, 0x48, 0x5a, 0x6c, 0xb9, 0x8a, 0xd1, 0x34, | ||
4244 | 1813 | 0x2e, 0xa9, 0xa1, 0x29, 0x26, 0xa9, 0xa1, 0x33, 0xea, 0xd8, | ||
4245 | 1814 | 0xbd, 0x91, 0x93, 0x23, 0xfe, 0x78, 0x9b, 0xb8, 0xf8, 0x9a, | ||
4246 | 1815 | 0x4f, 0xca, 0xf8, 0x1e, 0x1b, 0xe5, 0x4f, 0x9d, 0x35, 0x8e}, | ||
4247 | 1816 | {{Action::WRAP, {SECSuccess, false}}, | ||
4248 | 1817 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4249 | 1818 | |||
4250 | 1819 | {154, // Incorrect IV | ||
4251 | 1820 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4252 | 1821 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4253 | 1822 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4254 | 1823 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4255 | 1824 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4256 | 1825 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4257 | 1826 | {0xbf, 0x6a, 0x53, 0x28, 0x6f, 0xac, 0x48, 0xe7, 0xf2, 0x5d, | ||
4258 | 1827 | 0x89, 0xb7, 0x05, 0x6b, 0x27, 0xaa, 0x91, 0x7d, 0x5b, 0x54, | ||
4259 | 1828 | 0xc0, 0xd3, 0x17, 0x1d, 0xff, 0x36, 0x9f, 0x72, 0x49, 0x15, | ||
4260 | 1829 | 0x3b, 0xf0, 0x9d, 0xa5, 0x89, 0x1e, 0xb4, 0xdc, 0x2d, 0x88}, | ||
4261 | 1830 | {{Action::WRAP, {SECSuccess, false}}, | ||
4262 | 1831 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4263 | 1832 | |||
4264 | 1833 | {155, // Incorrect IV | ||
4265 | 1834 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4266 | 1835 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4267 | 1836 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4268 | 1837 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4269 | 1838 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4270 | 1839 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4271 | 1840 | {0x99, 0xd5, 0x17, 0xa1, 0x32, 0x1b, 0xb6, 0x33, 0xb0, 0xd5, | ||
4272 | 1841 | 0xf3, 0xaf, 0xda, 0x23, 0x72, 0xd3, 0xab, 0xf6, 0x8b, 0x41, | ||
4273 | 1842 | 0xd1, 0x3c, 0xbf, 0xdf, 0xfc, 0x78, 0xf1, 0x73, 0xb8, 0x8b, | ||
4274 | 1843 | 0xc4, 0xb9, 0x7e, 0xfc, 0xab, 0x2b, 0x29, 0x04, 0x78, 0x8d}, | ||
4275 | 1844 | {{Action::WRAP, {SECSuccess, false}}, | ||
4276 | 1845 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4277 | 1846 | |||
4278 | 1847 | {156, // Incorrect IV | ||
4279 | 1848 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4280 | 1849 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4281 | 1850 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4282 | 1851 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4283 | 1852 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4284 | 1853 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4285 | 1854 | {0xd9, 0x24, 0x56, 0xbc, 0x77, 0xa2, 0x68, 0xef, 0x71, 0xcb, | ||
4286 | 1855 | 0xa7, 0x60, 0x64, 0xa1, 0xb7, 0x72, 0xd1, 0xfe, 0xe2, 0xae, | ||
4287 | 1856 | 0x4f, 0x0e, 0xe3, 0xbb, 0x93, 0x2a, 0x2a, 0xdb, 0x2b, 0x03, | ||
4288 | 1857 | 0x17, 0x96, 0xb9, 0xea, 0xdb, 0x51, 0x75, 0x3f, 0x28, 0x68}, | ||
4289 | 1858 | {{Action::WRAP, {SECSuccess, false}}, | ||
4290 | 1859 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4291 | 1860 | |||
4292 | 1861 | {157, // Incorrect IV | ||
4293 | 1862 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4294 | 1863 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4295 | 1864 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4296 | 1865 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4297 | 1866 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4298 | 1867 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4299 | 1868 | {0x5b, 0xb5, 0x46, 0x30, 0xab, 0x8d, 0x73, 0xa0, 0x40, 0xf0, | ||
4300 | 1869 | 0xf8, 0x7e, 0x70, 0xe2, 0x63, 0xd1, 0xae, 0xb2, 0x35, 0x8b, | ||
4301 | 1870 | 0xcd, 0xc0, 0xdc, 0xe6, 0x99, 0x4d, 0x0d, 0x87, 0x44, 0x52, | ||
4302 | 1871 | 0xbb, 0xd8, 0x74, 0x1b, 0x7e, 0xc1, 0xd5, 0x9d, 0x82, 0x98}, | ||
4303 | 1872 | {{Action::WRAP, {SECSuccess, false}}, | ||
4304 | 1873 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4305 | 1874 | |||
4306 | 1875 | {158, // Incorrect IV | ||
4307 | 1876 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4308 | 1877 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4309 | 1878 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4310 | 1879 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4311 | 1880 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4312 | 1881 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4313 | 1882 | {0x45, 0x81, 0xd6, 0x53, 0x60, 0x39, 0xdb, 0x1b, 0x23, 0xda, | ||
4314 | 1883 | 0x50, 0xc6, 0x48, 0x77, 0x7e, 0x90, 0xc8, 0x2d, 0x61, 0x28, | ||
4315 | 1884 | 0xbb, 0x92, 0xe2, 0x8b, 0x29, 0x74, 0xba, 0xe1, 0x14, 0x15, | ||
4316 | 1885 | 0x43, 0xa1, 0x9a, 0x15, 0x92, 0xfd, 0xa1, 0xfb, 0xd6, 0x1f}, | ||
4317 | 1886 | {{Action::WRAP, {SECSuccess, false}}, | ||
4318 | 1887 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4319 | 1888 | |||
4320 | 1889 | {159, // Incorrect IV | ||
4321 | 1890 | {0x4f, 0x71, 0x0e, 0xb6, 0xb5, 0xe2, 0x87, 0x03, 0xbe, 0xcf, 0xc3, | ||
4322 | 1891 | 0xdc, 0x52, 0xfa, 0x8b, 0xc1, 0xdd, 0x44, 0xa4, 0xa6, 0xd3, 0x8a, | ||
4323 | 1892 | 0x84, 0xb4, 0xf9, 0x4e, 0x89, 0xac, 0x32, 0xd9, 0x87, 0xe7}, | ||
4324 | 1893 | {0xa8, 0x28, 0xcb, 0xda, 0x9b, 0x5f, 0xf0, 0xae, 0x37, 0x4f, 0x84, | ||
4325 | 1894 | 0xfa, 0x01, 0xd0, 0x70, 0xa5, 0xf0, 0xa1, 0x7a, 0x0c, 0x46, 0x2b, | ||
4326 | 1895 | 0xe4, 0xf1, 0xac, 0xce, 0x34, 0x97, 0x35, 0x26, 0x90, 0x8c}, | ||
4327 | 1896 | {0xd3, 0x5b, 0xc6, 0x7e, 0x62, 0x06, 0x4c, 0x34, 0xf4, 0x81, | ||
4328 | 1897 | 0x50, 0x99, 0x9b, 0xa3, 0x0d, 0xed, 0x47, 0x5d, 0x8c, 0x75, | ||
4329 | 1898 | 0x97, 0x8f, 0x45, 0x73, 0x73, 0x20, 0xf2, 0x3e, 0xda, 0xaa, | ||
4330 | 1899 | 0x7a, 0x40, 0xd7, 0x80, 0x3f, 0xc6, 0x1a, 0xdd, 0x34, 0xa4}, | ||
4331 | 1900 | {{Action::WRAP, {SECSuccess, false}}, | ||
4332 | 1901 | {Action::UNWRAP, {SECFailure, false}}}}, | ||
4333 | 1902 | |||
4334 | 1903 | {160, // RFC 3394 | ||
4335 | 1904 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, | ||
4336 | 1905 | 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, | ||
4337 | 1906 | 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}, | ||
4338 | 1907 | {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, | ||
4339 | 1908 | 0xcc, 0xdd, 0xee, 0xff}, | ||
4340 | 1909 | {0x64, 0xe8, 0xc3, 0xf9, 0xce, 0x0f, 0x5b, 0xa2, 0x63, 0xe9, 0x77, 0x79, | ||
4341 | 1910 | 0x05, 0x81, 0x8a, 0x2a, 0x93, 0xc8, 0x19, 0x1e, 0x7d, 0x6e, 0x8a, 0xe7}, | ||
4342 | 1911 | {{Action::WRAP, {SECSuccess, true}}, | ||
4343 | 1912 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
4344 | 1913 | |||
4345 | 1914 | {161, // RFC 3394 | ||
4346 | 1915 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, | ||
4347 | 1916 | 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, | ||
4348 | 1917 | 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}, | ||
4349 | 1918 | {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, 0xbb, | ||
4350 | 1919 | 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}, | ||
4351 | 1920 | {0xa8, 0xf9, 0xbc, 0x16, 0x12, 0xc6, 0x8b, 0x3f, 0xf6, 0xe6, 0xf4, | ||
4352 | 1921 | 0xfb, 0xe3, 0x0e, 0x71, 0xe4, 0x76, 0x9c, 0x8b, 0x80, 0xa3, 0x2c, | ||
4353 | 1922 | 0xb8, 0x95, 0x8c, 0xd5, 0xd1, 0x7d, 0x6b, 0x25, 0x4d, 0xa1}, | ||
4354 | 1923 | {{Action::WRAP, {SECSuccess, true}}, | ||
4355 | 1924 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
4356 | 1925 | |||
4357 | 1926 | {162, // RFC 3394 | ||
4358 | 1927 | {0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, | ||
4359 | 1928 | 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, | ||
4360 | 1929 | 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f}, | ||
4361 | 1930 | {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xaa, | ||
4362 | 1931 | 0xbb, 0xcc, 0xdd, 0xee, 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, | ||
4363 | 1932 | 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f}, | ||
4364 | 1933 | {0x28, 0xc9, 0xf4, 0x04, 0xc4, 0xb8, 0x10, 0xf4, 0xcb, 0xcc, | ||
4365 | 1934 | 0xb3, 0x5c, 0xfb, 0x87, 0xf8, 0x26, 0x3f, 0x57, 0x86, 0xe2, | ||
4366 | 1935 | 0xd8, 0x0e, 0xd3, 0x26, 0xcb, 0xc7, 0xf0, 0xe7, 0x1a, 0x99, | ||
4367 | 1936 | 0xf4, 0x3b, 0xfb, 0x98, 0x8b, 0x9b, 0x7a, 0x02, 0xdd, 0x21}, | ||
4368 | 1937 | {{Action::WRAP, {SECSuccess, true}}, | ||
4369 | 1938 | {Action::UNWRAP, {SECSuccess, true}}}}, | ||
4370 | 1939 | }; | ||
4371 | 1940 | #endif // kw_vectors_h__ | ||
4372 | 0 | \ No newline at end of file | 1941 | \ No newline at end of file |
4373 | diff --git a/nss/gtests/der_gtest/der_quickder_unittest.cc b/nss/gtests/der_gtest/der_quickder_unittest.cc | |||
4374 | index 9441179..a5301f1 100644 | |||
4375 | --- a/nss/gtests/der_gtest/der_quickder_unittest.cc | |||
4376 | +++ b/nss/gtests/der_gtest/der_quickder_unittest.cc | |||
4377 | @@ -16,17 +16,35 @@ | |||
4378 | 16 | #include "secerr.h" | 16 | #include "secerr.h" |
4379 | 17 | #include "secitem.h" | 17 | #include "secitem.h" |
4380 | 18 | 18 | ||
4381 | 19 | const SEC_ASN1Template mySEC_NullTemplate[] = { | ||
4382 | 20 | {SEC_ASN1_NULL, 0, NULL, sizeof(SECItem)}}; | ||
4383 | 21 | |||
4384 | 22 | namespace nss_test { | 19 | namespace nss_test { |
4385 | 23 | 20 | ||
4386 | 21 | struct TemplateAndInput { | ||
4387 | 22 | const SEC_ASN1Template* t; | ||
4388 | 23 | SECItem input; | ||
4389 | 24 | }; | ||
4390 | 25 | |||
4391 | 24 | class QuickDERTest : public ::testing::Test, | 26 | class QuickDERTest : public ::testing::Test, |
4393 | 25 | public ::testing::WithParamInterface<SECItem> {}; | 27 | public ::testing::WithParamInterface<TemplateAndInput> {}; |
4394 | 26 | 28 | ||
4395 | 29 | static const uint8_t kBitstringTag = 0x03; | ||
4396 | 27 | static const uint8_t kNullTag = 0x05; | 30 | static const uint8_t kNullTag = 0x05; |
4397 | 28 | static const uint8_t kLongLength = 0x80; | 31 | static const uint8_t kLongLength = 0x80; |
4398 | 29 | 32 | ||
4399 | 33 | const SEC_ASN1Template kBitstringTemplate[] = { | ||
4400 | 34 | {SEC_ASN1_BIT_STRING, 0, NULL, sizeof(SECItem)}, {0}}; | ||
4401 | 35 | |||
4402 | 36 | // Empty bitstring with unused bits. | ||
4403 | 37 | static uint8_t kEmptyBitstringUnused[] = {kBitstringTag, 1, 1}; | ||
4404 | 38 | |||
4405 | 39 | // Bitstring with 8 unused bits. | ||
4406 | 40 | static uint8_t kBitstring8Unused[] = {kBitstringTag, 3, 8, 0xff, 0x00}; | ||
4407 | 41 | |||
4408 | 42 | // Bitstring with >8 unused bits. | ||
4409 | 43 | static uint8_t kBitstring9Unused[] = {kBitstringTag, 3, 9, 0xff, 0x80}; | ||
4410 | 44 | |||
4411 | 45 | const SEC_ASN1Template kNullTemplate[] = { | ||
4412 | 46 | {SEC_ASN1_NULL, 0, NULL, sizeof(SECItem)}, {0}}; | ||
4413 | 47 | |||
4414 | 30 | // Length of zero wrongly encoded as 0x80 instead of 0x00. | 48 | // Length of zero wrongly encoded as 0x80 instead of 0x00. |
4415 | 31 | static uint8_t kOverlongLength_0_0[] = {kNullTag, kLongLength | 0}; | 49 | static uint8_t kOverlongLength_0_0[] = {kNullTag, kLongLength | 0}; |
4416 | 32 | 50 | ||
4417 | @@ -53,14 +71,22 @@ static uint8_t kOverlongLength_16_0[] = {kNullTag, kLongLength | 0x10, | |||
4418 | 53 | 0x00, 0x00, | 71 | 0x00, 0x00, |
4419 | 54 | 0x00, 0x00}; | 72 | 0x00, 0x00}; |
4420 | 55 | 73 | ||
4425 | 56 | static const SECItem kInvalidDER[] = { | 74 | #define TI(t, x) \ |
4426 | 57 | {siBuffer, kOverlongLength_0_0, sizeof(kOverlongLength_0_0)}, | 75 | { \ |
4427 | 58 | {siBuffer, kOverlongLength_1_0, sizeof(kOverlongLength_1_0)}, | 76 | t, { siBuffer, x, sizeof(x) } \ |
4428 | 59 | {siBuffer, kOverlongLength_16_0, sizeof(kOverlongLength_16_0)}, | 77 | } |
4429 | 78 | static const TemplateAndInput kInvalidDER[] = { | ||
4430 | 79 | TI(kBitstringTemplate, kEmptyBitstringUnused), | ||
4431 | 80 | TI(kBitstringTemplate, kBitstring8Unused), | ||
4432 | 81 | TI(kBitstringTemplate, kBitstring9Unused), | ||
4433 | 82 | TI(kNullTemplate, kOverlongLength_0_0), | ||
4434 | 83 | TI(kNullTemplate, kOverlongLength_1_0), | ||
4435 | 84 | TI(kNullTemplate, kOverlongLength_16_0), | ||
4436 | 60 | }; | 85 | }; |
4437 | 86 | #undef TI | ||
4438 | 61 | 87 | ||
4439 | 62 | TEST_P(QuickDERTest, InvalidLengths) { | 88 | TEST_P(QuickDERTest, InvalidLengths) { |
4441 | 63 | const SECItem& original_input(GetParam()); | 89 | const SECItem& original_input(GetParam().input); |
4442 | 64 | 90 | ||
4443 | 65 | ScopedSECItem copy_of_input(SECITEM_AllocItem(nullptr, nullptr, 0U)); | 91 | ScopedSECItem copy_of_input(SECITEM_AllocItem(nullptr, nullptr, 0U)); |
4444 | 66 | ASSERT_TRUE(copy_of_input); | 92 | ASSERT_TRUE(copy_of_input); |
4445 | @@ -69,11 +95,10 @@ TEST_P(QuickDERTest, InvalidLengths) { | |||
4446 | 69 | 95 | ||
4447 | 70 | PORTCheapArenaPool pool; | 96 | PORTCheapArenaPool pool; |
4448 | 71 | PORT_InitCheapArena(&pool, DER_DEFAULT_CHUNKSIZE); | 97 | PORT_InitCheapArena(&pool, DER_DEFAULT_CHUNKSIZE); |
4451 | 72 | ScopedSECItem parsed_value(SECITEM_AllocItem(nullptr, nullptr, 0U)); | 98 | StackSECItem parsed_value; |
4450 | 73 | ASSERT_TRUE(parsed_value); | ||
4452 | 74 | ASSERT_EQ(SECFailure, | 99 | ASSERT_EQ(SECFailure, |
4455 | 75 | SEC_QuickDERDecodeItem(&pool.arena, parsed_value.get(), | 100 | SEC_QuickDERDecodeItem(&pool.arena, &parsed_value, GetParam().t, |
4456 | 76 | mySEC_NullTemplate, copy_of_input.get())); | 101 | copy_of_input.get())); |
4457 | 77 | ASSERT_EQ(SEC_ERROR_BAD_DER, PR_GetError()); | 102 | ASSERT_EQ(SEC_ERROR_BAD_DER, PR_GetError()); |
4458 | 78 | PORT_DestroyCheapArena(&pool); | 103 | PORT_DestroyCheapArena(&pool); |
4459 | 79 | } | 104 | } |
4460 | diff --git a/nss/gtests/freebl_gtest/cmac_unittests.cc b/nss/gtests/freebl_gtest/cmac_unittests.cc | |||
4461 | 80 | new file mode 100644 | 105 | new file mode 100644 |
4462 | index 0000000..40088dc | |||
4463 | --- /dev/null | |||
4464 | +++ b/nss/gtests/freebl_gtest/cmac_unittests.cc | |||
4465 | @@ -0,0 +1,187 @@ | |||
4466 | 1 | // This Source Code Form is subject to the terms of the Mozilla Public | ||
4467 | 2 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
4468 | 3 | // You can obtain one at http://mozilla.org/MPL/2.0/. | ||
4469 | 4 | |||
4470 | 5 | #include "gtest/gtest.h" | ||
4471 | 6 | |||
4472 | 7 | #include <stdint.h> | ||
4473 | 8 | #include <memory> | ||
4474 | 9 | |||
4475 | 10 | #include "blapi.h" | ||
4476 | 11 | #include "secitem.h" | ||
4477 | 12 | #include "freebl_scoped_ptrs.h" | ||
4478 | 13 | |||
4479 | 14 | class CmacAesTest : public ::testing::Test { | ||
4480 | 15 | protected: | ||
4481 | 16 | bool Compare(const uint8_t *actual, const uint8_t *expected, | ||
4482 | 17 | unsigned int length) { | ||
4483 | 18 | return strncmp((const char *)actual, (const char *)expected, length) == 0; | ||
4484 | 19 | } | ||
4485 | 20 | }; | ||
4486 | 21 | |||
4487 | 22 | TEST_F(CmacAesTest, CreateInvalidSize) { | ||
4488 | 23 | uint8_t key[1] = {0x00}; | ||
4489 | 24 | ScopedCMACContext ctx(CMAC_Create(CMAC_AES, key, sizeof(key))); | ||
4490 | 25 | ASSERT_EQ(ctx, nullptr); | ||
4491 | 26 | } | ||
4492 | 27 | |||
4493 | 28 | TEST_F(CmacAesTest, CreateRightSize) { | ||
4494 | 29 | uint8_t *key = PORT_NewArray(uint8_t, AES_128_KEY_LENGTH); | ||
4495 | 30 | ScopedCMACContext ctx(CMAC_Create(CMAC_AES, key, AES_128_KEY_LENGTH)); | ||
4496 | 31 | |||
4497 | 32 | ASSERT_NE(ctx, nullptr); | ||
4498 | 33 | PORT_Free(key); | ||
4499 | 34 | } | ||
4500 | 35 | |||
4501 | 36 | // The following tests were taken from NIST's Cryptographic Standards and | ||
4502 | 37 | // Guidelines page for AES-CMAC Examples with Intermediate Values. These same | ||
4503 | 38 | // test vectors for AES-128 can be found in RFC 4493, Section 4. | ||
4504 | 39 | |||
4505 | 40 | static const uint8_t kNistKeys[][AES_256_KEY_LENGTH] = { | ||
4506 | 41 | {0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, 0xAB, 0xF7, 0x15, | ||
4507 | 42 | 0x88, 0x09, 0xCF, 0x4F, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
4508 | 43 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, | ||
4509 | 44 | {0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, 0xC8, 0x10, 0xF3, | ||
4510 | 45 | 0x2B, 0x80, 0x90, 0x79, 0xE5, 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, | ||
4511 | 46 | 0x6B, 0x7B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, | ||
4512 | 47 | {0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, 0x2B, 0x73, 0xAE, | ||
4513 | 48 | 0xF0, 0x85, 0x7D, 0x77, 0x81, 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, | ||
4514 | 49 | 0x08, 0xD7, 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4}}; | ||
4515 | 50 | static const size_t kNistKeyLengthsCount = PR_ARRAY_SIZE(kNistKeys); | ||
4516 | 51 | static const unsigned int kNistKeyLengths[kNistKeyLengthsCount] = { | ||
4517 | 52 | AES_128_KEY_LENGTH, AES_192_KEY_LENGTH, AES_256_KEY_LENGTH}; | ||
4518 | 53 | |||
4519 | 54 | static const uint8_t kNistPlaintext[64] = { | ||
4520 | 55 | 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, 0xE9, 0x3D, 0x7E, | ||
4521 | 56 | 0x11, 0x73, 0x93, 0x17, 0x2A, 0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, | ||
4522 | 57 | 0xAC, 0x9C, 0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51, 0x30, | ||
4523 | 58 | 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11, 0xE5, 0xFB, 0xC1, 0x19, | ||
4524 | 59 | 0x1A, 0x0A, 0x52, 0xEF, 0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, | ||
4525 | 60 | 0x17, 0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10}; | ||
4526 | 61 | static const unsigned int kNistPlaintextLengths[] = {0, 16, 20, 64}; | ||
4527 | 62 | static const size_t kNistPlaintextLengthsCount = | ||
4528 | 63 | PR_ARRAY_SIZE(kNistPlaintextLengths); | ||
4529 | 64 | |||
4530 | 65 | // This table contains the result of a CMAC over kNistPlaintext using keys from | ||
4531 | 66 | // kNistKeys. For each key, there are kNistPlaintextLengthsCount answers, all | ||
4532 | 67 | // listed one after the other as the input is truncated to the different sizes | ||
4533 | 68 | // in kNistPlaintextLengths. | ||
4534 | 69 | static const uint8_t kNistKnown[][AES_BLOCK_SIZE] = { | ||
4535 | 70 | {0xBB, 0x1D, 0x69, 0x29, 0xE9, 0x59, 0x37, 0x28, 0x7F, 0xA3, 0x7D, 0x12, | ||
4536 | 71 | 0x9B, 0x75, 0x67, 0x46}, | ||
4537 | 72 | {0x07, 0x0A, 0x16, 0xB4, 0x6B, 0x4D, 0x41, 0x44, 0xF7, 0x9B, 0xDD, 0x9D, | ||
4538 | 73 | 0xD0, 0x4A, 0x28, 0x7C}, | ||
4539 | 74 | {0x7D, 0x85, 0x44, 0x9E, 0xA6, 0xEA, 0x19, 0xC8, 0x23, 0xA7, 0xBF, 0x78, | ||
4540 | 75 | 0x83, 0x7D, 0xFA, 0xDE}, | ||
4541 | 76 | {0x51, 0xF0, 0xBE, 0xBF, 0x7E, 0x3B, 0x9D, 0x92, 0xFC, 0x49, 0x74, 0x17, | ||
4542 | 77 | 0x79, 0x36, 0x3C, 0xFE}, | ||
4543 | 78 | {0xD1, 0x7D, 0xDF, 0x46, 0xAD, 0xAA, 0xCD, 0xE5, 0x31, 0xCA, 0xC4, 0x83, | ||
4544 | 79 | 0xDE, 0x7A, 0x93, 0x67}, | ||
4545 | 80 | {0x9E, 0x99, 0xA7, 0xBF, 0x31, 0xE7, 0x10, 0x90, 0x06, 0x62, 0xF6, 0x5E, | ||
4546 | 81 | 0x61, 0x7C, 0x51, 0x84}, | ||
4547 | 82 | {0x3D, 0x75, 0xC1, 0x94, 0xED, 0x96, 0x07, 0x04, 0x44, 0xA9, 0xFA, 0x7E, | ||
4548 | 83 | 0xC7, 0x40, 0xEC, 0xF8}, | ||
4549 | 84 | {0xA1, 0xD5, 0xDF, 0x0E, 0xED, 0x79, 0x0F, 0x79, 0x4D, 0x77, 0x58, 0x96, | ||
4550 | 85 | 0x59, 0xF3, 0x9A, 0x11}, | ||
4551 | 86 | {0x02, 0x89, 0x62, 0xF6, 0x1B, 0x7B, 0xF8, 0x9E, 0xFC, 0x6B, 0x55, 0x1F, | ||
4552 | 87 | 0x46, 0x67, 0xD9, 0x83}, | ||
4553 | 88 | {0x28, 0xA7, 0x02, 0x3F, 0x45, 0x2E, 0x8F, 0x82, 0xBD, 0x4B, 0xF2, 0x8D, | ||
4554 | 89 | 0x8C, 0x37, 0xC3, 0x5C}, | ||
4555 | 90 | {0x15, 0x67, 0x27, 0xDC, 0x08, 0x78, 0x94, 0x4A, 0x02, 0x3C, 0x1F, 0xE0, | ||
4556 | 91 | 0x3B, 0xAD, 0x6D, 0x93}, | ||
4557 | 92 | {0xE1, 0x99, 0x21, 0x90, 0x54, 0x9F, 0x6E, 0xD5, 0x69, 0x6A, 0x2C, 0x05, | ||
4558 | 93 | 0x6C, 0x31, 0x54, 0x10}}; | ||
4559 | 94 | PR_STATIC_ASSERT(PR_ARRAY_SIZE(kNistKnown) == | ||
4560 | 95 | kNistKeyLengthsCount * kNistPlaintextLengthsCount); | ||
4561 | 96 | |||
4562 | 97 | TEST_F(CmacAesTest, AesNistAligned) { | ||
4563 | 98 | for (unsigned int key_index = 0; key_index < kNistKeyLengthsCount; | ||
4564 | 99 | key_index++) { | ||
4565 | 100 | ScopedCMACContext ctx(CMAC_Create(CMAC_AES, kNistKeys[key_index], | ||
4566 | 101 | kNistKeyLengths[key_index])); | ||
4567 | 102 | ASSERT_NE(ctx, nullptr); | ||
4568 | 103 | |||
4569 | 104 | for (unsigned int plaintext_index = 0; | ||
4570 | 105 | plaintext_index < kNistPlaintextLengthsCount; plaintext_index++) { | ||
4571 | 106 | CMAC_Begin(ctx.get()); | ||
4572 | 107 | |||
4573 | 108 | unsigned int known_index = | ||
4574 | 109 | (key_index * kNistPlaintextLengthsCount) + plaintext_index; | ||
4575 | 110 | CMAC_Update(ctx.get(), kNistPlaintext, | ||
4576 | 111 | kNistPlaintextLengths[plaintext_index]); | ||
4577 | 112 | |||
4578 | 113 | uint8_t output[AES_BLOCK_SIZE]; | ||
4579 | 114 | CMAC_Finish(ctx.get(), output, NULL, AES_BLOCK_SIZE); | ||
4580 | 115 | |||
4581 | 116 | ASSERT_TRUE(Compare(output, kNistKnown[known_index], AES_BLOCK_SIZE)); | ||
4582 | 117 | } | ||
4583 | 118 | } | ||
4584 | 119 | } | ||
4585 | 120 | |||
4586 | 121 | TEST_F(CmacAesTest, AesNistUnaligned) { | ||
4587 | 122 | for (unsigned int key_index = 0; key_index < kNistKeyLengthsCount; | ||
4588 | 123 | key_index++) { | ||
4589 | 124 | unsigned int key_length = kNistKeyLengths[key_index]; | ||
4590 | 125 | ScopedCMACContext ctx( | ||
4591 | 126 | CMAC_Create(CMAC_AES, kNistKeys[key_index], key_length)); | ||
4592 | 127 | ASSERT_NE(ctx, nullptr); | ||
4593 | 128 | |||
4594 | 129 | // Skip the zero-length test. | ||
4595 | 130 | for (unsigned int plaintext_index = 1; | ||
4596 | 131 | plaintext_index < kNistPlaintextLengthsCount; plaintext_index++) { | ||
4597 | 132 | unsigned int known_index = | ||
4598 | 133 | (key_index * kNistPlaintextLengthsCount) + plaintext_index; | ||
4599 | 134 | unsigned int plaintext_length = kNistPlaintextLengths[plaintext_index]; | ||
4600 | 135 | |||
4601 | 136 | // Test all possible offsets and make sure that misaligned updates | ||
4602 | 137 | // produce the desired result. That is, do two updates: | ||
4603 | 138 | // 0 ... offset | ||
4604 | 139 | // offset ... len - offset | ||
4605 | 140 | // and ensure the result is the same as doing one update. | ||
4606 | 141 | for (unsigned int offset = 1; offset < plaintext_length; offset++) { | ||
4607 | 142 | CMAC_Begin(ctx.get()); | ||
4608 | 143 | |||
4609 | 144 | CMAC_Update(ctx.get(), kNistPlaintext, offset); | ||
4610 | 145 | CMAC_Update(ctx.get(), kNistPlaintext + offset, | ||
4611 | 146 | plaintext_length - offset); | ||
4612 | 147 | |||
4613 | 148 | uint8_t output[AES_BLOCK_SIZE]; | ||
4614 | 149 | CMAC_Finish(ctx.get(), output, NULL, AES_BLOCK_SIZE); | ||
4615 | 150 | |||
4616 | 151 | ASSERT_TRUE(Compare(output, kNistKnown[known_index], AES_BLOCK_SIZE)); | ||
4617 | 152 | } | ||
4618 | 153 | } | ||
4619 | 154 | } | ||
4620 | 155 | } | ||
4621 | 156 | |||
4622 | 157 | TEST_F(CmacAesTest, AesNistTruncated) { | ||
4623 | 158 | for (unsigned int key_index = 0; key_index < kNistKeyLengthsCount; | ||
4624 | 159 | key_index++) { | ||
4625 | 160 | unsigned int key_length = kNistKeyLengths[key_index]; | ||
4626 | 161 | ScopedCMACContext ctx( | ||
4627 | 162 | CMAC_Create(CMAC_AES, kNistKeys[key_index], key_length)); | ||
4628 | 163 | ASSERT_TRUE(ctx != nullptr); | ||
4629 | 164 | |||
4630 | 165 | // Skip the zero-length test. | ||
4631 | 166 | for (unsigned int plaintext_index = 1; | ||
4632 | 167 | plaintext_index < kNistPlaintextLengthsCount; plaintext_index++) { | ||
4633 | 168 | unsigned int known_index = | ||
4634 | 169 | (key_index * kNistPlaintextLengthsCount) + plaintext_index; | ||
4635 | 170 | unsigned int plaintext_length = kNistPlaintextLengths[plaintext_index]; | ||
4636 | 171 | |||
4637 | 172 | // Test truncated outputs to ensure that we always get the desired values. | ||
4638 | 173 | for (unsigned int out_len = 1; out_len < AES_BLOCK_SIZE; out_len++) { | ||
4639 | 174 | CMAC_Begin(ctx.get()); | ||
4640 | 175 | |||
4641 | 176 | CMAC_Update(ctx.get(), kNistPlaintext, plaintext_length); | ||
4642 | 177 | |||
4643 | 178 | unsigned int actual_out_len = 0; | ||
4644 | 179 | uint8_t output[AES_BLOCK_SIZE]; | ||
4645 | 180 | CMAC_Finish(ctx.get(), output, &actual_out_len, out_len); | ||
4646 | 181 | |||
4647 | 182 | ASSERT_TRUE(actual_out_len == out_len); | ||
4648 | 183 | ASSERT_TRUE(Compare(output, kNistKnown[known_index], out_len)); | ||
4649 | 184 | } | ||
4650 | 185 | } | ||
4651 | 186 | } | ||
4652 | 187 | } | ||
4653 | diff --git a/nss/gtests/freebl_gtest/freebl_gtest.gyp b/nss/gtests/freebl_gtest/freebl_gtest.gyp | |||
4654 | index 238f05e..c19db41 100644 | |||
4655 | --- a/nss/gtests/freebl_gtest/freebl_gtest.gyp | |||
4656 | +++ b/nss/gtests/freebl_gtest/freebl_gtest.gyp | |||
4657 | @@ -23,6 +23,7 @@ | |||
4658 | 23 | '<(DEPTH)/lib/dev/dev.gyp:nssdev', | 23 | '<(DEPTH)/lib/dev/dev.gyp:nssdev', |
4659 | 24 | '<(DEPTH)/lib/pki/pki.gyp:nsspki', | 24 | '<(DEPTH)/lib/pki/pki.gyp:nsspki', |
4660 | 25 | '<(DEPTH)/lib/ssl/ssl.gyp:ssl', | 25 | '<(DEPTH)/lib/ssl/ssl.gyp:ssl', |
4661 | 26 | '<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix', | ||
4662 | 26 | ], | 27 | ], |
4663 | 27 | }, | 28 | }, |
4664 | 28 | { | 29 | { |
4665 | @@ -34,6 +35,7 @@ | |||
4666 | 34 | 'ecl_unittest.cc', | 35 | 'ecl_unittest.cc', |
4667 | 35 | 'ghash_unittest.cc', | 36 | 'ghash_unittest.cc', |
4668 | 36 | 'rsa_unittest.cc', | 37 | 'rsa_unittest.cc', |
4669 | 38 | 'cmac_unittests.cc', | ||
4670 | 37 | '<(DEPTH)/gtests/common/gtests.cc' | 39 | '<(DEPTH)/gtests/common/gtests.cc' |
4671 | 38 | ], | 40 | ], |
4672 | 39 | 'dependencies': [ | 41 | 'dependencies': [ |
4673 | diff --git a/nss/gtests/freebl_gtest/mpi_unittest.cc b/nss/gtests/freebl_gtest/mpi_unittest.cc | |||
4674 | index fbc27d0..56b7454 100644 | |||
4675 | --- a/nss/gtests/freebl_gtest/mpi_unittest.cc | |||
4676 | +++ b/nss/gtests/freebl_gtest/mpi_unittest.cc | |||
4677 | @@ -290,4 +290,4 @@ TEST_F(DISABLED_MPITest, MpiCmpConstTest) { | |||
4678 | 290 | mp_clear(&c); | 290 | mp_clear(&c); |
4679 | 291 | } | 291 | } |
4680 | 292 | 292 | ||
4682 | 293 | } // nss_test | 293 | } // namespace nss_test |
4683 | diff --git a/nss/gtests/mozpkix_gtest/mozpkix_gtest.gyp b/nss/gtests/mozpkix_gtest/mozpkix_gtest.gyp | |||
4684 | index 899b849..1623d76 100644 | |||
4685 | --- a/nss/gtests/mozpkix_gtest/mozpkix_gtest.gyp | |||
4686 | +++ b/nss/gtests/mozpkix_gtest/mozpkix_gtest.gyp | |||
4687 | @@ -43,6 +43,7 @@ | |||
4688 | 43 | '<(DEPTH)/lib/base/base.gyp:nssb', | 43 | '<(DEPTH)/lib/base/base.gyp:nssb', |
4689 | 44 | '<(DEPTH)/lib/dev/dev.gyp:nssdev', | 44 | '<(DEPTH)/lib/dev/dev.gyp:nssdev', |
4690 | 45 | '<(DEPTH)/lib/pki/pki.gyp:nsspki', | 45 | '<(DEPTH)/lib/pki/pki.gyp:nsspki', |
4691 | 46 | '<(DEPTH)/lib/libpkix/libpkix.gyp:libpkix', | ||
4692 | 46 | '<(DEPTH)/lib/mozpkix/mozpkix.gyp:mozpkix', | 47 | '<(DEPTH)/lib/mozpkix/mozpkix.gyp:mozpkix', |
4693 | 47 | '<(DEPTH)/lib/mozpkix/mozpkix.gyp:mozpkix-testlib', | 48 | '<(DEPTH)/lib/mozpkix/mozpkix.gyp:mozpkix-testlib', |
4694 | 48 | ], | 49 | ], |
4695 | diff --git a/nss/gtests/mozpkix_gtest/pkixder_input_tests.cpp b/nss/gtests/mozpkix_gtest/pkixder_input_tests.cpp | |||
4696 | index e70f795..c66f06e 100644 | |||
4697 | --- a/nss/gtests/mozpkix_gtest/pkixder_input_tests.cpp | |||
4698 | +++ b/nss/gtests/mozpkix_gtest/pkixder_input_tests.cpp | |||
4699 | @@ -191,8 +191,10 @@ TEST_F(pkixder_input_tests, ReadByteWrapAroundPointer) | |||
4700 | 191 | // a null pointer is undefined behavior according to the C++ language spec., | 191 | // a null pointer is undefined behavior according to the C++ language spec., |
4701 | 192 | // but this should catch the problem on at least some compilers, if not all of | 192 | // but this should catch the problem on at least some compilers, if not all of |
4702 | 193 | // them. | 193 | // them. |
4705 | 194 | const uint8_t* der = nullptr; | 194 | uintptr_t derint = -1; |
4706 | 195 | --der; | 195 | auto der = reinterpret_cast<const uint8_t*>(derint); |
4707 | 196 | ASSERT_EQ(sizeof(der), sizeof(derint)) | ||
4708 | 197 | << "underflow of pointer might not work"; | ||
4709 | 196 | Input buf; | 198 | Input buf; |
4710 | 197 | ASSERT_EQ(Success, buf.Init(der, 0)); | 199 | ASSERT_EQ(Success, buf.Init(der, 0)); |
4711 | 198 | Reader input(buf); | 200 | Reader input(buf); |
4712 | diff --git a/nss/gtests/mozpkix_gtest/pkixder_universal_types_tests.cpp b/nss/gtests/mozpkix_gtest/pkixder_universal_types_tests.cpp | |||
4713 | index 260c735..0dc8555 100644 | |||
4714 | --- a/nss/gtests/mozpkix_gtest/pkixder_universal_types_tests.cpp | |||
4715 | +++ b/nss/gtests/mozpkix_gtest/pkixder_universal_types_tests.cpp | |||
4716 | @@ -1224,3 +1224,53 @@ TEST_F(pkixder_universal_types_tests, OID) | |||
4717 | 1224 | 1224 | ||
4718 | 1225 | ASSERT_EQ(Success, OID(reader, expectedOID)); | 1225 | ASSERT_EQ(Success, OID(reader, expectedOID)); |
4719 | 1226 | } | 1226 | } |
4720 | 1227 | |||
4721 | 1228 | TEST_F(pkixder_universal_types_tests, SkipOptionalImplicitPrimitiveTag) | ||
4722 | 1229 | { | ||
4723 | 1230 | const uint8_t DER_IMPLICIT_BIT_STRING_WITH_CLASS_NUMBER_1[] = { | ||
4724 | 1231 | 0x81, | ||
4725 | 1232 | 0x04, | ||
4726 | 1233 | 0x00, | ||
4727 | 1234 | 0x0A, | ||
4728 | 1235 | 0x0B, | ||
4729 | 1236 | 0x0C, | ||
4730 | 1237 | }; | ||
4731 | 1238 | Input input(DER_IMPLICIT_BIT_STRING_WITH_CLASS_NUMBER_1); | ||
4732 | 1239 | Reader reader(input); | ||
4733 | 1240 | |||
4734 | 1241 | ASSERT_EQ(Success, SkipOptionalImplicitPrimitiveTag(reader, 1)); | ||
4735 | 1242 | ASSERT_TRUE(reader.AtEnd()); | ||
4736 | 1243 | } | ||
4737 | 1244 | |||
4738 | 1245 | TEST_F(pkixder_universal_types_tests, SkipOptionalImplicitPrimitiveTagMismatch) | ||
4739 | 1246 | { | ||
4740 | 1247 | const uint8_t DER_IMPLICIT_BIT_STRING_WITH_CLASS_NUMBER_1[] = { | ||
4741 | 1248 | 0x81, | ||
4742 | 1249 | 0x04, | ||
4743 | 1250 | 0x00, | ||
4744 | 1251 | 0x0A, | ||
4745 | 1252 | 0x0B, | ||
4746 | 1253 | 0x0C, | ||
4747 | 1254 | }; | ||
4748 | 1255 | Input input(DER_IMPLICIT_BIT_STRING_WITH_CLASS_NUMBER_1); | ||
4749 | 1256 | Reader reader(input); | ||
4750 | 1257 | |||
4751 | 1258 | ASSERT_EQ(Success, SkipOptionalImplicitPrimitiveTag(reader, 2)); | ||
4752 | 1259 | ASSERT_FALSE(reader.AtEnd()); | ||
4753 | 1260 | } | ||
4754 | 1261 | |||
4755 | 1262 | TEST_F(pkixder_universal_types_tests, NoSkipOptionalImplicitConstructedTag) | ||
4756 | 1263 | { | ||
4757 | 1264 | const uint8_t DER_IMPLICIT_SEQUENCE_WITH_CLASS_NUMBER_1[] = { | ||
4758 | 1265 | 0xA1, | ||
4759 | 1266 | 0x03, | ||
4760 | 1267 | 0x05, | ||
4761 | 1268 | 0x01, | ||
4762 | 1269 | 0x00, | ||
4763 | 1270 | }; | ||
4764 | 1271 | Input input(DER_IMPLICIT_SEQUENCE_WITH_CLASS_NUMBER_1); | ||
4765 | 1272 | Reader reader(input); | ||
4766 | 1273 | |||
4767 | 1274 | ASSERT_EQ(Success, SkipOptionalImplicitPrimitiveTag(reader, 1)); | ||
4768 | 1275 | ASSERT_FALSE(reader.AtEnd()); | ||
4769 | 1276 | } | ||
4770 | diff --git a/nss/gtests/pk11_gtest/manifest.mn b/nss/gtests/pk11_gtest/manifest.mn | |||
4771 | index b774f1d..861f45f 100644 | |||
4772 | --- a/nss/gtests/pk11_gtest/manifest.mn | |||
4773 | +++ b/nss/gtests/pk11_gtest/manifest.mn | |||
4774 | @@ -9,20 +9,24 @@ MODULE = nss | |||
4775 | 9 | CPPSRCS = \ | 9 | CPPSRCS = \ |
4776 | 10 | pk11_aes_gcm_unittest.cc \ | 10 | pk11_aes_gcm_unittest.cc \ |
4777 | 11 | pk11_aeskeywrap_unittest.cc \ | 11 | pk11_aeskeywrap_unittest.cc \ |
4778 | 12 | pk11_aeskeywrappad_unittest.cc \ | ||
4779 | 12 | pk11_cbc_unittest.cc \ | 13 | pk11_cbc_unittest.cc \ |
4780 | 13 | pk11_chacha20poly1305_unittest.cc \ | 14 | pk11_chacha20poly1305_unittest.cc \ |
4781 | 14 | pk11_curve25519_unittest.cc \ | 15 | pk11_curve25519_unittest.cc \ |
4782 | 16 | pk11_der_private_key_import_unittest.cc \ | ||
4783 | 15 | pk11_ecdsa_unittest.cc \ | 17 | pk11_ecdsa_unittest.cc \ |
4784 | 16 | pk11_encrypt_derive_unittest.cc \ | 18 | pk11_encrypt_derive_unittest.cc \ |
4785 | 17 | pk11_export_unittest.cc \ | 19 | pk11_export_unittest.cc \ |
4786 | 18 | pk11_find_certs_unittest.cc \ | 20 | pk11_find_certs_unittest.cc \ |
4787 | 19 | pk11_import_unittest.cc \ | 21 | pk11_import_unittest.cc \ |
4788 | 22 | pk11_keygen.cc \ | ||
4789 | 23 | pk11_key_unittest.cc \ | ||
4790 | 20 | pk11_pbkdf2_unittest.cc \ | 24 | pk11_pbkdf2_unittest.cc \ |
4791 | 21 | pk11_prf_unittest.cc \ | 25 | pk11_prf_unittest.cc \ |
4792 | 22 | pk11_prng_unittest.cc \ | 26 | pk11_prng_unittest.cc \ |
4793 | 23 | pk11_rsapkcs1_unittest.cc \ | 27 | pk11_rsapkcs1_unittest.cc \ |
4794 | 24 | pk11_rsapss_unittest.cc \ | 28 | pk11_rsapss_unittest.cc \ |
4796 | 25 | pk11_der_private_key_import_unittest.cc \ | 29 | pk11_seed_cbc_unittest.cc \ |
4797 | 26 | $(NULL) | 30 | $(NULL) |
4798 | 27 | 31 | ||
4799 | 28 | INCLUDES += -I$(CORE_DEPTH)/gtests/google_test/gtest/include \ | 32 | INCLUDES += -I$(CORE_DEPTH)/gtests/google_test/gtest/include \ |
4800 | diff --git a/nss/gtests/pk11_gtest/pk11_aes_cmac_unittest.cc b/nss/gtests/pk11_gtest/pk11_aes_cmac_unittest.cc | |||
4801 | 29 | new file mode 100644 | 33 | new file mode 100644 |
4802 | index 0000000..c520fff | |||
4803 | --- /dev/null | |||
4804 | +++ b/nss/gtests/pk11_gtest/pk11_aes_cmac_unittest.cc | |||
4805 | @@ -0,0 +1,91 @@ | |||
4806 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | ||
4807 | 2 | /* vim: set ts=2 et sw=2 tw=80: */ | ||
4808 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public | ||
4809 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
4810 | 5 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | ||
4811 | 6 | |||
4812 | 7 | #include <memory> | ||
4813 | 8 | #include "nss.h" | ||
4814 | 9 | #include "pk11pub.h" | ||
4815 | 10 | #include "secerr.h" | ||
4816 | 11 | #include "sechash.h" | ||
4817 | 12 | |||
4818 | 13 | #include "blapi.h" | ||
4819 | 14 | |||
4820 | 15 | #include "gtest/gtest.h" | ||
4821 | 16 | #include "nss_scoped_ptrs.h" | ||
4822 | 17 | #include "util.h" | ||
4823 | 18 | |||
4824 | 19 | namespace nss_test { | ||
4825 | 20 | |||
4826 | 21 | class Pkcs11AesCmacTest : public ::testing::Test { | ||
4827 | 22 | protected: | ||
4828 | 23 | ScopedPK11SymKey ImportKey(CK_MECHANISM_TYPE mech, SECItem *key_item) { | ||
4829 | 24 | ScopedPK11SlotInfo slot(PK11_GetInternalSlot()); | ||
4830 | 25 | if (!slot) { | ||
4831 | 26 | ADD_FAILURE() << "Can't get slot"; | ||
4832 | 27 | return nullptr; | ||
4833 | 28 | } | ||
4834 | 29 | |||
4835 | 30 | ScopedPK11SymKey result(PK11_ImportSymKey( | ||
4836 | 31 | slot.get(), mech, PK11_OriginUnwrap, CKA_SIGN, key_item, nullptr)); | ||
4837 | 32 | |||
4838 | 33 | return result; | ||
4839 | 34 | } | ||
4840 | 35 | |||
4841 | 36 | void RunTest(uint8_t *key, unsigned int key_len, uint8_t *data, | ||
4842 | 37 | unsigned int data_len, uint8_t *expected, | ||
4843 | 38 | unsigned int expected_len, CK_ULONG mechanism) { | ||
4844 | 39 | // Create SECItems for everything... | ||
4845 | 40 | std::vector<uint8_t> output(expected_len); | ||
4846 | 41 | SECItem key_item = {siBuffer, key, key_len}; | ||
4847 | 42 | SECItem output_item = {siBuffer, output.data(), expected_len}; | ||
4848 | 43 | SECItem data_item = {siBuffer, data, data_len}; | ||
4849 | 44 | SECItem expected_item = {siBuffer, expected, expected_len}; | ||
4850 | 45 | |||
4851 | 46 | // Do the PKCS #11 stuff... | ||
4852 | 47 | ScopedPK11SymKey p11_key = ImportKey(mechanism, &key_item); | ||
4853 | 48 | ASSERT_NE(nullptr, p11_key.get()); | ||
4854 | 49 | |||
4855 | 50 | SECStatus ret = PK11_SignWithSymKey(p11_key.get(), CKM_AES_CMAC, NULL, | ||
4856 | 51 | &output_item, &data_item); | ||
4857 | 52 | |||
4858 | 53 | // Verify the result... | ||
4859 | 54 | ASSERT_EQ(SECSuccess, ret); | ||
4860 | 55 | ASSERT_EQ(0, SECITEM_CompareItem(&output_item, &expected_item)); | ||
4861 | 56 | } | ||
4862 | 57 | }; | ||
4863 | 58 | |||
4864 | 59 | // Sanity check of the PKCS #11 API only. Extensive tests for correctness of | ||
4865 | 60 | // underling CMAC implementation conducted in the following file: | ||
4866 | 61 | // gtests/freebl_gtest/cmac_unittests.cc | ||
4867 | 62 | |||
4868 | 63 | TEST_F(Pkcs11AesCmacTest, Aes128NistExample1) { | ||
4869 | 64 | uint8_t key[AES_128_KEY_LENGTH] = {0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, | ||
4870 | 65 | 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, | ||
4871 | 66 | 0x09, 0xCF, 0x4F, 0x3C}; | ||
4872 | 67 | uint8_t known[AES_BLOCK_SIZE] = {0xBB, 0x1D, 0x69, 0x29, 0xE9, 0x59, | ||
4873 | 68 | 0x37, 0x28, 0x7F, 0xA3, 0x7D, 0x12, | ||
4874 | 69 | 0x9B, 0x75, 0x67, 0x46}; | ||
4875 | 70 | |||
4876 | 71 | RunTest(key, AES_128_KEY_LENGTH, NULL, 0, known, AES_BLOCK_SIZE, | ||
4877 | 72 | CKM_AES_CMAC); | ||
4878 | 73 | } | ||
4879 | 74 | |||
4880 | 75 | TEST_F(Pkcs11AesCmacTest, General) { | ||
4881 | 76 | uint8_t key[AES_128_KEY_LENGTH] = {0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, | ||
4882 | 77 | 0xD2, 0xA6, 0xAB, 0xF7, 0x15, 0x88, | ||
4883 | 78 | 0x09, 0xCF, 0x4F, 0x3C}; | ||
4884 | 79 | uint8_t known[4] = {0xBB, 0x1D, 0x69, 0x29}; | ||
4885 | 80 | |||
4886 | 81 | RunTest(key, AES_128_KEY_LENGTH, NULL, 0, known, 4, CKM_AES_CMAC_GENERAL); | ||
4887 | 82 | } | ||
4888 | 83 | |||
4889 | 84 | TEST_F(Pkcs11AesCmacTest, InvalidKeySize) { | ||
4890 | 85 | uint8_t key[4] = {0x00, 0x00, 0x00, 0x00}; | ||
4891 | 86 | SECItem key_item = {siBuffer, key, 4}; | ||
4892 | 87 | |||
4893 | 88 | ScopedPK11SymKey result = ImportKey(CKM_AES_CMAC, &key_item); | ||
4894 | 89 | ASSERT_EQ(nullptr, result.get()); | ||
4895 | 90 | } | ||
4896 | 91 | } | ||
4897 | diff --git a/nss/gtests/pk11_gtest/pk11_aes_gcm_unittest.cc b/nss/gtests/pk11_gtest/pk11_aes_gcm_unittest.cc | |||
4898 | index 9505b43..2c58063 100644 | |||
4899 | --- a/nss/gtests/pk11_gtest/pk11_aes_gcm_unittest.cc | |||
4900 | +++ b/nss/gtests/pk11_gtest/pk11_aes_gcm_unittest.cc | |||
4901 | @@ -37,47 +37,57 @@ class Pkcs11AesGcmTest : public ::testing::TestWithParam<gcm_kat_value> { | |||
4902 | 37 | } | 37 | } |
4903 | 38 | 38 | ||
4904 | 39 | // Prepare AEAD params. | 39 | // Prepare AEAD params. |
4911 | 40 | CK_GCM_PARAMS gcmParams; | 40 | CK_GCM_PARAMS gcm_params; |
4912 | 41 | gcmParams.pIv = iv.data(); | 41 | gcm_params.pIv = iv.data(); |
4913 | 42 | gcmParams.ulIvLen = iv.size(); | 42 | gcm_params.ulIvLen = iv.size(); |
4914 | 43 | gcmParams.pAAD = aad.data(); | 43 | gcm_params.pAAD = aad.data(); |
4915 | 44 | gcmParams.ulAADLen = aad.size(); | 44 | gcm_params.ulAADLen = aad.size(); |
4916 | 45 | gcmParams.ulTagBits = 128; | 45 | gcm_params.ulTagBits = 128; |
4917 | 46 | 46 | ||
4920 | 47 | SECItem params = {siBuffer, reinterpret_cast<unsigned char*>(&gcmParams), | 47 | SECItem params = {siBuffer, reinterpret_cast<unsigned char*>(&gcm_params), |
4921 | 48 | sizeof(gcmParams)}; | 48 | sizeof(gcm_params)}; |
4922 | 49 | 49 | ||
4923 | 50 | ScopedPK11SlotInfo slot(PK11_GetInternalSlot()); | 50 | ScopedPK11SlotInfo slot(PK11_GetInternalSlot()); |
4926 | 51 | SECItem keyItem = {siBuffer, key.data(), | 51 | SECItem key_item = {siBuffer, key.data(), |
4927 | 52 | static_cast<unsigned int>(key.size())}; | 52 | static_cast<unsigned int>(key.size())}; |
4928 | 53 | 53 | ||
4929 | 54 | // Import key. | 54 | // Import key. |
4933 | 55 | ScopedPK11SymKey symKey(PK11_ImportSymKey( | 55 | ScopedPK11SymKey sym_key(PK11_ImportSymKey( |
4934 | 56 | slot.get(), mech, PK11_OriginUnwrap, CKA_ENCRYPT, &keyItem, nullptr)); | 56 | slot.get(), mech, PK11_OriginUnwrap, CKA_ENCRYPT, &key_item, nullptr)); |
4935 | 57 | ASSERT_TRUE(!!symKey) << msg; | 57 | ASSERT_TRUE(!!sym_key) << msg; |
4936 | 58 | 58 | ||
4937 | 59 | // Encrypt with bogus parameters. | 59 | // Encrypt with bogus parameters. |
4941 | 60 | unsigned int outputLen = 0; | 60 | unsigned int output_len = 0; |
4942 | 61 | std::vector<uint8_t> output(plaintext.size() + gcmParams.ulTagBits / 8); | 61 | std::vector<uint8_t> output(plaintext.size() + gcm_params.ulTagBits / 8); |
4943 | 62 | gcmParams.ulTagBits = 159082344; | 62 | // "maxout" must be at least "inlen + tagBytes", or, in this case: |
4944 | 63 | // "output.size()" must be at least "plaintext.size() + tagBytes" | ||
4945 | 64 | gcm_params.ulTagBits = 128; | ||
4946 | 63 | SECStatus rv = | 65 | SECStatus rv = |
4949 | 64 | PK11_Encrypt(symKey.get(), mech, ¶ms, output.data(), &outputLen, | 66 | PK11_Encrypt(sym_key.get(), mech, ¶ms, output.data(), &output_len, |
4950 | 65 | output.size(), plaintext.data(), plaintext.size()); | 67 | output.size() - 10, plaintext.data(), plaintext.size()); |
4951 | 66 | EXPECT_EQ(SECFailure, rv); | 68 | EXPECT_EQ(SECFailure, rv); |
4954 | 67 | EXPECT_EQ(0U, outputLen); | 69 | EXPECT_EQ(0U, output_len); |
4955 | 68 | gcmParams.ulTagBits = 128; | 70 | |
4956 | 71 | // The valid values for tag size in AES_GCM are: | ||
4957 | 72 | // 32, 64, 96, 104, 112, 120 and 128. | ||
4958 | 73 | gcm_params.ulTagBits = 110; | ||
4959 | 74 | rv = PK11_Encrypt(sym_key.get(), mech, ¶ms, output.data(), &output_len, | ||
4960 | 75 | output.size(), plaintext.data(), plaintext.size()); | ||
4961 | 76 | EXPECT_EQ(SECFailure, rv); | ||
4962 | 77 | EXPECT_EQ(0U, output_len); | ||
4963 | 69 | 78 | ||
4964 | 70 | // Encrypt. | 79 | // Encrypt. |
4966 | 71 | rv = PK11_Encrypt(symKey.get(), mech, ¶ms, output.data(), &outputLen, | 80 | gcm_params.ulTagBits = 128; |
4967 | 81 | rv = PK11_Encrypt(sym_key.get(), mech, ¶ms, output.data(), &output_len, | ||
4968 | 72 | output.size(), plaintext.data(), plaintext.size()); | 82 | output.size(), plaintext.data(), plaintext.size()); |
4969 | 73 | if (invalid_iv) { | 83 | if (invalid_iv) { |
4972 | 74 | EXPECT_EQ(rv, SECFailure) << msg; | 84 | EXPECT_EQ(SECFailure, rv) << msg; |
4973 | 75 | EXPECT_EQ(0U, outputLen); | 85 | EXPECT_EQ(0U, output_len); |
4974 | 76 | return; | 86 | return; |
4975 | 77 | } | 87 | } |
4977 | 78 | EXPECT_EQ(rv, SECSuccess) << msg; | 88 | EXPECT_EQ(SECSuccess, rv) << msg; |
4978 | 79 | 89 | ||
4980 | 80 | ASSERT_EQ(outputLen, output.size()) << msg; | 90 | ASSERT_EQ(output_len, output.size()) << msg; |
4981 | 81 | 91 | ||
4982 | 82 | // Check ciphertext and tag. | 92 | // Check ciphertext and tag. |
4983 | 83 | if (invalid_ct) { | 93 | if (invalid_ct) { |
4984 | @@ -87,48 +97,49 @@ class Pkcs11AesGcmTest : public ::testing::TestWithParam<gcm_kat_value> { | |||
4985 | 87 | } | 97 | } |
4986 | 88 | 98 | ||
4987 | 89 | // Decrypt. | 99 | // Decrypt. |
4989 | 90 | unsigned int decryptedLen = 0; | 100 | unsigned int decrypted_len = 0; |
4990 | 91 | // The PK11 AES API is stupid, it expects an explicit IV and thus wants | 101 | // The PK11 AES API is stupid, it expects an explicit IV and thus wants |
4991 | 92 | // a block more of available output memory. | 102 | // a block more of available output memory. |
4992 | 93 | std::vector<uint8_t> decrypted(output.size()); | 103 | std::vector<uint8_t> decrypted(output.size()); |
4998 | 94 | rv = | 104 | rv = PK11_Decrypt(sym_key.get(), mech, ¶ms, decrypted.data(), |
4999 | 95 | PK11_Decrypt(symKey.get(), mech, ¶ms, decrypted.data(), | 105 | &decrypted_len, decrypted.size(), output.data(), |
5000 | 96 | &decryptedLen, decrypted.size(), output.data(), outputLen); | 106 | output_len); |
4996 | 97 | EXPECT_EQ(rv, SECSuccess) << msg; | ||
4997 | 98 | ASSERT_EQ(decryptedLen, plaintext.size()) << msg; |