File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,13 @@ This is the certificate chain of the server and not the device's certificate kep
113
113
:::
114
114
115
115
If the Cumulocity server's certificate chain file isn't available locally, it can be downloaded using a web browser or using some other
116
- third-party tools like openssl command as follows :
116
+ third-party tools like openssl command to download the root certificate for a given instance :
117
117
118
118
<UserContext >
119
119
120
120
``` sh
121
- openssl s_client -connect $C8Y_URL :443 < /dev/null 2> /dev/null \
122
- | sed -ne ' /-BEGIN CERTIFICATE-/,/- END CERTIFICATE-/p '
121
+ openssl s_client -connect $C8Y_URL :443 -showcerts 2> /dev/null < /dev/null \
122
+ | awk ' /-* BEGIN CERTIFICATE-*/{m=1; last_cert=""} m{last_cert=last_cert"\n"$0} m{if( /-* END CERTIFICATE-*/ ) m=0} END{ sub(/^\n/, "", last_cert); print last_cert} '
123
123
```
124
124
125
125
</UserContext >
You can’t perform that action at this time.
0 commit comments