add support for multiple organizational units in certificate
Background
We wanted to create a x509 certificate with multiple organizational units (ou). However, the current implementation accepts only a string and do not allow multiple organizational-units.
./bin/certstrap-dev-17687043-darwin-amd64 request-cert --domain "abc.com" -ou "org1,org2"
will produce
Certificate Request: Data: Version: 0 (0x0) Subject: commonName = abc.com organizationalUnitName = org1,org2 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:9d:19:c9:78:d6:48:e6:23:26:fc:b4:86:03:1f: fc:dd:9d:b2:32:78:01:a5:a1:75:ee:ef:05:3d:ac: 99:21:7b:f3:3b:69:a6:fc:7a:7e:8c:e2:2a:da:28: 38:f2:1a:91:1a:ab:39:4c:53:8b:5e:60:2c:49:cc: 0d:90:42:82:69:99:ae:a6:87:0f:4f:92:dd:ed:4a: ..... ....
USAGE
./bin/certstrap-dev-17687043-darwin-amd64 request-cert --domain "abc.com" -ou "org1,org2"
will produce
Certificate Request: Data: Version: 0 (0x0) Subject: commonName = CertAuth organizationalUnitName = ORG-2 + organizationalUnitName = ORG-1 Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (2048 bit) Modulus: 00:c8:9b:80:1f:9e:d4:71:26:ad:35:0c:a3:25:6e: 02:73:7f:c6:fd:23:97:9d:8d:dd:39:cb:19:4f:34: 9c:8d:31:03:00:50:11:02:24:c9:22:fe:62:c0:b0: f0:25:5c:18:5b:4f:29:1b:73:29:9a:b7:ef:fa:d0: 35:7d:9a:3e:35:f3:31:9c:e0:29:1d:6a:f1:96:98: 29:6f:c1:bc:2d:9d:a6:8c:2c:00:a7:cb:ae:30:76: ..... ......
Note. In openssl, the generations of multiple organizational-units works fine.
@codysoyland @labria @defer @jdtw Could you please have a look on this PR ?