URL: https://github.com/freeipa/freeipa/pull/436 Title: #436: x509: allow leading text in PEM files
tiran commented: """ NACK The ^ is correct because the regular expression must search for a line that starts with ```-----BEGIN CERTIFICATE-----```. I cannot reproduce the issue locally. The regexp matches a cert with leading text: ``` >>> import re >>> regexp = u"^-----BEGIN CERTIFICATE-----(.*?)-----END CERTIFICATE-----" >>> pem = u"leading line\n-----BEGIN CERTIFICATE-----\nabcd\n-----END >>> CERTIFICATE-----\ntrailing text" >>> re.search(regexp, pem, re.MULTILINE | re.DOTALL) <_sre.SRE_Match object at 0x7f667778d0a8> >>> re.search(regexp, pem, re.MULTILINE | re.DOTALL).group(1) u'\nabcd\n' ``` """ See the full comment at https://github.com/freeipa/freeipa/pull/436#issuecomment-277661149
-- Manage your subscription for the Freeipa-devel mailing list: https://www.redhat.com/mailman/listinfo/freeipa-devel Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code