Skip to content

Commit

Permalink
♻️ 🔒️Validate in the lower level + add validation to Citrine
Browse files Browse the repository at this point in the history
- Move the validation to the lower level since the directory
  structure is different
- Add code to copy the real root over to citrine
- Add validation to citrine

As an aside, I wonder if this weird configuration (the actual
root CA isn't there?!) is the reason that the self-signed
certs are not working with Citrine. Need to investigate once
we roll forward.

Testing done:
as part of 86b1ea8

Signed-off-by: Shankari <[email protected]>
  • Loading branch information
shankari committed Nov 13, 2024
1 parent c8d453d commit e7af1bd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
11 changes: 11 additions & 0 deletions citrineos/copy-certs.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
mkdir -p Server/data/certificates

echo "Copying certs into ${DEMO_DIR}/citrineos-csms/Server/data/certificates"
tar xf cached_certs_correct_name_emaid.tar.gz

Expand All @@ -18,5 +20,14 @@
dist/etc/everest/certs/ca/csms/CPO_SUB_CA1.pem \
> Server/data/certificates/rootCertificate.pem

#Actual root cert
cp dist/etc/everest/certs/ca/v2g/V2G_ROOT_CA.pem Server/data/certificates/root-V2G-cert.pem

#ACME key
cp ../everest-demo/citrineos/acme_account_key.pem Server/data/certificates/acme_account_key.pem

echo "Validating that the certificates are set up correctly"
openssl verify -show_chain \
-CAfile Server/data/certificates/root-V2G-cert.pem \
-untrusted Server/data/certificates/rootCertificate.pem \
Server/data/certificates/certChain.pem
6 changes: 6 additions & 0 deletions maeve/copy-certs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
cp dist/etc/everest/certs/ca/v2g/V2G_ROOT_CA.pem config/certificates/root-V2G-cert.pem
cp dist/etc/everest/certs/ca/mo/MO_ROOT_CA.pem config/certificates/root-MO-cert.pem

echo "Validating that the certificates are set up correctly"
openssl verify -show_chain \
-CAfile config/certificates/root-V2G-cert.pem \
-untrusted config/certificates/trust.pem \
config/certificates/csms.pem

0 comments on commit e7af1bd

Please sign in to comment.