Skip to content

Commit e25ac53

Browse files
committed
[zephyr] Added framework as a flattened directory
Previously done in 2c824b4 Signed-off-by: Flavio Ceolin <[email protected]>
1 parent 7cebba1 commit e25ac53

File tree

927 files changed

+49206
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

927 files changed

+49206
-0
lines changed

framework/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This file is intentionally left blank. It soon won't be.

framework/CONTRIBUTING.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Contributing
2+
============
3+
We gratefully accept bug reports and contributions from the community. All PRs are reviewed by the project team / community, and may need some modifications to
4+
be accepted.
5+
6+
Most contributions in this repository will be associated with [Mbed TLS](https://github.com/Mbed-TLS/mbedtls/blob/development/CONTRIBUTING.md) or TF-PSA-Crypto. Please consult their respective contribution guidelines for more information.
7+
8+
What can I contribute here?
9+
---------------------------
10+
11+
This repository is intended to contain files that are shared between multiple maintained branches of Mbed TLS and TF-PSA-Crypto. The exact policies are not yet written down. Please contribute in this repository if you wish to update one of the files that are present here.
12+
13+
License and Copyright
14+
---------------------
15+
16+
Unless specifically indicated otherwise in a file, Mbed TLS framework files are provided under a dual [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) OR [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) license. See the [LICENSE](LICENSE) file for the full text of these licenses. This means that users may choose which of these licenses they take the code under.
17+
18+
Contributors must accept that their contributions are made under both the Apache-2.0 AND [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) licenses.
19+
20+
All new files should include the standard SPDX license identifier where possible, i.e. "SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later".
21+
22+
The copyright on contributions is retained by the original authors of the code. Where possible for new files, this should be noted in a comment at the top of the file in the form: "Copyright The Mbed TLS Contributors".
23+
24+
When contributing code to us, the committer and all authors are required to make the submission under the terms of the [Developer Certificate of Origin](dco.txt), confirming that the code submitted can (legally) become part of the project, and is submitted under both the Apache-2.0 AND GPL-2.0-or-later licenses.
25+
26+
This is done by including the standard Git `Signed-off-by:` line in every commit message. If more than one person contributed to the commit, they should also add their own `Signed-off-by:` line.

framework/LICENSE

Lines changed: 553 additions & 0 deletions
Large diffs are not rendered by default.

framework/README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Mbed TLS framework
2+
3+
This repository contains a version-independent build and test framework for [TF-PSA-Crypto](https://github.com/Mbed-TLS/TF-PSA-Crypto) and [Mbed TLS](https://github.com/Mbed-TLS/mbedtls-framework).
4+
5+
You need this repository as a Git submodule in a branch of one of the above repositories if:
6+
7+
* You want to build, test or contribute to Mbed TLS 3.6.0 or above, and you are working from a snapshot of a Git commit on a development branch.
8+
* You want to build, test or contribute to TF-PSA-Crypto, and you are working from a snapshot of a Git commit on a development branch.
9+
10+
You do not need this repository if:
11+
12+
* You are working with Mbed TLS 2.28.
13+
* You want to build a release of Mbed TLS and run its unit tests.
14+
15+
Contributing
16+
------------
17+
18+
We gratefully accept bug reports and contributions from the community. Please see the [contributing guidelines](CONTRIBUTING.md) for details on how to do this.
19+
20+
License
21+
-------
22+
23+
Unless specifically indicated otherwise in a file, Mbed TLS framework files are provided under a dual [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) OR [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) license. See the [LICENSE](LICENSE) file for the full text of these licenses, and [the 'License and Copyright' section in the contributing guidelines](CONTRIBUTING.md#License-and-Copyright) for more information.
24+

framework/data_files/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cli-rsa.csr
2+
server2-rsa.csr
3+
test-ca.csr
4+
5+
mpi_write
6+
hmac_drbg_seed
7+
ctr_drbg_seed
8+
entropy_seed

framework/data_files/Makefile

Lines changed: 2167 additions & 0 deletions
Large diffs are not rendered by default.

framework/data_files/Readme-x509.txt

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
This documents the X.509 CAs, certificates, and CRLS used for testing.
2+
3+
Certification authorities
4+
-------------------------
5+
6+
There are two main CAs for use as trusted roots:
7+
- test-ca.crt aka "C=NL, O=PolarSSL, CN=PolarSSL Test CA"
8+
uses a RSA-2048 key
9+
test-ca-sha1.crt and test-ca-sha256.crt use the same key, signed with
10+
different hashes.
11+
- test-ca2*.crt aka "C=NL, O=PolarSSL, CN=Polarssl Test EC CA"
12+
uses an EC key with NIST P-384 (aka secp384r1)
13+
variants used to test the keyUsage extension
14+
The files test-ca_cat12 and test-ca_cat21 contain them concatenated both ways.
15+
16+
Two intermediate CAs are signed by them:
17+
- test-int-ca.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate CA"
18+
uses RSA-4096, signed by test-ca2
19+
- test-int-ca-exp.crt is a copy that is expired
20+
- test-int-ca2.crt "C=NL, O=PolarSSL, CN=PolarSSL Test Intermediate EC CA"
21+
uses an EC key with NIST P-384, signed by test-ca
22+
23+
A third intermediate CA is signed by test-int-ca2.crt:
24+
- test-int-ca3.crt "C=UK, O=mbed TLS, CN=mbed TLS Test intermediate CA 3"
25+
uses an EC key with NIST P-256, signed by test-int-ca2
26+
27+
Finally, other CAs for specific purposes:
28+
- enco-ca-prstr.pem: has its CN encoded as a printable string, but child cert
29+
enco-cert-utf8str.pem has its issuer's CN encoded as a UTF-8 string.
30+
- test-ca-v1.crt: v1 "CA", signs
31+
server1-v1.crt: v1 "intermediate CA", signs
32+
server2-v1*.crt: EE cert (without of with chain in same file)
33+
- keyUsage.decipherOnly.crt: has the decipherOnly keyUsage bit set
34+
35+
End-entity certificates
36+
-----------------------
37+
38+
Short information fields:
39+
40+
- name or pattern
41+
- issuing CA: 1 -> test-ca.crt
42+
2 -> test-ca2.crt
43+
I1 -> test-int-ca.crt
44+
I2 -> test-int-ca2.crt
45+
I3 -> test-int-ca3.crt
46+
O -> other
47+
- key type: R -> RSA, E -> EC
48+
- C -> there is a CRL revoking this cert (see below)
49+
- L -> CN=localhost (useful for local test servers)
50+
- P1, P2 if the file includes parent (resp. parent + grandparent)
51+
- free-form comments
52+
53+
List of certificates:
54+
55+
- cert_example_multi*.crt: 1/O R: subjectAltName
56+
- cert_example_wildcard.crt: 1 R: wildcard in subject's CN
57+
- cert_md*.crt, cert_sha*.crt: 1 R: signature hash
58+
- cert_v1_with_ext.crt: 1 R: v1 with extensions (illegal)
59+
- cli2.crt: 2 E: basic
60+
- cli-rsa.key, cli-rsa-*.crt: RSA key used for test clients, signed by
61+
the RSA test CA.
62+
- enco-cert-utf8str.pem: see enco-ca-prstr.pem above
63+
- server1*.crt: 1* R C* P1*: misc *(server1-v1 see test-ca-v1.crt above)
64+
*CRL for: .cert_type.crt, .crt, .key_usage.crt, .v1.crt
65+
P1 only for _ca.crt
66+
- server2-v1*.crt: O R: see test-ca-v1.crt above
67+
- server2*.crt: 1 R L: misc
68+
- server3.crt: 1 E L: EC cert signed by RSA CA
69+
- server4.crt: 2 R L: RSA cert signed by EC CA
70+
- server5*.crt: 2* E L: misc *(except -selfsigned and -ss-*)
71+
-sha*: hashes
72+
.eku*: extendeKeyUsage (cli/srv = www client/server, cs = codesign, etc)
73+
.ku*: keyUsage (ds = signatures, ke/ka = key exchange/agreement)
74+
.req*: CSR, not certificate
75+
-der*: trailing bytes in der (?)
76+
-badsign.crt: S5 with corrupted signature
77+
-expired.crt: S5 with "not after" date in the past
78+
-future.crt: S5 with "not before" date in the future
79+
-non-compliant.crt: S5, RFC non-compliant
80+
(with forbidden EC algorithm identifier NULL parameter)
81+
generated by (before fix):
82+
cert_write subject_key=server5.key subject_name="CN=Test EC RFC non-compliant" issuer_crt=test-ca2.crt issuer_key=test-ca2.key
83+
-selfsigned.crt: Self-signed cert with S5 key
84+
-ss-expired.crt: Self-signed cert with S5 key, expired
85+
-ss-forgeca.crt: Copy of test-int-ca3 self-signed with S5 key
86+
- server6-ss-child.crt: O E: "child" of non-CA server5-selfsigned
87+
- server6.crt, server6.pem: 2 E L C: revoked
88+
- server7.crt: I1 E L P1(usually): EC signed by RSA signed by EC
89+
-badsign.crt: S7 with corrupted signature + I1
90+
-expired.crt: S7 with "not after" date in the past + I1
91+
-future.crt: S7 with "not before" date in the future + I1
92+
_int-ca-exp.crt: S7 + expired I1
93+
_int-ca.crt: S7 + I1
94+
_int-ca_ca2.crt: S7 + I1 + 2
95+
_all_space.crt: S7 + I1 both with misplaced spaces (invalid PEM)
96+
_pem_space.crt: S7 with misplaced space (invalid PEM) + I1
97+
_trailing_space.crt: S7 + I1 both with trailing space (valid PEM)
98+
_spurious_int-ca.crt: S7 + I2(spurious) + I1
99+
- server8*.crt: I2 R L: RSA signed by EC signed by RSA (P1 for _int-ca2)
100+
- server9*.crt: 1 R C* L P1*: signed using RSASSA-PSS
101+
*CRL for: 9.crt, -badsign, -with-ca (P1)
102+
- server10.crt: I3 E L
103+
-badsign.crt: S10 with corrupted signature
104+
-bs_int3.pem: S10-badsign + I3
105+
_int3-bs.pem: S10 + I3-badsign
106+
_int3_int-ca2.crt: S10 + I3 + I2
107+
_int3_int-ca2_ca.crt: S10 + I3 + I2 + 1
108+
_int3_spurious_int-ca2.crt: S10 + I3 + I1(spurious) + I2
109+
110+
Certificate revocation lists
111+
----------------------------
112+
113+
Signing CA in parentheses (same meaning as certificates).
114+
115+
- crl-ec-sha*.pem: (2) server6.crt
116+
- crl-future.pem: (2) server6.crt + unknown
117+
- crl-rsa-pss-*.pem: (1) server9{,badsign,with-ca}.crt + cert_sha384.crt + unknown
118+
- crl.pem, crl-futureRevocationDate.pem, crl_expired.pem: (1) server1{,.cert_type,.key_usage,.v1}.crt + unknown
119+
- crl_md*.pem: crl_sha*.pem: (1) same as crl.pem
120+
- crt_cat_*.pem: (1+2) concatenations in various orders:
121+
ec = crl-ec-sha256.pem, ecfut = crl-future.pem
122+
rsa = crl.pem, rsabadpem = same with pem error, rsaexp = crl_expired.pem
123+
124+
Note: crl_future would revoke server9 and cert_sha384.crt if signed by CA 1
125+
crl-rsa-pss* would revoke server6.crt if signed by CA 2
126+
127+
Generation
128+
----------
129+
130+
Newer test files have been generated through commands in the Makefile. The
131+
resulting files are committed to the repository so that the tests can
132+
run without having to re-do the generation and so that the output is the
133+
same for everyone (the generation process is randomized).
134+
135+
The origin of older certificates has not been recorded.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)