2
0

PKCS12_decrypt_skey.pod 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. =pod
  2. =head1 NAME
  3. PKCS12_decrypt_skey, PKCS12_decrypt_skey_ex - PKCS12 shrouded keyBag
  4. decrypt functions
  5. =head1 SYNOPSIS
  6. #include <openssl/pkcs12.h>
  7. PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag,
  8. const char *pass, int passlen);
  9. PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey_ex(const PKCS12_SAFEBAG *bag,
  10. const char *pass, int passlen,
  11. OSSL_LIB_CTX *ctx,
  12. const char *propq);
  13. =head1 DESCRIPTION
  14. PKCS12_decrypt_skey() Decrypt the PKCS#8 shrouded keybag contained within I<bag>
  15. using the supplied password I<pass> of length I<passlen>.
  16. PKCS12_decrypt_skey_ex() is similar to the above but allows for a library context
  17. I<ctx> and property query I<propq> to be used to select algorithm implementations.
  18. =head1 RETURN VALUES
  19. Both functions will return the decrypted key or NULL if an error occurred.
  20. =head1 CONFORMING TO
  21. IETF RFC 7292 (L<https://tools.ietf.org/html/rfc7292>)
  22. =head1 SEE ALSO
  23. L<PKCS8_decrypt_ex(3)>,
  24. L<PKCS8_encrypt_ex(3)>,
  25. L<PKCS12_add_key_ex(3)>,
  26. L<PKCS12_SAFEBAG_create_pkcs8_encrypt_ex(3)>
  27. =head1 HISTORY
  28. PKCS12_decrypt_skey_ex() was added in OpenSSL 3.0.
  29. =head1 COPYRIGHT
  30. Copyright 2021-2022 The OpenSSL Project Authors. All Rights Reserved.
  31. Licensed under the Apache License 2.0 (the "License"). You may not use
  32. this file except in compliance with the License. You can obtain a copy
  33. in the file LICENSE in the source distribution or at
  34. L<https://www.openssl.org/source/license.html>.
  35. =cut