This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ def generate_certificates(cert_dir="certs"):
84
84
# CA END
85
85
86
86
# SERVER BEGIN
87
-
87
+
88
88
# Generate new certificate for domain
89
89
server_key = rsa .generate_private_key (
90
90
public_exponent = 65537 ,
@@ -150,11 +150,13 @@ def generate_certificates(cert_dir="certs"):
150
150
print ("\n To trust these certificates:" )
151
151
print ("\n On macOS:" )
152
152
print (
153
- "sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certs/server.crt"
153
+ "sudo security add-trusted-cert -d -r trustRoot "
154
+ "-k /Library/Keychains/System.keychain certs/server.crt"
154
155
)
155
156
print ("\n On Windows (PowerShell as Admin):" )
156
157
print (
157
- 'Import-Certificate -FilePath "certs\\ server.crt" -CertStoreLocation Cert:\\ LocalMachine\\ Root'
158
+ 'Import-Certificate -FilePath "certs\\ server.crt" '
159
+ '-CertStoreLocation Cert:\\ LocalMachine\\ Root'
158
160
)
159
161
print ("\n On Linux:" )
160
162
print ("sudo cp certs/server.crt /usr/local/share/ca-certificates/proxy-pilot.crt" )
Original file line number Diff line number Diff line change @@ -373,11 +373,13 @@ def generate_certificates(self) -> Tuple[str, str]:
373
373
print ("\n To trust these certificates:" )
374
374
print ("\n On macOS:" )
375
375
print (
376
- "`sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certs/ca.crt"
376
+ "`sudo security add-trusted-cert -d -r trustRoot "
377
+ "-k /Library/Keychains/System.keychain certs/ca.crt"
377
378
)
378
379
print ("\n On Windows (PowerShell as Admin):" )
379
380
print (
380
- 'Import-Certificate -FilePath "certs\\ ca.crt" -CertStoreLocation Cert:\\ LocalMachine\\ Root'
381
+ 'Import-Certificate -FilePath "certs\\ ca.crt" '
382
+ '-CertStoreLocation Cert:\\ LocalMachine\\ Root'
381
383
)
382
384
print ("\n On Linux:" )
383
385
print ("sudo cp certs/ca.crt /usr/local/share/ca-certificates/codegate.crt" )
@@ -433,7 +435,8 @@ def ensure_certificates_exist(self) -> None:
433
435
self .generate_certificates ()
434
436
else :
435
437
logger .debug (
436
- f"Certificates found at: { Config .get_config ().server_cert } and { Config .get_config ().server_key } "
438
+ f"Certificates found at: { Config .get_config ().server_cert } "
439
+ "and {Config.get_config().server_key}"
437
440
)
438
441
439
442
def get_ssl_context (self ) -> ssl .SSLContext :
You can’t perform that action at this time.
0 commit comments