Compare commits

..

No commits in common. "295e3c94821e2728aad4637e080cd034ed406371" and "04914740a4f575d5c8bf996726fc715c54345048" have entirely different histories.

View File

@ -157,7 +157,7 @@ async def _config():
@app.get('/-/config/root-certificate', summary='* Root Certificate', description='returns Root--Certificate needed for patching nvidia-gridd')
async def _config():
return Response(content=my_root_certificate.pem().decode('utf-8').strip(), media_type='text/plain')
return Response(content=my_root_certificate.pem().decode('ascii').strip(), media_type='text/plain')
@app.get('/-/readme', summary='* Readme')
@ -473,9 +473,7 @@ async def leasing_v1_config_token(request: Request):
my_jwt_encode_key = jwk.construct(my_si_private_key.pem().decode('utf-8'), algorithm=ALGORITHMS.RS256)
config_token = jws.sign(payload, key=my_jwt_encode_key, headers=None, algorithm=ALGORITHMS.RS256)
response_ca_chain = my_ca_certificate.pem().decode('utf-8').strip()
# 76 chars per line on original response with "\r\n"
response_ca_chain = my_ca_certificate.pem().decode('utf-8').strip().replace('\n', '\r\n') # 76 chars per line on original response
"""
response_ca_chain = my_ca_certificate.pem().decode('utf-8').strip()
response_ca_chain = response_ca_chain.replace('-----BEGIN CERTIFICATE-----', '')
@ -485,9 +483,7 @@ async def leasing_v1_config_token(request: Request):
response_ca_chain = '\r\n'.join(response_ca_chain)
response_ca_chain = f'-----BEGIN CERTIFICATE-----\r\n{response_ca_chain}\r\n-----END CERTIFICATE-----'
"""
response_si_certificate = my_si_certificate.pem().decode('utf-8').strip()
# 76 chars per line on original response with "\r\n"
response_si_certificate = my_si_certificate.pem().decode('utf-8').strip().replace('\n', '\r\n') # 76 chars per line on original response
"""
response_si_certificate = my_si_certificate.pem().decode('utf-8').strip()
response_si_certificate = response_si_certificate.replace('-----BEGIN CERTIFICATE-----', '')
@ -495,6 +491,7 @@ async def leasing_v1_config_token(request: Request):
response_si_certificate = response_si_certificate.replace('\n', '')
response_si_certificate = wrap(response_si_certificate, 76)
response_si_certificate = '\r\n'.join(response_si_certificate)
response_si_certificate = f'-----BEGIN CERTIFICATE-----\r\n{response_si_certificate}\r\n-----END CERTIFICATE-----'
"""
response = {