diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-09-18 23:45:09 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-09-18 23:45:09 +0100 |
| commit | ff970cab251af0588e02fa75f235f91539d12f19 (patch) | |
| tree | d27704690db936184e071f604101a18833278478 /src | |
| parent | f4e3b9c0b4027018c39b9085e080325c19ac9164 (diff) | |
Quote openssl -subj strings.
Diffstat (limited to 'src')
| -rw-r--r-- | src/certificate_chain.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/certificate_chain.cc b/src/certificate_chain.cc index b2ebeca8..43bdba40 100644 --- a/src/certificate_chain.cc +++ b/src/certificate_chain.cc @@ -201,7 +201,7 @@ dcp::make_certificate_chain ( stringstream c; c << quoted_openssl << " req -new -x509 -sha256 -config ca.cnf -days 3650 -set_serial 5" - << " -subj " << ca_subject << " -key ca.key -outform PEM -out ca.self-signed.pem"; + << " -subj \"" << ca_subject << "\" -key ca.key -outform PEM -out ca.self-signed.pem"; command (c.str().c_str()); } @@ -231,7 +231,7 @@ dcp::make_certificate_chain ( { stringstream s; s << quoted_openssl - << " req -new -config intermediate.cnf -days 3649 -subj " << inter_subject << " -key intermediate.key -out intermediate.csr"; + << " req -new -config intermediate.cnf -days 3649 -subj \"" << inter_subject << "\" -key intermediate.key -out intermediate.csr"; command (s.str().c_str()); } @@ -267,7 +267,7 @@ dcp::make_certificate_chain ( { stringstream s; - s << quoted_openssl << " req -new -config leaf.cnf -days 3648 -subj " << leaf_subject << " -key leaf.key -outform PEM -out leaf.csr"; + s << quoted_openssl << " req -new -config leaf.cnf -days 3648 -subj \"" << leaf_subject << "\" -key leaf.key -outform PEM -out leaf.csr"; command (s.str().c_str()); } |
