summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Ching-Pang Lin <glin@suse.com>2012-09-20 15:54:57 +0800
committerGary Ching-Pang Lin <glin@suse.com>2012-09-20 15:54:57 +0800
commitcaf006b44f197d02e33f1aeb9d5cd059e497a4cc (patch)
treea73159e11630362c171ddc711eb79641ff1d0e6d
parentff8d867c68ce8ed2050ed18f6999dc26d7d8bf15 (diff)
downloadefi-boot-shim-caf006b44f197d02e33f1aeb9d5cd059e497a4cc.tar.gz
efi-boot-shim-caf006b44f197d02e33f1aeb9d5cd059e497a4cc.zip
Make sure the time string is set
-rw-r--r--MokManager.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/MokManager.c b/MokManager.c
index 7bc45e96..46384fc2 100644
--- a/MokManager.c
+++ b/MokManager.c
@@ -246,11 +246,13 @@ static void print_x509_time (ASN1_TIME *time, CHAR16 *name)
{
CHAR16 time_string[30];
- if(time->type == V_ASN1_UTCTIME)
+ if (time->type == V_ASN1_UTCTIME) {
print_x509_UTCTIME_time(time, time_string);
-
- if(time->type == V_ASN1_GENERALIZEDTIME)
+ } else if (time->type == V_ASN1_GENERALIZEDTIME) {
print_x509_GENERALIZEDTIME_time(time, time_string);
+ } else {
+ time_string[0] = '\0';
+ }
Print(L" %s:\n %s\n", name, time_string);
}