1gnutls_pkcs12_bag_enc_info(3) gnutls gnutls_pkcs12_bag_enc_info(3)
2
3
4
6 gnutls_pkcs12_bag_enc_info - API function
7
9 #include <gnutls/pkcs12.h>
10
11 int gnutls_pkcs12_bag_enc_info(gnutls_pkcs12_bag_t bag, unsigned int *
12 schema, unsigned int * cipher, void * salt, unsigned int * salt_size,
13 unsigned int * iter_count, char ** oid);
14
16 gnutls_pkcs12_bag_t bag
17 The bag
18
19 unsigned int * schema
20 indicate the schema as one of gnutls_pkcs_encrypt_flags_t
21
22 unsigned int * cipher
23 the cipher used as gnutls_cipher_algorithm_t
24
25 void * salt PBKDF2 salt (if non-NULL then salt_size initially holds
26 its size)
27
28 unsigned int * salt_size
29 PBKDF2 salt size
30
31 unsigned int * iter_count
32 PBKDF2 iteration count
33
34 char ** oid if non-NULL it will contain an allocated null-terminated
35 variable with the OID
36
38 This function will provide information on the encryption algorithms
39 used in an encrypted bag. If the structure algorithms are unknown the
40 code GNUTLS_E_UNKNOWN_CIPHER_TYPE will be returned, and only oid ,
41 will be set. That is, oid will be set on encrypted bags whether sup‐
42 ported or not. It must be deinitialized using gnutls_free(). The other
43 variables are only set on supported structures.
44
46 GNUTLS_E_INVALID_REQUEST if the provided bag isn't encrypted,
47 GNUTLS_E_UNKNOWN_CIPHER_TYPE if the structure's encryption isn't sup‐
48 ported, or another negative error code in case of a failure. Zero on
49 success.
50
52 Report bugs to <bugs@gnutls.org>.
53 Home page: https://www.gnutls.org
54
55
57 Copyright © 2001- Free Software Foundation, Inc., and others.
58 Copying and distribution of this file, with or without modification,
59 are permitted in any medium without royalty provided the copyright no‐
60 tice and this notice are preserved.
61
63 The full documentation for gnutls is maintained as a Texinfo manual.
64 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
65 visit
66
67 https://www.gnutls.org/manual/
68
69gnutls 3.7.2 gnutls_pkcs12_bag_enc_info(3)