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
String serverCert, key;
if (path.contains('letsencrypt') || path.contains('/etc/letsencrypt/')) {
// Let's Encrypt сертификаты
serverCert = path + '/fullchain.pem';
key = path + '/privkey.pem';
} else {
// Самоподписанные сертификаты
serverCert = path.startsWith('/')
? path + '/server.crt'
: Platform.script.resolve('$path/server.crt').toFilePath();
key = path.startsWith('/')
? path + '/server.key'
: Platform.script.resolve('$path/server.key').toFilePath();
}
// if (path.contains('letsencrypt') || path.contains('/etc/letsencrypt/')) {
// // Let's Encrypt сертификаты
// // serverCert = path + '/fullchain.pem';
// // key = path + '/privkey.pem';
// } else {
// // // Самоподписанные сертификаты
// // serverCert = path.startsWith('/')
// // ? path + '/server.crt'
// // : Platform.script.resolve('$path/server.crt').toFilePath();
// // key = path.startsWith('/')
// // ? path + '/server.key'
// // : Platform.script.resolve('$path/server.key').toFilePath();
// }
return SecurityContext(withTrustedRoots: false)
..useCertificateChain(serverCert)
..usePrivateKey(key);
return SecurityContext(withTrustedRoots: false);
// ..useCertificateChain(serverCert)
// ..usePrivateKey(key);
}
logger(String tag) => (String msg, bool isError) {