Skip to content

Commit ad15529

Browse files
committed
Fix scrutiny's unchecked return value
1 parent 16c148a commit ad15529

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tool-openssl/test_util.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ void CreateAndSignX509Certificate(bssl::UniquePtr<X509> &x509,
1313
}
1414

1515
// Set version to X509v3
16-
X509_set_version(x509.get(), X509_VERSION_3);
16+
if (X509_set_version(x509.get(), X509_VERSION_3)) {
17+
fprintf(stderr, "Error setting certificate version\n");
18+
return;
19+
}
1720

1821
// Set validity period for 30 days
1922
if (!X509_gmtime_adj(X509_getm_notBefore(x509.get()), 0) ||

0 commit comments

Comments
 (0)