mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Remove unused function get_subjectaltname from the cert plugin.
Reviewed-By: Petr Viktorin <pviktori@redhat.com>
This commit is contained in:
parent
d5e35f92a5
commit
d8484d1dd6
@ -144,20 +144,6 @@ def get_csr_hostname(csr):
|
|||||||
raise errors.CertificateOperationError(
|
raise errors.CertificateOperationError(
|
||||||
error=_('Failure decoding Certificate Signing Request: %s') % nsprerr)
|
error=_('Failure decoding Certificate Signing Request: %s') % nsprerr)
|
||||||
|
|
||||||
def get_subjectaltname(csr):
|
|
||||||
"""
|
|
||||||
Return the first value of the subject alt name, if any
|
|
||||||
"""
|
|
||||||
try:
|
|
||||||
request = pkcs10.load_certificate_request(csr)
|
|
||||||
for extension in request.extensions:
|
|
||||||
if extension.oid_tag == nss.SEC_OID_X509_SUBJECT_ALT_NAME:
|
|
||||||
return nss.x509_alt_name(extension.value)[0]
|
|
||||||
return None
|
|
||||||
except NSPRError, nsprerr:
|
|
||||||
raise errors.CertificateOperationError(
|
|
||||||
error=_('Failure decoding Certificate Signing Request: %s') % nsprerr)
|
|
||||||
|
|
||||||
def validate_csr(ugettext, csr):
|
def validate_csr(ugettext, csr):
|
||||||
"""
|
"""
|
||||||
Ensure the CSR is base64-encoded and can be decoded by our PKCS#10
|
Ensure the CSR is base64-encoded and can be decoded by our PKCS#10
|
||||||
|
Loading…
Reference in New Issue
Block a user