Make GnuTLS parse_pkcs12() return extra certificates from the PKCS#12 too
Create a separate list, return them for the caller to do with as it sees fit.
This also cleans up the error handling a little. When this was a purely
internal GnuTLS function, it was fine to leave things (like *key) allocated
and return an error. If my intention is to make this exportable, then it
ought to clean up after itself when returning an error.
I think this actually fixes a potential memory leak for the GnuTLS internal
caller of this function, too.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>