diff options
author | Stanislav Laznicka <slaznick@redhat.com> | 2017-09-25 09:54:53 +0200 |
---|---|---|
committer | Stanislav Laznicka <slaznick@redhat.com> | 2017-11-01 07:55:04 +0100 |
commit | c9265a7b0528b7f2495bf15e79cd9dd96af578aa (patch) | |
tree | fe9dcd4de8bee90ad88bc979af8a8264ec491c19 /ipalib | |
parent | d65297311d91b067b63623d86968b88303b98fc9 (diff) | |
download | freeipa-c9265a7b0528b7f2495bf15e79cd9dd96af578aa.tar.gz freeipa-c9265a7b0528b7f2495bf15e79cd9dd96af578aa.tar.xz freeipa-c9265a7b0528b7f2495bf15e79cd9dd96af578aa.zip |
x509: remove the strip_header() function
We don't need the strip_header() function, to load an unknown
x509 certificate, load_unknown_x509_certificate() should be used.
Reviewed-By: Tibor Dudlak <tdudlak@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/x509.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/ipalib/x509.py b/ipalib/x509.py index 205e2f82d..8efba37d3 100644 --- a/ipalib/x509.py +++ b/ipalib/x509.py @@ -88,21 +88,6 @@ def subject_base(): return _subject_base -def strip_header(pem): - """ - Remove the header and footer from a certificate. - """ - regexp = ( - u"^-----BEGIN CERTIFICATE-----(.*?)-----END CERTIFICATE-----" - ) - if isinstance(pem, bytes): - regexp = regexp.encode('ascii') - s = re.search(regexp, pem, re.MULTILINE | re.DOTALL) - if s is not None: - return s.group(1) - else: - return pem - @crypto_utils.register_interface(crypto_x509.Certificate) class IPACertificate(object): |