Fix environment password encoding in SignOrchestrator init
All checks were successful
Build image and push it to registry / build (push) Successful in 6m47s
All checks were successful
Build image and push it to registry / build (push) Successful in 6m47s
Previously, the `PKCS12_PASSWORD` environment variable was used directly, which could lead to issues when it was not set. This change ensures the password is properly encoded when provided and defaults to `None` if not set.
This commit is contained in:
parent
39b9f7455c
commit
0e7d01f0fd
@ -26,7 +26,7 @@ TSA_CONFIG_PATH = os.environ.get('TSA_CONFIG_PATH')
|
|||||||
TSA_CERT_CHAIN = os.environ.get('TSA_CERT_CHAIN')
|
TSA_CERT_CHAIN = os.environ.get('TSA_CERT_CHAIN')
|
||||||
TSA_KEY_PASSWORD = os.environ.get('TSA_KEY_PASSWORD')
|
TSA_KEY_PASSWORD = os.environ.get('TSA_KEY_PASSWORD')
|
||||||
|
|
||||||
orchestrator = sign.SignOrchestrator(PKCS12_PATH, TSA_CONFIG_PATH, TSA_KEY_PASSWORD, TSA_CERT_CHAIN, pkcs12_password=os.environ.get('PKCS12_PASSWORD', None))
|
orchestrator = sign.SignOrchestrator(PKCS12_PATH, TSA_CONFIG_PATH, TSA_KEY_PASSWORD, TSA_CERT_CHAIN, pkcs12_password=None if os.environ.get('PKCS12_PASSWORD', None) is None else os.environ.get('PKCS12_PASSWORD').encode())
|
||||||
|
|
||||||
parameters = pika.URLParameters(DSN)
|
parameters = pika.URLParameters(DSN)
|
||||||
connection = pika.BlockingConnection(parameters)
|
connection = pika.BlockingConnection(parameters)
|
||||||
|
Loading…
Reference in New Issue
Block a user