p11test: Report key sizes for missing certificates

This commit is contained in:
Jakub Jelen 2018-12-12 11:16:54 +01:00 committed by Frank Morgner
parent ed6267512c
commit f0b47a51d3
1 changed files with 2 additions and 0 deletions

View File

@ -305,6 +305,7 @@ int callback_public_keys(test_certs_t *objects,
o->type = EVP_PK_RSA;
o->key.rsa = RSA_new();
RSA_set0_key(o->key.rsa, n, e, NULL);
o->bits = RSA_bits(o->key.rsa);
n = NULL;
e = NULL;
}
@ -370,6 +371,7 @@ int callback_public_keys(test_certs_t *objects,
o->key.ec = EC_KEY_new_by_curve_name(nid);
EC_KEY_set_public_key(o->key.ec, ecpoint);
EC_KEY_set_group(o->key.ec, ecgroup);
o->bits = EC_GROUP_order_bits(ecgroup);
}
} else {
debug_print(" [WARN %s ] non-RSA, non-EC key. Key type: %02lX",