mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
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>
This commit is contained in:
@@ -206,6 +206,7 @@ class cert_find(MethodOverride):
|
||||
raise errors.MutuallyExclusiveError(
|
||||
reason=_("cannot specify both raw certificate and file"))
|
||||
if 'certificate' not in options and 'file' in options:
|
||||
options['certificate'] = x509.strip_header(options.pop('file'))
|
||||
options['certificate'] = x509.load_unknown_x509_certificate(
|
||||
options.pop('file'))
|
||||
|
||||
return super(cert_find, self).forward(*args, **options)
|
||||
|
||||
@@ -40,7 +40,7 @@ class certmap_match(MethodOverride):
|
||||
raise errors.MutuallyExclusiveError(
|
||||
reason=_("cannot specify both raw certificate and file"))
|
||||
if args:
|
||||
args = [x509.strip_header(args[0])]
|
||||
args = [x509.load_unknown_x509_certificate(args[0])]
|
||||
elif 'certificate' in options:
|
||||
args = [options.pop('certificate')]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user