Initialize structure to NULL to retrieve pubkey
Don't release passed parameter, owned by the caller
Added test for generation of pairing material