aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/x509/x509self.cpp
diff options
context:
space:
mode:
authorndotb <[email protected]>2019-05-07 15:54:26 -0400
committerndotb <[email protected]>2019-05-07 15:54:26 -0400
commit9e3808df609657cb9bb741d5c1e12cf40f691de2 (patch)
tree06fabe1e689b16afe5cb41df47c3f92dc1c13334 /src/lib/x509/x509self.cpp
parentf3506ee5df67d92616bc98291d06109d2553a078 (diff)
functionality to support multiple OUs, missing unit tests on more_dns
Diffstat (limited to 'src/lib/x509/x509self.cpp')
-rw-r--r--src/lib/x509/x509self.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/x509/x509self.cpp b/src/lib/x509/x509self.cpp
index 32f21c101..0c5e85491 100644
--- a/src/lib/x509/x509self.cpp
+++ b/src/lib/x509/x509self.cpp
@@ -29,6 +29,10 @@ void load_info(const X509_Cert_Options& opts, X509_DN& subject_dn,
subject_dn.add_attribute("X520.Locality", opts.locality);
subject_dn.add_attribute("X520.Organization", opts.organization);
subject_dn.add_attribute("X520.OrganizationalUnit", opts.org_unit);
+ for(auto extra_ou : opts.more_org_units) {
+ subject_dn.add_attribute("X520.OrganizationalUnit", extra_ou);
+ }
+
subject_dn.add_attribute("X520.SerialNumber", opts.serial_number);
subject_alt = AlternativeName(opts.email, opts.uri, opts.dns, opts.ip);
subject_alt.add_othername(OIDS::lookup("PKIX.XMPPAddr"),