0001-Strip-OU-from-certificate-names-in-CA-inventory.patch
modules/puppetca/puppetca_main.rb | ||
---|---|---|
172 | 172 |
def parse_inventory(inventory_contents) |
173 | 173 |
to_return = {} |
174 | 174 |
inventory_contents.each_line do |cert| |
175 |
if cert =~ /(0(x|X)(\d|[a-f]|[A-F])+)\s+(\d+\S+)\s+(\d+\S+)\s+\/CN=(\S+)/ # 0x005a 2011-04-16T07:12:46GMT 2016-04-14T07:12:46GMT /CN=uuid |
|
175 |
# 0x005a 2011-04-16T07:12:46GMT 2016-04-14T07:12:46GMT /CN=uuid |
|
176 |
# 0x005c 2017-01-07T11:23:20GMT 2022-01-17T11:23:20GMT /CN=name.mcollective/OU=mcollective |
|
177 |
if cert =~ /(0(x|X)(\d|[a-f]|[A-F])+)\s+(\d+\S+)\s+(\d+\S+)\s+\/CN=([^\s\/]+)/ |
|
176 | 178 |
to_return[$6] = {:serial => $1.to_i(16), :not_before => $4, :not_after => $5} |
177 | 179 |
end |
178 | 180 |
end |
179 |
- |