mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-07 19:22:08 +01:00
5f80fe7b8a
Signed-off-by: Qian Deng <dengq@vmware.com>
11 lines
440 B
Python
11 lines
440 B
Python
import os, shutil
|
|
|
|
def prepare_uaa_cert_file(uaa_ca_cert, core_cert_dir):
|
|
if os.path.isfile(uaa_ca_cert):
|
|
if not os.path.isdir(core_cert_dir):
|
|
os.makedirs(core_cert_dir)
|
|
core_uaa_ca = os.path.join(core_cert_dir, "uaa_ca.pem")
|
|
print("Copying UAA CA cert to %s" % core_uaa_ca)
|
|
shutil.copyfile(uaa_ca_cert, core_uaa_ca)
|
|
else:
|
|
print("Can not find UAA CA cert: %s, skip" % uaa_ca_cert) |