@@ -55,23 +55,28 @@ fn generate_pkcs12_truststore(cli_args: GeneratePkcs12) -> Result<(), snafu::Wha
55
55
for certificate in certificates_list {
56
56
let sha256 = certificate. sha256_digest ( ) ?;
57
57
58
+ // Trying to stick to https://opentelemetry.io/docs/specs/semconv/registry/attributes/tls/#tls-attributes
59
+ // Converting `Asn1TimeRef` to a ISO 8601 timestamp really sucks, so we omitted that.
58
60
if let Some ( existing) = certificates. get ( & * sha256) {
59
61
warn ! (
60
62
?source,
61
- sha25 = hex:: encode( sha256) ,
63
+ hash . sha256 = hex:: encode( sha256) . to_uppercase ( ) ,
62
64
existing. not_before = ?existing. not_before( ) ,
63
65
existing. not_after = ?existing. not_after( ) ,
64
66
existing. subject = ?existing. subject_name( ) ,
67
+ existing. issuer = ?existing. issuer_name( ) ,
65
68
existing. serial = ?existing. serial_as_hex( ) ?,
66
69
new. not_before = ?certificate. not_before( ) ,
67
70
new. not_after = ?certificate. not_after( ) ,
68
71
new. subject = ?certificate. subject_name( ) ,
72
+ new. issuer = ?certificate. issuer_name( ) ,
69
73
new. serial = ?existing. serial_as_hex( ) ?,
70
74
"Skipped certificate as a cert with the same SHA256 hash was already added" ,
71
75
) ;
72
76
} else {
73
77
info ! (
74
78
subject = ?certificate. subject_name( ) ,
79
+ issuer = ?certificate. issuer_name( ) ,
75
80
not_before = ?certificate. not_before( ) ,
76
81
not_after = ?certificate. not_after( ) ,
77
82
serial = ?certificate. serial_as_hex( ) ?,
0 commit comments