libressl/portable

Why was X509V3_EXT_cleanup() removed?

orbea opened this issue · 4 comments

OS: Gentoo
libressl: 3.9.1
libimobiledevice: 1.3.0

When building libimobiledevice with LibreSSL it fails with an implicit declaration for X509V3_EXT_cleanup() which appears available in LibreSSL 3.8 or older, but not in 3.9. However the ChangeLog doesn't mention it at all, why was it removed?

Should libimobiledevice be using it at all?

A simple workaround seems to be:

--- a/common/userpref.c
+++ b/common/userpref.c
@@ -627,7 +627,9 @@ userpref_error_t pair_record_generate_keys_and_certs(plist_t pair_record, key_da
 		}
 	}
 
+#ifndef LIBRESSL_VERSION_NUMBER
 	X509V3_EXT_cleanup();
+#endif
 	X509_free(dev_cert);
 
 	EVP_PKEY_free(pubkey);

Thanks for helpful replies! I will try submitting a patch to upstream libimobiledevice soon.

I made a PR for libimobiledevice. libimobiledevice/libimobiledevice#1561