> > How can I "convert" a struct (identification_t) to its char array 
> > representation? 
> 
> The identification_t class has a get_encoding() getter method

Forgot to add: get_encoding() returns a raw binary blob of the exchanged
identification payload, having arbitrary bytes. For Distinguished Names,
this is raw ASN.1 DER encoding. The IKE identification type can be
queried using the get_type() method.

To get the human readable string representation of the identity, just
print it to a string buffer.

> char buf[256];
> snprintf(buf, sizeof(buf), "%Y", id);

Regards
Martin

_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to