jose: Add Makefile for v10

Jose is acommand line utility for performing various tasks on JSON
Object Signing and Encryption (JOSE) objects. José provides a full
crypto stack including key generation, signing and encryption.
Added: https://github.com/latchset/jose/commit/198f7207427ad7f569aa3592ea16e2bb400db040

Signed-off-by: Tibor Dudlák <tibor.dudlak@gmail.com>
This commit is contained in:
Tibor Dudlák
2017-05-07 02:12:06 +02:00
committed by Tibor Dudlák
parent 044f27c9f9
commit 589e39bef2
2 changed files with 107 additions and 0 deletions
@@ -0,0 +1,33 @@
From 198f7207427ad7f569aa3592ea16e2bb400db040 Mon Sep 17 00:00:00 2001
From: Nathaniel McCallum <npmccallum@redhat.com>
Date: Fri, 29 Sep 2017 14:49:57 -0400
Subject: [PATCH] Fix minor FILE* leak
---
cmd/jwe/pwd.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/cmd/jwe/pwd.h b/cmd/jwe/pwd.h
index 0b5be54..2f021eb 100644
--- a/cmd/jwe/pwd.h
+++ b/cmd/jwe/pwd.h
@@ -57,8 +57,10 @@ jwe_getpass(const char *prompt)
nf.c_lflag &= ~ECHO;
nf.c_lflag |= ECHONL;
- if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0)
+ if (tcsetattr(fileno(tty), TCSANOW, &nf) != 0) {
+ fclose(tty);
return NULL;
+ }
fprintf(tty, "%s", prompt);
@@ -72,6 +74,7 @@ jwe_getpass(const char *prompt)
}
tcsetattr(fileno(tty), TCSANOW, &of);
+ fclose(tty);
return pwd;
}
#endif