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