From ebe467260a356ae3231c9a0a4b75edb28d854261 Mon Sep 17 00:00:00 2001 From: Ruben van Staveren Date: Thu, 10 Sep 2020 17:44:59 +0200 Subject: [PATCH] Also show exponent --- sort_certificate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sort_certificate.py b/sort_certificate.py index d147c8a..db26b60 100755 --- a/sort_certificate.py +++ b/sort_certificate.py @@ -55,7 +55,9 @@ class PkDecoratorRSA(PkDecorator): def __str__(self): pk_crypto = self.pk.to_cryptography_key() - return "RSA Private key %d bits" % pk_crypto.key_size + return "RSA Private key %d bits (exponent %d)" % ( + pk_crypto.key_size, + pk_crypto.private_numbers().public_numbers.e) class PkDecoratorDSA(PkDecorator):