summaryrefslogtreecommitdiff
path: root/lib/x509/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/x509/output.c')
-rw-r--r--lib/x509/output.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/x509/output.c b/lib/x509/output.c
index eeeb6e999b..09b119b1ff 100644
--- a/lib/x509/output.c
+++ b/lib/x509/output.c
@@ -1830,6 +1830,19 @@ static void print_oneline(gnutls_buffer_st * str, gnutls_x509_crt_t cert)
}
}
+ {
+ char serial[128];
+ size_t serial_size = sizeof(serial);
+
+ err =
+ gnutls_x509_crt_get_serial(cert, serial, &serial_size);
+ if (err >= 0) {
+ adds(str, "serial 0x");
+ _gnutls_buffer_hexprint(str, serial, serial_size);
+ adds(str, ", ");
+ }
+ }
+
/* Key algorithm and size. */
{
unsigned int bits;