mirror of
https://git.collinwebdesigns.de/oscar.krause/fastapi-dls.git
synced 2025-08-28 15:36:59 +08:00
Compare commits
2 Commits
04914740a4
...
295e3c9482
Author | SHA1 | Date | |
---|---|---|---|
|
295e3c9482 | ||
|
3961acf231 |
11
app/main.py
11
app/main.py
@ -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('ascii').strip(), media_type='text/plain')
|
||||
return Response(content=my_root_certificate.pem().decode('utf-8').strip(), media_type='text/plain')
|
||||
|
||||
|
||||
@app.get('/-/readme', summary='* Readme')
|
||||
@ -473,7 +473,9 @@ 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().replace('\n', '\r\n') # 76 chars per line on original response
|
||||
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()
|
||||
response_ca_chain = response_ca_chain.replace('-----BEGIN CERTIFICATE-----', '')
|
||||
@ -483,7 +485,9 @@ 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().replace('\n', '\r\n') # 76 chars per line on original response
|
||||
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()
|
||||
response_si_certificate = response_si_certificate.replace('-----BEGIN CERTIFICATE-----', '')
|
||||
@ -491,7 +495,6 @@ 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 = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user