Skip to content

Commit efbd8d1

Browse files
committed
fix(supermicro-ipmi-cert): include full certificate chain in upload
The Redfish upload was stripping the intermediate certificate from the chain, causing browsers to show "Not Secure" since they couldn't verify the trust chain back to the root CA.
1 parent 11099c8 commit efbd8d1

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

apps/supermicro-ipmi-cert/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.1.0
1+
0.2.0

apps/supermicro-ipmi-cert/supermicro_ipmi_cert.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,12 @@ def upload_cert(self, key_file, cert_file, token):
141141
+ b"\n"
142142
)
143143

144-
# For Redfish, only send the server certificate, not the full chain
145-
substr = b"-----END CERTIFICATE-----\n"
146-
cert_only = cert_data.split(substr)[0] + substr
147-
148-
print(f"DEBUG: Certificate data length: {len(cert_data)} bytes")
149-
print(f"DEBUG: Server cert only length: {len(cert_only)} bytes")
144+
print(f"DEBUG: Certificate chain length: {len(cert_data)} bytes")
150145
print(f"DEBUG: Key data length: {len(key_data)} bytes")
151146

152147
# Use dict format for multipart file upload
153148
files_to_upload = {
154-
"cert_file": ("cert.pem", cert_only, "application/octet-stream"),
149+
"cert_file": ("cert.pem", cert_data, "application/octet-stream"),
155150
"key_file": ("key.pem", key_data, "application/octet-stream"),
156151
}
157152

0 commit comments

Comments
 (0)