#[no_mangle]
pub extern "C" fn rustls_crypto_provider_load_key(
    provider: *const rustls_crypto_provider,
    private_key: *const u8,
    private_key_len: size_t,
    signing_key_out: *mut *mut rustls_signing_key,
) -> rustls_result
Expand description

Load a private key from the provided PEM content using the crypto provider.

private_key must point to a buffer of private_key_len bytes, containing a PEM-encoded private key. The exact formats supported will differ based on the crypto provider in use. The default providers support PKCS#1, PKCS#8 or SEC1 formats.

When this function returns rustls_result::Ok a pointer to a rustls_signing_key is written to signing_key_out. The caller owns the returned rustls_signing_key and must free it with rustls_signing_key_free.