EVP_PKEY_add1_attr_by_NID is removed and won't be coming back:
https://github.com/openbsd/src/commit/05034cf3497dd09a4fdbdecb13152ebab1c2bed4

Index: lib/pki_pkcs12.cpp
--- lib/pki_pkcs12.cpp.orig
+++ lib/pki_pkcs12.cpp
@@ -159,6 +159,7 @@ void pki_pkcs12::writePKCS12(XFile &file, encAlgo &enc
 		keyAlgoNid = NID_pbe_WithSHA1And3_Key_TripleDES_CBC;
 
 	EVP_PKEY *pkey = key->decryptKey();
+#ifndef LIBRESSL_VERSION_NUMBER
 	for (const QString &line : key->getComment().split('\n')) {
 		QStringList kv = line.split(":");
 		qDebug() << line << kv;
@@ -168,6 +169,7 @@ void pki_pkcs12::writePKCS12(XFile &file, encAlgo &enc
 		EVP_PKEY_add1_attr_by_NID(pkey, NID_ms_csp_name,
 			MBSTRING_ASC, (const unsigned char*)csp.constData(), csp.size());
 	}
+#endif
 
 	pkcs12 = PKCS12_create(pass.data(), getIntName().toUtf8().data(),
 				pkey, cert->getCert(), certstack,
