Forum Discussion
Uploading SKCS 12 File to F5 Device
- Oct 17, 2024
to update device certs ---> Changing the BIG-IP system device certificate using the Configuration utility (f5.com)
if updating the certificate system bundle :
make sure you make a backup as any corruption on this file can impact system communications
vi /config/ssl/ssl.crt/ca-bundle.crt
chunk_size = 512 * 1024 # 512 KB chunk size for uploading
def upload_file(file_data, file_name):
total_size = len(file_data)
url = f'https://{f5_ip}/mgmt/shared/file-transfer/uploads/{file_name}'
start = 0
response = None
while start < total_size:
end = min(start + chunk_size, total_size)
file_slice = file_data[start:end]
content_range = f"{start}-{end - 1}/{total_size}"
print("Content Range: ", content_range)
upload_headers['Content-Range'] = content_range
response = requests.post(url, headers=upload_headers, data=file_slice, verify=False)
if response.status_code != 200:
print(f"Error during upload: {response.text}")
break
start = end
print("Response: ", response.text)
this is currently what I have been using, should I change it? I wanted it to be able to upload any type of file
Also, once uploaded, how would I upload the PKCS 12 file to the devices cert list?
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com