1*b077aed3SPierre Pronchery=pod 2*b077aed3SPierre Pronchery 3*b077aed3SPierre Pronchery=head1 NAME 4*b077aed3SPierre Pronchery 5*b077aed3SPierre ProncheryPKCS12_decrypt_skey, PKCS12_decrypt_skey_ex - PKCS12 shrouded keyBag 6*b077aed3SPierre Proncherydecrypt functions 7*b077aed3SPierre Pronchery 8*b077aed3SPierre Pronchery=head1 SYNOPSIS 9*b077aed3SPierre Pronchery 10*b077aed3SPierre Pronchery #include <openssl/pkcs12.h> 11*b077aed3SPierre Pronchery 12*b077aed3SPierre Pronchery PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag, 13*b077aed3SPierre Pronchery const char *pass, int passlen); 14*b077aed3SPierre Pronchery PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey_ex(const PKCS12_SAFEBAG *bag, 15*b077aed3SPierre Pronchery const char *pass, int passlen, 16*b077aed3SPierre Pronchery OSSL_LIB_CTX *ctx, 17*b077aed3SPierre Pronchery const char *propq); 18*b077aed3SPierre Pronchery 19*b077aed3SPierre Pronchery=head1 DESCRIPTION 20*b077aed3SPierre Pronchery 21*b077aed3SPierre ProncheryPKCS12_decrypt_skey() Decrypt the PKCS#8 shrouded keybag contained within I<bag> 22*b077aed3SPierre Proncheryusing the supplied password I<pass> of length I<passlen>. 23*b077aed3SPierre Pronchery 24*b077aed3SPierre ProncheryPKCS12_decrypt_skey_ex() is similar to the above but allows for a library contex 25*b077aed3SPierre ProncheryI<ctx> and property query I<propq> to be used to select algorithm implementations. 26*b077aed3SPierre Pronchery 27*b077aed3SPierre Pronchery=head1 RETURN VALUES 28*b077aed3SPierre Pronchery 29*b077aed3SPierre ProncheryBoth functions will return the decrypted key or NULL if an error occurred. 30*b077aed3SPierre Pronchery 31*b077aed3SPierre Pronchery=head1 CONFORMING TO 32*b077aed3SPierre Pronchery 33*b077aed3SPierre ProncheryIETF RFC 7292 (L<https://tools.ietf.org/html/rfc7292>) 34*b077aed3SPierre Pronchery 35*b077aed3SPierre Pronchery=head1 SEE ALSO 36*b077aed3SPierre Pronchery 37*b077aed3SPierre ProncheryL<PKCS8_decrypt_ex(3)>, 38*b077aed3SPierre ProncheryL<PKCS8_encrypt_ex(3)>, 39*b077aed3SPierre ProncheryL<PKCS12_add_key_ex(3)>, 40*b077aed3SPierre ProncheryL<PKCS12_SAFEBAG_create_pkcs8_encrypt_ex(3)> 41*b077aed3SPierre Pronchery 42*b077aed3SPierre Pronchery=head1 HISTORY 43*b077aed3SPierre Pronchery 44*b077aed3SPierre ProncheryPKCS12_decrypt_skey_ex() was added in OpenSSL 3.0. 45*b077aed3SPierre Pronchery 46*b077aed3SPierre Pronchery=head1 COPYRIGHT 47*b077aed3SPierre Pronchery 48*b077aed3SPierre ProncheryCopyright 2021 The OpenSSL Project Authors. All Rights Reserved. 49*b077aed3SPierre Pronchery 50*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License"). You may not use 51*b077aed3SPierre Proncherythis file except in compliance with the License. You can obtain a copy 52*b077aed3SPierre Proncheryin the file LICENSE in the source distribution or at 53*b077aed3SPierre ProncheryL<https://www.openssl.org/source/license.html>. 54*b077aed3SPierre Pronchery 55*b077aed3SPierre Pronchery=cut 56