]> www.wagner.pp.ru Git - openssl-gost/engine.git/commit
Fix false positive static analysis issue
authorSergei Ianovich <sergei.ianovich@ya.ru>
Tue, 30 Jul 2024 14:33:18 +0000 (14:33 +0000)
committerSergei Ianovich <sergei.ianovich@ya.ru>
Tue, 30 Jul 2024 14:33:18 +0000 (14:33 +0000)
commit5cf4af80f03f7be62a34310a31de60852a0c1b2c
tree34b9412ea93045aaf3eb0a6e25586f787b7d76bd
parentede3886cc5507c2ba000ab9b057f198da03e8766
Fix false positive static analysis issue

Infer complains:
```
test_tls.c:172: error: Uninitialized Value
  `_.cert` is read without initialization.
  170.
  171.     T(sctx = SSL_CTX_new(TLS_server_method()));
  172.     T(SSL_CTX_use_certificate(sctx, ck.cert));
           ^
  173.     T(SSL_CTX_use_PrivateKey(sctx, ck.pkey));
  174.     T(SSL_CTX_check_private_key(sctx));

test_tls.c:173: error: Uninitialized Value
  `_.pkey` is read without initialization.
  171.     T(sctx = SSL_CTX_new(TLS_server_method()));
  172.     T(SSL_CTX_use_certificate(sctx, ck.cert));
  173.     T(SSL_CTX_use_PrivateKey(sctx, ck.pkey));
           ^
  174.     T(SSL_CTX_check_private_key(sctx));
  175.
```

Altough the complain is false positive, fixing it will allow for future
use of the tools in automated tests.
test_tls.c