Remove tls_ from option names
This commit is contained in:
@@ -353,16 +353,16 @@ void osd_messenger_t::parse_config(const json11::Json & config)
|
||||
this->use_proto_checksums = 0;
|
||||
if (!osd_num)
|
||||
{
|
||||
tls_cert = config["tls_cert"].string_value();
|
||||
tls_key = config["tls_key"].string_value();
|
||||
osd_tls_ca = config["osd_tls_ca"].string_value();
|
||||
tls_cert = config["cert"].string_value();
|
||||
tls_key = config["pkey"].string_value();
|
||||
osd_tls_ca = config["osd_ca"].string_value();
|
||||
}
|
||||
else
|
||||
{
|
||||
tls_cert = config["osd_tls_cert"].string_value();
|
||||
tls_key = config["osd_tls_key"].string_value();
|
||||
osd_tls_ca = config["osd_tls_ca"].string_value();
|
||||
client_tls_ca = config["client_tls_ca"].string_value();
|
||||
tls_cert = config["osd_cert"].string_value();
|
||||
tls_key = config["osd_pkey"].string_value();
|
||||
osd_tls_ca = config["osd_ca"].string_value();
|
||||
client_tls_ca = config["client_ca"].string_value();
|
||||
}
|
||||
if (!osd_num)
|
||||
this->iothread_count = (uint32_t)config["client_iothread_count"].uint64_value();
|
||||
|
||||
@@ -530,9 +530,9 @@ void osd_messenger_t::init_tls()
|
||||
if (tls_cert.empty() || tls_key.empty() || osd_tls_ca.empty() || osd_num && client_tls_ca.empty())
|
||||
{
|
||||
if (osd_num)
|
||||
fprintf(stderr, "Vitastor OSD TLS requires osd_tls_cert, osd_tls_key, osd_tls_ca, client_tls_ca\n");
|
||||
fprintf(stderr, "Vitastor transport encryption requires osd_cert, osd_pkey, osd_ca, client_ca options for OSDs\n");
|
||||
else
|
||||
fprintf(stderr, "Vitastor client TLS requires tls_cert, tls_key and osd_tls_ca\n");
|
||||
fprintf(stderr, "Vitastor transport encryption requires cert, pkey and osd_ca options\n");
|
||||
exit(1);
|
||||
}
|
||||
else
|
||||
|
||||
+6
-6
@@ -135,12 +135,12 @@ if [[ "$OSD_TLS" = "1" ]]; then
|
||||
openssl x509 -req -days 3650 -CA client_ca.crt -CAkey client_ca.key -CAcreateserial -in cli.csr -out cli.crt
|
||||
rm cli.csr
|
||||
cd $(dirname $0)/..
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"osd_tls_cert":"'$(pwd)'/testdata/osd.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"osd_tls_key":"'$(pwd)'/testdata/osd.key"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"osd_tls_ca":"'$(pwd)'/testdata/osd.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"client_tls_ca":"'$(pwd)'/testdata/client_ca.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"tls_cert":"'$(pwd)'/testdata/cli.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"tls_key":"'$(pwd)'/testdata/cli.key"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"osd_cert":"'$(pwd)'/testdata/osd.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"osd_pkey":"'$(pwd)'/testdata/osd.key"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"osd_ca":"'$(pwd)'/testdata/osd.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"client_ca":"'$(pwd)'/testdata/client_ca.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"cert":"'$(pwd)'/testdata/cli.crt"'
|
||||
VITASTOR_CFG="$VITASTOR_CFG"',"pkey":"'$(pwd)'/testdata/cli.key"'
|
||||
fi
|
||||
echo "{$VITASTOR_CFG}" > ./testdata/vitastor.conf
|
||||
VITASTOR_CFG=./testdata/vitastor.conf
|
||||
|
||||
Reference in New Issue
Block a user