Skip to content

Commit 6e3d38f

Browse files
committed
generating external self signed certificate
1 parent 98e2606 commit 6e3d38f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

backend/config/crypto/keys.bash

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ENV="$2"
77

88
ALIAS="itmo-dating"
99
ALIAS_BACKEND="$ALIAS-backend"
10+
ALIAS_EXTERNAL="$ALIAS-external"
1011

1112
VALIDITY=1
1213
PASSWORD="$ITMO_DATING_KEY_STORE_PASSWORD"
@@ -71,6 +72,9 @@ function generate() {
7172
-deststoretype JKS \
7273
-destkeystore "$ALIAS_BACKEND.jks" \
7374
-deststorepass "$PASSWORD"
75+
76+
echo "Copying PKCS12 as external certificate"
77+
cp "$ALIAS_BACKEND.p12" "$ALIAS_EXTERNAL.p12"
7478
}
7579

7680
function copy() {
@@ -92,6 +96,7 @@ function distribute() {
9296

9397
echo "Copying package to the gateway..."
9498
copy "$GATEWAY_INSTALL_PATH" "$ALIAS_BACKEND.p12"
99+
copy "$GATEWAY_INSTALL_PATH" "$ALIAS_EXTERNAL.p12"
95100

96101
echo "Copying keys to the consul..."
97102
copy "$CONSUL_INSTALL_PATH" "$ALIAS_BACKEND.key"

backend/gateway/src/main/resources/application.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ server:
9595
ssl:
9696
enabled: true
9797
key-store-type: PKCS12
98-
key-store: classpath:keystore/keystore.p12
98+
key-store: classpath:keystore/itmo-dating-external.p12
9999
key-store-password: ${KEY_STORE_PASSWORD}
100100
protocol: TLSv1.3
101101
enabled-protocols: TLSv1.3

0 commit comments

Comments
 (0)