Hi all,
Am using load tester plugin. I need to check the end entity certificate
contents (on demand certificate). So need the on demand certificate in .pem
format. I tried adding the below code to the load_tester_creds.c file
before destroy, but it is dumping the Issuer certificate in pem format. Can
someone plz tell how to get the on demand certificate in pem format ??
src/libcharon/plugins/load_tester/load_tester_creds.c
<----------------------------->
<----------------------------->
<----------------------------->
<----------------------------->
METHOD(credential_set_t, create_cert_enumerator, enumerator_t*,
private_load_tester_creds_t *this, certificate_type_t cert,
key_type_t key,
identification_t *id, bool trusted)
{
chunk_t test_enc;
char *ChunkDumpPath="/usr/local/etc/NodeCertChunkDumping.pem";
<----------------------------->
<----------------------------->
<----------------------------->
<----------------------------->
// Before peer_key->destroy(peer_key); i added the below 3 lines.
this->ca->get_encoding(this->ca, CERT_PEM, &test_enc);
chunk_write(test_enc, ChunkDumpPath, "pem", 022, TRUE);
chunk_free(&test_enc);
Regards,
Naren
_______________________________________________
Users mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/users