Skip to content

Commit

Permalink
Update TLS generate-certs destination location to default
Browse files Browse the repository at this point in the history
Signed-off-by: Sabeel Ansari <[email protected]>
  • Loading branch information
5abeel committed Sep 12, 2023
1 parent 6e2845a commit 8401f7c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions docs/guides/security/using-tls-certificates.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ certificates for running infrap4d in secure mode.
Note: Here target name can be `dpdk` or `es2k`.

Review the files `ca.conf` and `grpc-client.conf` available under
`/usr/share/stratum/<target_name>` to verify that the configuration settings are
`/usr/share/stratum/` to verify that the configuration settings are
as desired.

Run the `generate-certs.sh` available under `/usr/share/stratum/<target_name>`.
Run the `generate-certs.sh` available under `/usr/share/stratum/`.

Note: Here `IP` is the IP address of gRPC server.
For example, `IP` can be `127.0.0.1`, `5.5.5.5` or `localhost`.

```bash
cd /usr/share/stratum/<target_name>/
cd /usr/share/stratum/

COMMON_NAME=<IP> ./generate-certs.sh
```
Expand Down
7 changes: 4 additions & 3 deletions scripts/common/copy_config_files.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,16 @@ sudo mkdir -p /var/log/stratum/

SOURCE_DIR=${P4CP_INSTALL}/share/stratum/@TARGET_NAME@
TARGET_DIR=/usr/share/stratum/@TARGET_NAME@
TLS_CERTS_DIR=/usr/share/stratum

sudo mkdir -p ${TARGET_DIR}
sudo cp ${SOURCE_DIR}/@TARGET_NAME@_port_config.pb.txt ${TARGET_DIR}/
sudo cp ${SOURCE_DIR}/@TARGET_NAME@_skip_p4.conf ${TARGET_DIR}/

#... Install files required for TLS certificate generation ...#
sudo cp ${SOURCE_DIR}/ca.conf ${TARGET_DIR}/
sudo cp ${SOURCE_DIR}/grpc-client.conf ${TARGET_DIR}/
sudo cp ${P4CP_INSTALL}/sbin/generate-certs.sh ${TARGET_DIR}/
sudo cp ${SOURCE_DIR}/ca.conf ${TLS_CERTS_DIR}/
sudo cp ${SOURCE_DIR}/grpc-client.conf ${TLS_CERTS_DIR}/
sudo cp ${P4CP_INSTALL}/sbin/generate-certs.sh ${TLS_CERTS_DIR}/

sudo mkdir /usr/share/target_sys/
sudo cp $SDE_INSTALL/share/target_sys/zlog-cfg /usr/share/target_sys/
Expand Down

0 comments on commit 8401f7c

Please sign in to comment.