diff options
author | Jack Lloyd <[email protected]> | 2018-06-28 16:50:10 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2018-06-28 16:50:10 -0400 |
commit | 61273b884af9ee23d034aeef939ad69326205307 (patch) | |
tree | 3514a86bfb6d280a0d6f389685c89b03e3232081 /src/cli/x509.cpp | |
parent | 358d288f7538f00e6b421a2cfb47655d7ed31f28 (diff) |
Allow setting extended key usage when generating PKCS10
Diffstat (limited to 'src/cli/x509.cpp')
-rw-r--r-- | src/cli/x509.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cli/x509.cpp b/src/cli/x509.cpp index ca21c1493..adae8285c 100644 --- a/src/cli/x509.cpp +++ b/src/cli/x509.cpp @@ -298,7 +298,7 @@ class Generate_PKCS10 final : public Command public: Generate_PKCS10() : Command("gen_pkcs10 key CN --country= --organization= " - "--email= --dns= --key-pass= --hash=SHA-256 --emsa=") {} + "--email= --dns= --ext-ku= --key-pass= --hash=SHA-256 --emsa=") {} std::string group() const override { @@ -327,6 +327,11 @@ class Generate_PKCS10 final : public Command opts.email = get_arg("email"); opts.more_dns = Botan::split_on(get_arg("dns"), ','); + for(std::string ext_ku : Botan::split_on(get_arg("ext-ku"), ',')) + { + opts.add_ex_constraint(ext_ku); + } + std::string emsa = get_arg("emsa"); if(emsa.empty() == false) |