OpenSSL Engine Public Key Support - Ask #554
Replies: 4 comments
-
I wrote the x509certificate variable:
|
Beta Was this translation helpful? Give feedback.
-
Hi @matsujirushi thanks for the message. Are you able to use this to help guide you using PKCS11? Copied here is the relevant section: // Example using PKCS#11 OpenSSL ENGINE (https://github.com/OpenSC/libp11)
// The OpenSSL ENGINE must be associated to a pkcs11 module within openssl.cnf.
static const char* opensslEngine = "pkcs11";
static const OPTION_OPENSSL_KEY_TYPE x509_key_from_engine = KEY_TYPE_ENGINE;
// Certificate can be extracted from the PKCS#11 library using pkcs11-tool from OpenSC.
static const char* x509certificate =
"-----BEGIN CERTIFICATE-----\n"
"MIIBMTCB1wIUTu66kxJIBR5t5IkAwh7Lqm/AM+IwCgYIKoZIzj0EAwIwGzEZMBcG\n"
// [...]
"DItkq1MHqzqExB1eTrMHQVY11w62\n"
"-----END CERTIFICATE-----\n";
// The private key contains the PKCS#11 URI.
static const char* x509privatekey = "pkcs11:object=ec-privkey;type=private?pin-value=1234"; |
Beta Was this translation helpful? Give feedback.
-
Hi @danewalton , It working my environment when x509privatekey use pkcs11 and x509certificate is hard-code (NOT use pkcs11).
|
Beta Was this translation helpful? Give feedback.
-
Yes right now we only have support for loading the private key from an engine. Here is the call to make that happen: The equivalent call to TLDR: we don't support that right now. I will move this to a discussion as a feature ask though. |
Beta Was this translation helpful? Give feedback.
-
Using ATECC608A-TNGTLS certificate in iothub_ll_client_x509_sample causes an error.
azure-c-shared-utility/adapters/x509_openssl.c
Line 57 in e4d74dc
However, I can get the certificate chain using p11tool.
I don't know how to find out.
Could you give me some advice?
Beta Was this translation helpful? Give feedback.
All reactions