Skip to content

Commit 183290b

Browse files
authored
Merge pull request #543 from zigbee-alliance/feature/524-adding-noc-root-certificate
#524 Implement adding and requesting root NOC certificates
2 parents b98e578 + 40e5d53 commit 183290b

Some content is hidden

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

59 files changed

+5568
-381
lines changed

docs/static/openapi.yml

+535
Large diffs are not rendered by default.

docs/transactions.md

+55
Original file line numberDiff line numberDiff line change
@@ -843,6 +843,7 @@ The certificate is immutable. It can only be revoked by either the owner or a qu
843843
- no existing `Proposed` certificate with the same `<Certificate's Subject>:<Certificate's Subject Key ID>` combination.
844844
- no existing certificate with the same `<Certificate's Issuer>:<Certificate's Serial Number>` combination.
845845
- if approved certificates with the same `<Certificate's Subject>:<Certificate's Subject Key ID>` combination already exists:
846+
- the existing certificate must not be NOC certificate
846847
- sender must match to the owner of the existing certificates.
847848
- the signature (self-signature) and expiration date are valid.
848849

@@ -919,6 +920,7 @@ The certificate is immutable. It can only be revoked by either the owner or a qu
919920
- `Authority Key Identifier` != `Subject Key Identifier`
920921
- no existing certificate with the same `<Certificate's Issuer>:<Certificate's Serial Number>` combination.
921922
- if certificates with the same `<Certificate's Subject>:<Certificate's Subject Key ID>` combination already exist:
923+
- the existing certificate must not be NOC certificate
922924
- sender must match to the owner of the existing certificates.
923925
- the signature (self-signature) and expiration date are valid.
924926
- parent certificate must be already stored on the ledger and a valid chain to some root certificate can be built.
@@ -1122,6 +1124,31 @@ Deletes a PKI Revocation distribution endpoint (such as RFC5280 Certificate Revo
11221124
- CLI command:
11231125
- `dcld tx pki delete-revocation-point --vid=<uint16> --issuer-subject-key-id=<string> --label=<string> --from=<account>`
11241126

1127+
### ADD_NOC_X509_ROOT_CERTIFICATE
1128+
1129+
**Status: Implemented**
1130+
1131+
This transaction adds a NOC root certificate owned by the Vendor.
1132+
1133+
- Who can send: Vendor account
1134+
- Validation:
1135+
- the provided certificate must be a root certificate:
1136+
- `Issuer` == `Subject`
1137+
- `Authority Key Identifier` == `Subject Key Identifier`
1138+
- no existing certificate with the same `<Certificate's Issuer>:<Certificate's Serial Number>` combination.
1139+
- if certificates with the same `<Certificate's Subject>:<Certificate's Subject Key ID>` combination already exist:
1140+
- the existing certificate must be NOC root certificate
1141+
- the sender's VID must match the vid field of the existing certificates.
1142+
- the signature (self-signature) and expiration date must be valid.
1143+
- Parameters:
1144+
- cert: `string` - The NOC Root Certificate, encoded in X.509v3 PEM format. Can be a PEM string or a file path.
1145+
- In State:
1146+
- `pki/ApprovedCertificates/value/<Subject>/<SubjectKeyID>`
1147+
- `pki/ApprovedCertificatesBySubject/value/<Subject>`
1148+
- `pki/ApprovedCertificatesBySubjectKeyID/value/<SubjectKeyID>`
1149+
- `pki/NOCRootCertificates/value/<VID>`
1150+
- CLI Command:
1151+
- `dcld tx pki add-noc-x509-root-cert --certificate=<string-or-path> --from=<account>`
11251152

11261153
### GET_X509_CERT
11271154

@@ -1407,6 +1434,34 @@ Should be sent to trusted nodes only.
14071434
- REST API:
14081435
- GET `/dcl/pki/revocation-points`
14091436

1437+
### GET_NOC_X509_ROOT_CERTS_BY_VID
1438+
1439+
**Status: Implemented**
1440+
1441+
Retrieve NOC root certificates associated with a specific VID.
1442+
1443+
- Who can send: Any account
1444+
- Parameters:
1445+
- vid: `uint16` - Vendor ID (positive non-zero)
1446+
- CLI Command:
1447+
- `dcld query pki noc-x509-root-certs --vid=<uint16>`
1448+
- REST API:
1449+
- GET `/dcl/pki/noc-root-certificates/{vid}`
1450+
1451+
### GET_ALL_NOC_X509_ROOT_CERTS
1452+
1453+
**Status: Implemented**
1454+
1455+
Retrieve a list of all of NOC root certificates
1456+
1457+
- Who can send: Any account
1458+
- Parameters:
1459+
- Common pagination parameters
1460+
- CLI Command:
1461+
- `dcld query pki all-noc-x509-root-certs`
1462+
- REST API:
1463+
- GET `/dcl/pki/noc-root-certificates`
1464+
14101465
## AUTH
14111466

14121467
### PROPOSE_ADD_ACCOUNT

genlocalnetconfig.sh

+5
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,11 @@ for node_name in node0 node1 node2 node3 observer0; do
174174
# Make RPC endpoints available externally
175175
sed -i $SED_EXT 's/laddr = "tcp:\/\/127.0.0.1:26657"/laddr = "tcp:\/\/0.0.0.0:26657"/g' "$LOCALNET_DIR/${node_name}/config/config.toml"
176176

177+
# Make REST endpoints available externally
178+
sed -i $SED_EXT 's/address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:1317"/g' "$LOCALNET_DIR/${node_name}/config/app.toml"
179+
# Make gRPC endpoints available externally
180+
sed -i $SED_EXT 's/address = "localhost:9090"/address = "0.0.0.0:9090"/g' "$LOCALNET_DIR/${node_name}/config/app.toml"
181+
177182
# sets proper moniker
178183
sed -i $SED_EXT "s/moniker = .*/moniker = \"$node_name\"/g" "$LOCALNET_DIR/${node_name}/config/config.toml"
179184

go.sum

+1-1
Original file line numberDiff line numberDiff line change
@@ -2764,4 +2764,4 @@ rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
27642764
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
27652765
sigs.k8s.io/yaml v1.3.0 h1:a2VclLzOGrwOHDiV8EfBGhvjHvP46CtW5j6POvhYGGo=
27662766
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
2767-
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
2767+
sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
+176
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
set -euo pipefail
2+
source integration_tests/cli/common.sh
3+
4+
noc_root_cert_1_path="integration_tests/constants/noc_root_cert_1"
5+
noc_root_cert_1_subject="MFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMMBU5PQy0x"
6+
noc_root_cert_1_subject_key_id="44:EB:4C:62:6B:25:48:CD:A2:B3:1C:87:41:5A:08:E7:2B:B9:83:26"
7+
noc_root_cert_1_serial_number="217369606639495620450806539821422258966012867792"
8+
noc_root_cert_1_subject_as_text="CN=NOC-1,O=Internet Widgits Pty Ltd,ST=Some-State,C=AU"
9+
10+
noc_root_cert_2_path="integration_tests/constants/noc_root_cert_2"
11+
noc_root_cert_2_subject="MFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMMBU5PQy0y"
12+
noc_root_cert_2_subject_key_id="CF:E6:DD:37:2B:4C:B2:B9:A9:F2:75:30:1C:AA:B1:37:1B:11:7F:1B"
13+
noc_root_cert_2_serial_number="720401643293243343104681760462974770802745092176"
14+
noc_root_cert_2_subject_as_text="CN=NOC-2,O=Internet Widgits Pty Ltd,ST=Some-State,C=AU"
15+
16+
noc_root_cert_3_path="integration_tests/constants/noc_root_cert_3"
17+
noc_root_cert_3_subject="MFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMMBU5PQy0z"
18+
noc_root_cert_3_subject_key_id="88:0D:06:D9:64:22:29:34:78:7F:8C:3B:AE:F5:08:93:86:8F:0D:20"
19+
noc_root_cert_3_serial_number="38457288443253426021793906708335409501754677187"
20+
noc_root_cert_3_subject_as_text="CN=NOC-3,O=Internet Widgits Pty Ltd,ST=Some-State,C=AU"
21+
22+
trustee_account="jack"
23+
second_trustee_account="alice"
24+
25+
vid_in_hex_format=0x6006
26+
vid=24582
27+
28+
vendor_account=vendor_account_$vid_in_hex_format
29+
echo "Create Vendor account - $vendor_account"
30+
create_new_vendor_account $vendor_account $vid_in_hex_format
31+
32+
vid_2_in_hex_format=0x125D
33+
vid_2=4701
34+
35+
vendor_account_2=vendor_account_$vid_2_in_hex_format
36+
echo "Create Vendor account - $vendor_account_2"
37+
create_new_vendor_account $vendor_account_2 $vid_2_in_hex_format
38+
39+
40+
test_divider
41+
42+
echo "Request NOC certificate by VID must be empty"
43+
result=$(dcld query pki noc-x509-root-certs --vid="$vid")
44+
check_response "$result" "Not Found"
45+
response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\""
46+
response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
47+
response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
48+
response_does_not_contain "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
49+
echo $result | jq
50+
51+
test_divider
52+
53+
echo "Request all NOC root certificates must be empty"
54+
result=$(dcld query pki all-noc-x509-root-certs)
55+
check_response "$result" "\[\]"
56+
response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\""
57+
response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
58+
response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
59+
response_does_not_contain "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
60+
echo $result | jq
61+
62+
test_divider
63+
64+
echo "Request approved certificate must be empty"
65+
result=$(dcld query pki x509-cert --subject="$noc_root_cert_1_subject" --subject-key-id="$noc_root_cert_1_subject_key_id")
66+
check_response "$result" "Not Found"
67+
response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\""
68+
response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
69+
response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
70+
response_does_not_contain "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
71+
echo $result | jq
72+
73+
test_divider
74+
75+
echo "Request all certificates by subject must be empty"
76+
result=$(dcld query pki all-subject-x509-certs --subject="$noc_root_cert_1_subject")
77+
check_response "$result" "Not Found"
78+
response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\""
79+
response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
80+
echo $result | jq
81+
82+
test_divider
83+
84+
echo "Request all certificates by subjectKeyId must be empty"
85+
result=$(dcld query pki x509-cert --subject-key-id="$noc_root_cert_1_subject_key_id")
86+
check_response "$result" "Not Found"
87+
response_does_not_contain "$result" "\"subject\": \"$noc_root_cert_1_subject\""
88+
response_does_not_contain "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
89+
response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
90+
response_does_not_contain "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
91+
echo $result | jq
92+
93+
test_divider
94+
95+
echo "Try to add inermidiate cert using add-noc-x509-root-cert command"
96+
intermediate_path="integration_tests/constants/intermediate_cert"
97+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$intermediate_path" --from $vendor_account --yes)
98+
check_response "$result" "\"code\": 414"
99+
100+
echo "Add first NOC root certificate by vendor with VID = $vid"
101+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_1_path" --from $vendor_account --yes)
102+
check_response "$result" "\"code\": 0"
103+
104+
echo "Add second NOC root certificate by vendor with VID = $vid"
105+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_2_path" --from $vendor_account --yes)
106+
check_response "$result" "\"code\": 0"
107+
108+
echo "Add third NOC root certificate by vendor with VID = $vid_2"
109+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_3_path" --from $vendor_account_2 --yes)
110+
check_response "$result" "\"code\": 0"
111+
112+
test_divider
113+
114+
echo "Request NOC root certificate by VID"
115+
result=$(dcld query pki noc-x509-root-certs --vid="$vid")
116+
echo $result | jq
117+
check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\""
118+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
119+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
120+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
121+
check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\""
122+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\""
123+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\""
124+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_2_subject_as_text\""
125+
check_response "$result" "\"vid\": $vid"
126+
127+
test_divider
128+
129+
echo "Request All NOC root certificate"
130+
result=$(dcld query pki all-noc-x509-root-certs)
131+
echo $result | jq
132+
check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\""
133+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
134+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
135+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
136+
check_response "$result" "\"subject\": \"$noc_root_cert_2_subject\""
137+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_2_subject_key_id\""
138+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\""
139+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_2_subject_as_text\""
140+
check_response "$result" "\"subject\": \"$noc_root_cert_3_subject\""
141+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_3_subject_key_id\""
142+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_3_serial_number\""
143+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_3_subject_as_text\""
144+
check_response "$result" "\"vid\": $vid"
145+
check_response "$result" "\"vid\": $vid_2"
146+
147+
test_divider
148+
149+
echo "Request NOC root certificate by Subject and SubjectKeyID"
150+
result=$(dcld query pki x509-cert --subject="$noc_root_cert_1_subject" --subject-key-id="$noc_root_cert_1_subject_key_id")
151+
echo $result | jq
152+
check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\""
153+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
154+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
155+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
156+
check_response "$result" "\"approvals\": \\[\\]"
157+
158+
test_divider
159+
160+
echo "Request NOC root certificate by Subject"
161+
result=$(dcld query pki all-subject-x509-certs --subject="$noc_root_cert_1_subject")
162+
echo $result | jq
163+
check_response "$result" "\"$noc_root_cert_1_subject\""
164+
check_response "$result" "\"$noc_root_cert_1_subject_key_id\""
165+
166+
test_divider
167+
168+
echo "Request NOC root certificate by SubjectKeyID"
169+
result=$(dcld query pki x509-cert --subject-key-id="$noc_root_cert_1_subject_key_id")
170+
echo $result | jq
171+
check_response "$result" "\"subject\": \"$noc_root_cert_1_subject\""
172+
check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
173+
check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
174+
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
175+
176+
test_divider
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package testconstants
2+
3+
const (
4+
NocRootCert1 = `
5+
-----BEGIN CERTIFICATE-----
6+
MIICATCCAaegAwIBAgIUJhMwtZzr6dGO6tqHmuDi4Bz/tNAwCgYIKoZIzj0EAwIw
7+
VTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu
8+
dGVybm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WwmhEtVRoULLet3NDIjwvw1
46+
F5UqAiEAshHfXxUpdfxqiLoTjQjkNf0AHVYBFhLdB+iIFspwTyg=
47+
-----END CERTIFICATE-----
48+
`
49+
50+
NocRootCert1Subject = "MFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMMBU5PQy0x"
51+
NocRootCert1SubjectKeyID = "44:EB:4C:62:6B:25:48:CD:A2:B3:1C:87:41:5A:08:E7:2B:B9:83:26"
52+
NocRootCert1SerialNumber = "217369606639495620450806539821422258966012867792"
53+
NocRootCert1SubjectAsText = "CN=NOC-1,O=Internet Widgits Pty Ltd,ST=Some-State,C=AU"
54+
55+
NocRootCert2Subject = "MFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMMBU5PQy0y"
56+
NocRootCert2SubjectKeyID = "CF:E6:DD:37:2B:4C:B2:B9:A9:F2:75:30:1C:AA:B1:37:1B:11:7F:1B"
57+
NocRootCert2SerialNumber = "720401643293243343104681760462974770802745092176"
58+
NocRootCert2SubjectAsText = "CN=NOC-2,O=Internet Widgits Pty Ltd,ST=Some-State,C=AU"
59+
60+
NocRootCert3Subject = "MFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxDjAMBgNVBAMMBU5PQy0z"
61+
NocRootCert3SubjectKeyID = "88:0D:06:D9:64:22:29:34:78:7F:8C:3B:AE:F5:08:93:86:8F:0D:20"
62+
NocRootCert3SerialNumber = "38457288443253426021793906708335409501754677187"
63+
NocRootCert3SubjectAsText = "CN=NOC-3,O=Internet Widgits Pty Ltd,ST=Some-State,C=AU"
64+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIICATCCAaegAwIBAgIUJhMwtZzr6dGO6tqHmuDi4Bz/tNAwCgYIKoZIzj0EAwIw
3+
VTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu
4+
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEOMAwGA1UEAwwFTk9DLTEwIBcNMjQwMjE0
5+
MTQ0NzI1WhgPMzAyMzA2MTcxNDQ3MjVaMFUxCzAJBgNVBAYTAkFVMRMwEQYDVQQI
6+
DApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQx
7+
DjAMBgNVBAMMBU5PQy0xMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECsW1A5xK
8+
Tv4qbfUsUp74bQNlkJV6GZL59b+PgqLyq7P1PMtJK3L7NmisUvdsT1dYr1sMzDEK
9+
6ZuajkpkIfeV3qNTMFEwHQYDVR0OBBYEFETrTGJrJUjNorMch0FaCOcruYMmMB8G
10+
A1UdIwQYMBaAFETrTGJrJUjNorMch0FaCOcruYMmMA8GA1UdEwEB/wQFMAMBAf8w
11+
CgYIKoZIzj0EAwIDSAAwRQIgS4gxVvmQghH93BbG3RRpJ07Re5+gTFAo5qfVTtDo
12+
teUCIQCQwlaPb8U8S0ee3Iz1gg4LOTxZ/IWyCzPpCteAEKcl+w==
13+
-----END CERTIFICATE-----
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIICATCCAaegAwIBAgIUfi/tSwkm8n1SVPVYvpmRj7WDKFAwCgYIKoZIzj0EAwIw
3+
VTELMAkGA1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGElu
4+
dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEOMAwGA1UEAwwFTk9DLTIwIBcNMjQwMjE0
5+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QeV5MQxyjke4x/SvWg9jHJXiO3t52xCF803
9+
7YDN5/GCAvu+x6NTMFEwHQYDVR0OBBYEFIgNBtlkIik0eH+MO671CJOGjw0gMB8G
10+
A1UdIwQYMBaAFIgNBtlkIik0eH+MO671CJOGjw0gMA8GA1UdEwEB/wQFMAMBAf8w
11+
CgYIKoZIzj0EAwIDSQAwRgIhAIF/kTHuWYLfJtb/TWwmhEtVRoULLet3NDIjwvw1
12+
F5UqAiEAshHfXxUpdfxqiLoTjQjkNf0AHVYBFhLdB+iIFspwTyg=
13+
-----END CERTIFICATE-----

integration_tests/grpc_rest/pki/grpc_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ import (
3333
func TestPkiDemoGRPC(t *testing.T) {
3434
suite := utils.SetupTest(t, testconstants.ChainID, false)
3535
pki.Demo(&suite)
36+
pki.NocCertDemo(&suite)
3637
}

0 commit comments

Comments
 (0)