From 9304880e8a680294fa37cc48d9910fb501763d7e Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 5 Dec 2011 14:38:06 +0000 Subject: [PATCH] - Fixed correct printing of serial number '00' --- library/x509parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/x509parse.c b/library/x509parse.c index d49b6435c..d7da8c46e 100644 --- a/library/x509parse.c +++ b/library/x509parse.c @@ -2426,7 +2426,7 @@ int x509parse_serial_gets( char *buf, size_t size, const x509_buf *serial ) for( i = 0; i < nr; i++ ) { - if( i == 0 && serial->p[i] == 0x0 ) + if( i == 0 && nr > 1 && serial->p[i] == 0x0 ) continue; ret = snprintf( p, n, "%02X%s",