52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
|
From 9e4497d1dd2a337be1f69e0cfb24ce8080690ccf Mon Sep 17 00:00:00 2001
|
||
|
From: Stephen Gallagher <sgallagh@redhat.com>
|
||
|
Date: Wed, 28 Nov 2018 09:16:29 -0500
|
||
|
Subject: [PATCH 4/6] Properly check all return values
|
||
|
|
||
|
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
|
||
|
---
|
||
|
src/authority.c | 1 +
|
||
|
src/service.c | 1 +
|
||
|
src/x509.c | 1 +
|
||
|
3 files changed, 3 insertions(+)
|
||
|
|
||
|
diff --git a/src/authority.c b/src/authority.c
|
||
|
index b735868416b7fb5d016f0854baf0f27cd5f98b26..4e0dccc6c1210beffb38acd9f7dfb6108ca4a4ad 100644
|
||
|
--- a/src/authority.c
|
||
|
+++ b/src/authority.c
|
||
|
@@ -180,6 +180,7 @@ create_private_CA (TALLOC_CTX *mem_ctx,
|
||
|
|
||
|
/* Finalize the CSR */
|
||
|
ret = sscg_x509v3_csr_finalize (ca_certinfo, pkey, csr);
|
||
|
+ CHECK_OK (ret);
|
||
|
|
||
|
if (options->verbosity >= SSCG_DEBUG)
|
||
|
{
|
||
|
diff --git a/src/service.c b/src/service.c
|
||
|
index b292e94063f032fd3c34a8134702063ea46bfa0c..34c976dbe905528000b181c24d1fa95da3cd1377 100644
|
||
|
--- a/src/service.c
|
||
|
+++ b/src/service.c
|
||
|
@@ -126,6 +126,7 @@ create_service_cert (TALLOC_CTX *mem_ctx,
|
||
|
|
||
|
/* Finalize the CSR */
|
||
|
ret = sscg_x509v3_csr_finalize (svc_certinfo, pkey, csr);
|
||
|
+ CHECK_OK (ret);
|
||
|
|
||
|
if (options->verbosity >= SSCG_DEBUG)
|
||
|
{
|
||
|
diff --git a/src/x509.c b/src/x509.c
|
||
|
index 6d152fc969d745cc5cf085116c8688866f9d6ab4..18f0627bc64e7cb503a9e81c36dbe726186d1144 100644
|
||
|
--- a/src/x509.c
|
||
|
+++ b/src/x509.c
|
||
|
@@ -41,6 +41,7 @@ sscg_generate_serial (TALLOC_CTX *mem_ctx, struct sscg_bignum **serial)
|
||
|
}
|
||
|
|
||
|
ret = sscg_init_bignum (tmp_ctx, 0, &bn);
|
||
|
+ CHECK_OK (ret);
|
||
|
|
||
|
/* We'll create a random number of sizeof(unsigned long) - 1 bits
|
||
|
to use as the serial. We use unsigned long to ensure that it
|
||
|
--
|
||
|
2.23.0
|
||
|
|