-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Custom SSL certificate for Contrail WebUI
Adding ssl creation step (in /etc/contrail/webui_ssl) while installing contrail-web-core package in stead of making it part of contrail-provisioning. Change-Id: I03c612f4baf3c95231de2feb031ec321e219b0e3 Related-Bug: #1704746 (cherry picked from commit bd34383) (cherry picked from commit bedac2b)
- Loading branch information
1 parent
bc643bb
commit 5fab254
Showing
5 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
common/debian/contrail-web-core/debian/contrail-web-core.postinst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
websslpath=/etc/contrail/webui_ssl | ||
sslsub=/C=US/ST=CA/L=Sunnyvale/O=JuniperNetworks/OU=JuniperCA/CN=ContrailCA | ||
|
||
if [ ! -e $websslpath/cs-key.pem ] && [ ! -e $websslpath/cs-cert.pem ]; then | ||
openssl req -new -newkey rsa:2048 -nodes -out $websslpath/certrequest.csr -keyout $websslpath/cs-key.pem -subj $sslsub | ||
openssl x509 -req -days 730 -in $websslpath/certrequest.csr -signkey $websslpath/cs-key.pem -out $websslpath/cs-cert.pem | ||
fi |
13 changes: 13 additions & 0 deletions
13
common/debian/contrail-web-core/debian/contrail-web-core.postrm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
# vim: set ts=2 et: | ||
|
||
set -e | ||
websslpath=/etc/contrail/webui_ssl | ||
|
||
if [ "$1" = "remove" ] || [ "$1" = "purge" ] ; then | ||
if [ -e $websslpath ] ; then | ||
mv $websslpath /tmp/webui_ssl.$(date +%F_%R).backup | ||
fi | ||
fi | ||
#DEBHELPER# | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters