mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-07-29 15:55:47 -05:00
Remove pkcs10 module contents
This removes pkcs10 module contents and adds a warning message about its future removal. https://pagure.io/freeipa/issue/7131
This commit is contained in:
@@ -153,6 +153,23 @@ def isvalid_base64(data):
|
||||
else:
|
||||
return True
|
||||
|
||||
|
||||
def strip_csr_header(csr):
|
||||
"""
|
||||
Remove the header and footer (and surrounding material) from a CSR.
|
||||
"""
|
||||
headerlen = 40
|
||||
s = csr.find(b"-----BEGIN NEW CERTIFICATE REQUEST-----")
|
||||
if s == -1:
|
||||
headerlen = 36
|
||||
s = csr.find(b"-----BEGIN CERTIFICATE REQUEST-----")
|
||||
if s >= 0:
|
||||
e = csr.find(b"-----END")
|
||||
csr = csr[s + headerlen:e]
|
||||
|
||||
return csr
|
||||
|
||||
|
||||
def validate_ipaddr(ipaddr):
|
||||
"""
|
||||
Check to see if the given IP address is a valid IPv4 or IPv6 address.
|
||||
|
||||
Reference in New Issue
Block a user