Please ignore the previous patch and consider this one. There's a typo in the previous one.
diff -Nur puppet-2.7.18.orig/lib/puppet/ssl/certificate.rb puppet-2.7.18/lib/puppet/ssl/certificate.rb --- puppet-2.7.18.orig/lib/puppet/ssl/certificate.rb 2012-07-09 23:08:16.000000000 +0100 +++ puppet-2.7.18/lib/puppet/ssl/certificate.rb 2013-04-16 02:12:59.369573970 +0100 @@ -15,7 +15,7 @@ # Convert a string into an instance. def self.from_s(string) instance = wrapped_class.new(string) - name = instance.subject.to_s.sub(/\/CN=/i, '').downcase + name = instance.subject.to_s.sub(/.*\/CN=([^\/]*)($|\/.*)/i, '\1').downcase result = new(name) result.content = instance result