blob: 82c8d65ede01d36a20d51da4ac7e74ffd11d0dfe (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/usr/bin/env bash
#
# Copyright (c) 2025. Anshul Gupta
# All rights reserved.
#
set -eux
cd /home/anshulgupta/certs
chmod 600 tls.crt || true
chmod 600 tls.key || true
openssl req -newkey rsa:4096 -out csr.pem -keyout tls.key -config csr.cnf -nodes
gcloud privateca certificates create kandim-cert \
--issuer-pool default \
--issuer-location us-west1 \
--ca anshul-ca-1 \
--csr csr.pem \
--cert-output-file tls.crt \
--validity "P90D"
chown postgres:postgres tls.crt
chown postgres:postgres tls.key
chmod 400 tls.crt
chmod 400 tls.key
systemctl restart postgresql
|