summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fontein <felix@fontein.de>2021-10-06 06:44:38 +0200
committerGitHub <noreply@github.com>2021-10-06 12:44:38 +0800
commit667e7a5f4c034c594269f1bf801941f48ece7a49 (patch)
tree894b6d1bb6c31c1a93a311753041e3215c6ae08e
parentf3243541aa9ae8e6ea0f459ef80d7c46e18baa4d (diff)
downloadcryptography-667e7a5f4c034c594269f1bf801941f48ece7a49.tar.gz
Add new PKCS12 test vectors (#6383)
* Add new PKCS12 test vectors for #6348. * Re-create test certs without DSA. * Forgot to adjust the docs.
-rw-r--r--docs/development/test-vectors.rst102
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-1-no-pwd.p12bin0 -> 3539 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-1-pwd.p12bin0 -> 3639 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-2-3-no-pwd.p12bin0 -> 3547 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-2-3-pwd.p12bin0 -> 3650 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-2-no-pwd.p12bin0 -> 3518 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-2-pwd.p12bin0 -> 3618 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-3-no-pwd.p12bin0 -> 3518 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-3-pwd.p12bin0 -> 3618 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-all-no-pwd.p12bin0 -> 3597 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-all-pwd.p12bin0 -> 3703 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-unicode-no-pwd.p12bin0 -> 3569 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/name-unicode-pwd.p12bin0 -> 3672 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-2-no-pwd.p12bin0 -> 2874 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-2-pwd.p12bin0 -> 2932 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-3-no-pwd.p12bin0 -> 2874 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-3-pwd.p12bin0 -> 2932 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-all-no-pwd.p12bin0 -> 2903 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-all-pwd.p12bin0 -> 2956 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-no-pwd.p12bin0 -> 2887 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-pwd.p12bin0 -> 2940 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-no-name-no-pwd.p12bin0 -> 2845 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-cert-no-name-pwd.p12bin0 -> 2900 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-name-no-pwd.p12bin0 -> 3489 bytes
-rw-r--r--vectors/cryptography_vectors/pkcs12/no-name-pwd.p12bin0 -> 3586 bytes
25 files changed, 102 insertions, 0 deletions
diff --git a/docs/development/test-vectors.rst b/docs/development/test-vectors.rst
index 7dd8db083..7776c0436 100644
--- a/docs/development/test-vectors.rst
+++ b/docs/development/test-vectors.rst
@@ -629,6 +629,108 @@ Custom PKCS12 Test Vectors
* ``pkcs12/cert-aes256cbc-no-key.p12`` - A PKCS12 file containing a cert
(``x509/custom/ca/ca.pem``) encrypted via AES 256 CBC with the
password ``cryptography`` and no private key.
+* ``pkcs12/no-name-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``).
+* ``pkcs12/name-all-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``)
+ with friendly name ``name``, as well as two additional certificates
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``name2`` and ``name3``, respectively.
+* ``pkcs12/name-1-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``)
+ with friendly name ``name``, as well as two additional certificates
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``).
+* ``pkcs12/name-2-3-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``) with friendly names ``name2`` and
+ ``name3``, respectively.
+* ``pkcs12/name-2-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``), the first having friendly name ``name2``.
+* ``pkcs12/name-3-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``), the latter having friendly name ``name3``.
+* ``pkcs12/name-unicode-no-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``)
+ with friendly name ``☺``, as well as two additional certificates
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``ä`` and ``ç``, respectively.
+* ``pkcs12/no-name-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``),
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/name-all-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``)
+ with friendly name ``name``, as well as two additional certificates
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``name2`` and ``name3`` respectively,
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/name-1-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``)
+ with friendly name ``name``, as well as two additional certificates
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``),
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/name-2-3-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``) with friendly names ``name2` and
+ ``name3`` respectively, encrypted via AES 256 CBC with the password
+ ``cryptography``.
+* ``pkcs12/name-2-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``), the first having friendly name ``name2``,
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/name-3-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``),
+ as well as two additional certificates (``x509/cryptography.io.pem``
+ and ``x509/letsencryptx3.pem``), the latter having friendly name ``name2``,
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/name-unicode-pwd.p12`` - A PKCS12 file containing a cert
+ (``x509/custom/ca/ca.pem``) and key (``x509/custom/ca/ca_key.pem``)
+ with friendly name ``☺``, as well as two additional certificates
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``ä`` and ``ç`` respectively, encrypted via
+ AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/no-cert-no-name-no-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``).
+* ``pkcs12/no-cert-name-all-no-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``name2`` and ``name3``, respectively.
+* ``pkcs12/no-cert-name-2-no-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``),
+ the first having friendly name ``name2``.
+* ``pkcs12/no-cert-name-3-no-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``),
+ the second having friendly name ``name3``.
+* ``pkcs12/no-cert-name-unicode-no-pwd.p12`` - A PKCS12 file containing two
+ certs (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``☹`` and ``ï``, respectively.
+* ``pkcs12/no-cert-no-name-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``),
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/no-cert-name-all-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``name2`` and ``name3``, respectively,
+ encrypted via AES 256 CBC with the password ``cryptography``.
+* ``pkcs12/no-cert-name-2-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``),
+ the first with friendly name ``name2``, encrypted via AES 256 CBC with
+ the password ``cryptography``.
+* ``pkcs12/no-cert-name-3-pwd.p12`` - A PKCS12 file containing two certs
+ (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``),
+ the second with friendly name ``name3``, encrypted via AES 256 CBC with
+ the password ``cryptography``.
+* ``pkcs12/no-cert-name-unicode-pwd.p12`` - A PKCS12 file containing two
+ certs (``x509/cryptography.io.pem`` and ``x509/letsencryptx3.pem``)
+ with friendly names ``☹`` and ``ï``, respectively, encrypted via
+ AES 256 CBC with the password ``cryptography``.
Custom PKCS7 Test Vectors
~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/vectors/cryptography_vectors/pkcs12/name-1-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-1-no-pwd.p12
new file mode 100644
index 000000000..72a18eedf
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-1-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-1-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-1-pwd.p12
new file mode 100644
index 000000000..da279ffea
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-1-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-2-3-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-2-3-no-pwd.p12
new file mode 100644
index 000000000..e66d95994
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-2-3-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-2-3-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-2-3-pwd.p12
new file mode 100644
index 000000000..381dfbe96
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-2-3-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-2-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-2-no-pwd.p12
new file mode 100644
index 000000000..2fb99fb0b
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-2-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-2-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-2-pwd.p12
new file mode 100644
index 000000000..076390b63
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-2-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-3-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-3-no-pwd.p12
new file mode 100644
index 000000000..b2b5aad21
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-3-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-3-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-3-pwd.p12
new file mode 100644
index 000000000..bbe947fb8
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-3-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-all-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-all-no-pwd.p12
new file mode 100644
index 000000000..f16920113
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-all-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-all-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-all-pwd.p12
new file mode 100644
index 000000000..4451e5b27
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-all-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-unicode-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-unicode-no-pwd.p12
new file mode 100644
index 000000000..aae136663
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-unicode-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/name-unicode-pwd.p12 b/vectors/cryptography_vectors/pkcs12/name-unicode-pwd.p12
new file mode 100644
index 000000000..9c554aa21
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/name-unicode-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-2-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-2-no-pwd.p12
new file mode 100644
index 000000000..dcbe9aff1
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-2-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-2-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-2-pwd.p12
new file mode 100644
index 000000000..9447e24f0
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-2-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-3-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-3-no-pwd.p12
new file mode 100644
index 000000000..a0d227724
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-3-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-3-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-3-pwd.p12
new file mode 100644
index 000000000..431586990
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-3-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-all-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-all-no-pwd.p12
new file mode 100644
index 000000000..ef3e3cec2
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-all-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-all-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-all-pwd.p12
new file mode 100644
index 000000000..7e3a63261
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-all-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-no-pwd.p12
new file mode 100644
index 000000000..60caec4d6
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-pwd.p12
new file mode 100644
index 000000000..a57f49e59
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-name-unicode-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-no-name-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-no-name-no-pwd.p12
new file mode 100644
index 000000000..a1fa2136d
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-no-name-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-cert-no-name-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-cert-no-name-pwd.p12
new file mode 100644
index 000000000..c23a7615e
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-cert-no-name-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-name-no-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-name-no-pwd.p12
new file mode 100644
index 000000000..c71d24dc2
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-name-no-pwd.p12
Binary files differ
diff --git a/vectors/cryptography_vectors/pkcs12/no-name-pwd.p12 b/vectors/cryptography_vectors/pkcs12/no-name-pwd.p12
new file mode 100644
index 000000000..f2ac4c1a9
--- /dev/null
+++ b/vectors/cryptography_vectors/pkcs12/no-name-pwd.p12
Binary files differ