| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
@deftypefun {int} {gnutls_pkcs7_import} (gnutls_pkcs7_t @var{pkcs7}, const gnutls_datum_t * @var{data}, gnutls_x509_crt_fmt_t @var{format}) |
| 6 |
@var{pkcs7}: The data to store the parsed PKCS7. |
| 7 |
|
| 8 |
@var{data}: The DER or PEM encoded PKCS7. |
| 9 |
|
| 10 |
@var{format}: One of DER or PEM |
| 11 |
|
| 12 |
This function will convert the given DER or PEM encoded PKCS7 to |
| 13 |
the native @code{gnutls_pkcs7_t} format. The output will be stored in |
| 14 |
@code{pkcs7} . Any signed data that may be present inside the @code{pkcs7} structure, like certificates set by @code{gnutls_pkcs7_set_crt()} , will |
| 15 |
be freed and overwritten by this function. |
| 16 |
|
| 17 |
If the PKCS7 is PEM encoded it should have a header of "PKCS7". |
| 18 |
|
| 19 |
@strong{Returns:} On success, @code{GNUTLS_E_SUCCESS} (0) is returned, otherwise a |
| 20 |
negative error value. |
| 21 |
@end deftypefun |