Revert "ANDROID: extract-cert: omit PKCS#11 support if building against BoringSSL"

This reverts commit 2841a4316e.
Collides with upstream.

Bug: 135570712
Bug: 367265496
Change-Id: Iab95b8bed100af3baad5c9949725d27f6faba4f7
Signed-off-by: Matthias Maennich <maennich@google.com>
This commit is contained in:
Matthias Maennich
2024-10-01 00:40:22 +00:00
parent 1cceb16709
commit 6847597631
-7
View File
@@ -56,7 +56,6 @@ static void display_openssl_errors(int l)
}
}
#ifndef OPENSSL_IS_BORINGSSL
static void drain_openssl_errors(void)
{
const char *file;
@@ -66,7 +65,6 @@ static void drain_openssl_errors(void)
return;
while (ERR_get_error_line(&file, &line)) {}
}
#endif
#define ERR(cond, fmt, ...) \
do { \
@@ -124,10 +122,6 @@ int main(int argc, char **argv)
fclose(f);
exit(0);
} else if (!strncmp(cert_src, "pkcs11:", 7)) {
#ifdef OPENSSL_IS_BORINGSSL
ERR(1, "BoringSSL does not support extracting from PKCS#11");
exit(1);
#else
ENGINE *e;
struct {
const char *cert_id;
@@ -150,7 +144,6 @@ int main(int argc, char **argv)
ENGINE_ctrl_cmd(e, "LOAD_CERT_CTRL", 0, &parms, NULL, 1);
ERR(!parms.cert, "Get X.509 from PKCS#11");
write_cert(parms.cert);
#endif
} else {
BIO *b;
X509 *x509;