From 41afa4909d1b194732795bc09ae5a5588bc57a5f Mon Sep 17 00:00:00 2001
From: Moe Jette <jette1@llnl.gov>
Date: Fri, 7 Nov 2008 18:59:15 +0000
Subject: [PATCH] Print error message if crypto sign or verify fails for
 greater clarity

---
 src/common/slurm_cred.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c
index 4188290b79e..5e806c59ed9 100644
--- a/src/common/slurm_cred.c
+++ b/src/common/slurm_cred.c
@@ -1465,8 +1465,11 @@ _slurm_cred_sign(slurm_cred_ctx_t ctx, slurm_cred_t cred)
 			&cred->signature, &cred->siglen);
 	free_buf(buffer);
 
-	if (rc)
+	if (rc) {
+		error("Credential sign: %s", 
+		      (*(g_crypto_context->ops.crypto_str_error))());
 		return SLURM_ERROR;
+	}
 	return SLURM_SUCCESS;
 }
 
@@ -1491,8 +1494,8 @@ _slurm_cred_verify_signature(slurm_cred_ctx_t ctx, slurm_cred_t cred)
 	free_buf(buffer);
 
 	if (rc) {
-		info("Credential signature check: %s", 
-			(*(g_crypto_context->ops.crypto_str_error))());
+		error("Credential signature check: %s", 
+		      (*(g_crypto_context->ops.crypto_str_error))());
 		return SLURM_ERROR;
 	}
 	return SLURM_SUCCESS;
-- 
GitLab