no certs
Some checks are pending
Backend CI / test (push) Waiting to run
Backend CI / build (push) Blocked by required conditions
Deploy Mnemo Cards / Deploy Backend (push) Waiting to run
Deploy Mnemo Cards / Deploy Web App (push) Blocked by required conditions
Deploy Mnemo Cards / Final Verification (push) Blocked by required conditions

This commit is contained in:
Dmitry 2025-12-11 21:51:44 +03:00
parent 387fff9798
commit 75048f4f33

View file

@ -235,23 +235,23 @@ class MnemoShelf {
// Для самоподписанных сертификатов используем server.crt и server.key // Для самоподписанных сертификатов используем server.crt и server.key
String serverCert, key; String serverCert, key;
if (path.contains('letsencrypt') || path.contains('/etc/letsencrypt/')) { // if (path.contains('letsencrypt') || path.contains('/etc/letsencrypt/')) {
// Let's Encrypt сертификаты // // Let's Encrypt сертификаты
serverCert = path + '/fullchain.pem'; // // serverCert = path + '/fullchain.pem';
key = path + '/privkey.pem'; // // key = path + '/privkey.pem';
} else { // } else {
// Самоподписанные сертификаты // // // Самоподписанные сертификаты
serverCert = path.startsWith('/') // // serverCert = path.startsWith('/')
? path + '/server.crt' // // ? path + '/server.crt'
: Platform.script.resolve('$path/server.crt').toFilePath(); // // : Platform.script.resolve('$path/server.crt').toFilePath();
key = path.startsWith('/') // // key = path.startsWith('/')
? path + '/server.key' // // ? path + '/server.key'
: Platform.script.resolve('$path/server.key').toFilePath(); // // : Platform.script.resolve('$path/server.key').toFilePath();
} // }
return SecurityContext(withTrustedRoots: false) return SecurityContext(withTrustedRoots: false);
..useCertificateChain(serverCert) // ..useCertificateChain(serverCert)
..usePrivateKey(key); // ..usePrivateKey(key);
} }
logger(String tag) => (String msg, bool isError) { logger(String tag) => (String msg, bool isError) {