| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| BUILD | D | 22-Oct-2025 | 1 KiB | 38 | 35 | |
| README | D | 22-Oct-2025 | 6.3 KiB | 171 | 123 | |
| badclient.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| badclient.pem | D | 22-Oct-2025 | 1.3 KiB | 23 | 22 | |
| badserver.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| badserver.pem | D | 22-Oct-2025 | 1.3 KiB | 23 | 22 | |
| ca-openssl.cnf | D | 22-Oct-2025 | 541 | 18 | 15 | |
| ca.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| ca.pem | D | 22-Oct-2025 | 1.2 KiB | 21 | 20 | |
| client-with-spiffe-openssl.cnf | D | 22-Oct-2025 | 305 | 16 | 12 | |
| client-with-spiffe.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| client-with-spiffe.pem | D | 22-Oct-2025 | 1.4 KiB | 24 | 23 | |
| client.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| client.pem | D | 22-Oct-2025 | 1.1 KiB | 21 | 20 | |
| client1.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| client1.pem | D | 22-Oct-2025 | 1.1 KiB | 21 | 20 | |
| client2.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| client2.pem | D | 22-Oct-2025 | 1.1 KiB | 21 | 20 | |
| intermediate.cnf | D | 22-Oct-2025 | 303 | 13 | 10 | |
| intermediate_ca.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| intermediate_ca.pem | D | 22-Oct-2025 | 1.4 KiB | 24 | 23 | |
| leaf_and_intermediate_chain.pem | D | 22-Oct-2025 | 2.6 KiB | 44 | 43 | |
| leaf_signed_by_intermediate.cnf | D | 22-Oct-2025 | 283 | 13 | 10 | |
| leaf_signed_by_intermediate.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| leaf_signed_by_intermediate.pem | D | 22-Oct-2025 | 1.2 KiB | 21 | 20 | |
| malformed-cert.pem | D | 22-Oct-2025 | 1.3 KiB | 23 | 22 | |
| malformed-key.pem | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| multi-domain-openssl.cnf | D | 22-Oct-2025 | 928 | 34 | 30 | |
| multi-domain.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| multi-domain.pem | D | 22-Oct-2025 | 1.4 KiB | 25 | 24 | |
| server0.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| server0.pem | D | 22-Oct-2025 | 1.2 KiB | 21 | 20 | |
| server1-openssl.cnf | D | 22-Oct-2025 | 790 | 27 | 23 | |
| server1.key | D | 22-Oct-2025 | 1.7 KiB | 29 | 28 | |
| server1.pem | D | 22-Oct-2025 | 1.3 KiB | 23 | 22 |
README
1The test credentials (CONFIRMEDTESTKEY) have been generated with the following 2commands: 3 4Bad credentials (badclient.* / badserver.*): 5============================================ 6 7These are self-signed certificates: 8 9$ openssl req -x509 -newkey rsa:2048 -keyout badserver.key -out badserver.pem \ 10 -days 3650 -nodes 11 12When prompted for certificate information, everything is default except the 13common name which is set to badserver.test.google.com. 14 15 16Malformed credentials (malformed.*): 17===================================== 18 19These are invalid PEM blocks. They can be built by generating a valid 20PEM-encoded certificate or private key and deleting a random character in the 21body of the PEM-encoding. 22 23Valid test credentials: 24======================= 25 26The ca is self-signed: 27---------------------- 28 29$ openssl req -x509 -new -newkey rsa:2048 -nodes -keyout ca.key -out ca.pem \ 30 -config ca-openssl.cnf -days 3650 -extensions v3_req 31When prompted for certificate information, everything is default. 32 33client is issued by CA: 34----------------------- 35 36$ openssl genrsa -out client.key.rsa 2048 37$ openssl pkcs8 -topk8 -in client.key.rsa -out client.key -nocrypt 38$ openssl req -new -key client.key -out client.csr 39 40When prompted for certificate information, everything is default except the 41common name which is set to testclient. 42 43$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client.csr \ 44 -out client.pem -days 3650 45 46client1 is issued by CA: 47----------------------- 48 49$ openssl genrsa -out client1.key.rsa 2048 50$ openssl pkcs8 -topk8 -in client1.key.rsa -out client1.key -nocrypt 51$ openssl req -new -key client1.key -out client1.csr 52 53When prompted for certificate information, everything is default except the 54common name which is set to testclient1. 55 56$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client1.csr \ 57 -out client1.pem -days 3650 58 59client2 is issued by CA: 60----------------------- 61 62$ openssl genrsa -out client2.key.rsa 2048 63$ openssl pkcs8 -topk8 -in client2.key.rsa -out client2.key -nocrypt 64$ openssl req -new -key client2.key -out client2.csr 65 66When prompted for certificate information, everything is default except the 67common name which is set to testclient2. 68 69$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client2.csr \ 70 -out client2.pem -days 3650 71 72client-with-spiffe is issued by CA: 73----------------------- 74 75$ openssl genrsa -out client-with-spiffe.key.rsa 2048 76$ openssl pkcs8 -topk8 -in client-with-spiffe.key.rsa -out client-with-spiffe.key -nocrypt 77$ openssl req -new -key client-with-spiffe.key -out client-with-spiffe.csr -config client-with-spiffe-openssl.cnf 78$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client-with-spiffe.csr \ 79 -out client-with-spiffe.pem -extensions v3_req -extfile client-with-spiffe-openssl.cnf -days 3650 80 81server0 is issued by CA: 82------------------------ 83 84$ openssl genrsa -out server0.key.rsa 2048 85$ openssl pkcs8 -topk8 -in server0.key.rsa -out server0.key -nocrypt 86$ openssl req -new -key server0.key -out server0.csr 87 88When prompted for certificate information, everything is default except the 89common name which is set to *.test.google.com.au. 90 91$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in server0.csr \ 92 -out server0.pem -days 3650 93 94server1 is issued by CA with a special config for subject alternative names: 95---------------------------------------------------------------------------- 96 97$ openssl genrsa -out server1.key.rsa 2048 98$ openssl pkcs8 -topk8 -in server1.key.rsa -out server1.key -nocrypt 99$ openssl req -new -key server1.key -out server1.csr -config server1-openssl.cnf 100 101When prompted for certificate information, everything is default except the 102common name which is set to *.test.google.com. 103 104$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in server1.csr \ 105 -out server1.pem -extensions req_ext -extfile server1-openssl.cnf -days 3650 106 107multi-domain is a self-signed certificate having multiple subject alternative 108names: 109---------------------------------------------------------------------------- 110 111$ openssl genrsa -out multi-domain.key.rsa 2048 112$ openssl pkcs8 -topk8 -in multi-domain.key.rsa -out multi-domain.key -nocrypt 113$ openssl req -new -key multi-domain.key -out multi-domain.csr -config 114multi-domain-openssl.cnf 115$ openssl req -x509 -new -extensions v3_req -key multi-domain.key -out 116multi-domain.pem -days 3650 -config multi-domain-openssl.cnf 117 118 119Generate a chain with a leaf cert signed by an intermediate CA 120---------------------------------------------------------------------------- 121 122The fully verified chain will be root_ca -> intermediate_ca -> leaf 123 124Generating the intermediate CA 125$ openssl genrsa -out temp.rsa 2048 126$ openssl pkcs8 -topk8 -in temp.rsa -out intermediate_ca.key -nocrypt 127$ rm temp.rsa 128$ openssl req -key intermediate_ca.key -new -out temp.csr -config intermediate.cnf 129$ openssl x509 -req -days 3650 -in temp.csr -CA ca.pem -CAkey ca.key -CAcreateserial -out intermediate_ca.pem -extfile intermediate.cnf -extensions 'v3_req' 130 131Generating the leaf and chain 132$ openssl genrsa -out temp.rsa 2048 133$ openssl pkcs8 -topk8 -in temp.rsa -out leaf_signed_by_intermediate.key -nocrypt 134$ openssl req -key leaf_signed_by_intermediate.key -new -out temp.csr -config leaf_signed_by_intermediate.cnf 135$ openssl x509 -req -days 3650 -in temp.csr -CA intermediate_ca.pem -CAkey intermediate_ca.key -CAcreateserial -out leaf_signed_by_intermediate.pem -extfile leaf_signed_by_intermediate.cnf -extensions 'v3_req' 136$ cat leaf_signed_by_intermediate.pem intermediate_ca.pem > leaf_and_intermediate_chain.pem 137 138 139 140Clean up: 141--------- 142$ rm *.rsa 143$ rm *.csr 144$ rm ca.srl 145 146Sync up with other repositories 147=============================== 148 149Copies of these keys exist in multiple locations across all the grpc repos 150(e.g., see the following partial list). You need to be careful when updating 151the keys. 152 153grpc-dart/interop/ 154grpc-dotnet/testassets/Certs/InteropTests/ 155grpc-go/testdata/ 156grpc-java/testing/src/main/resources/certs/ 157grpc-node/test/data/ 158src/objective-c/tests/TestCertificates.bundle/ 159src/php/tests/data/ 160src/python/grpcio_tests/tests/interop/credentials/ 161src/python/grpcio_tests/tests/unit/credentials/ 162src/ruby/spec/testdata/ 163test/core/end2end/data/ 164 165The following keys/certs are not distributed through multiple grpc repos yet, 166since they are only used in grpc core tests: 167 168multi-domain.* 169client1.* 170client2.* 171