Set X509 public key in 1.0.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have an X509_PUBKEY structure holding the algorithm and public key.
I want to set it in the X509 structure.

In 1.1.1 and up, I can use

	evpPubkey = X509_PUBKEY_get0(addToCert->key); 	/* X509_PUBKEY */
	X509_set_pubkey(x509Certificate, evpPubkey);

However, 1.0.2 doesn't have these.

What's a good approach?

I could access the X509.cert_info.key and set the
value, but I expect that would cause a double free later
when I free both the X509 and the structure holding the
X509_PUBKEY.

Is the something like a X509_PUBKEY_dup function?

(Yes, I know that 1.0.2 is obsolete, but there are some LTS
distros, and I'd rather not drop support for 1.0.2 if I can
figure this out.)





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux