diff options
author | Dmitry Baryshkov <dbaryshkov@gmail.com> | 2020-05-26 11:16:47 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2022-09-11 17:54:58 +0300 |
commit | cdd42e891554a1a28eed9e606ac4132f0715c394 (patch) | |
tree | bf56989824f988d44384a8fd2c8b920d7eecb799 /lib/x509/pkcs7_int.h | |
parent | f0fc61440c71ed7854b25976c5f96e5a6a19d240 (diff) | |
download | gnutls-tmp-cms-support.tar.gz |
pkcs: extract PBE-based encryption and decryption functionstmp-cms-support
Extract internal functions used by both PKCS#12 and PKCS#8 to handle
PBE-based encryption of the data.
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Diffstat (limited to 'lib/x509/pkcs7_int.h')
-rw-r--r-- | lib/x509/pkcs7_int.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/x509/pkcs7_int.h b/lib/x509/pkcs7_int.h index c0eec11338..59142c3c5c 100644 --- a/lib/x509/pkcs7_int.h +++ b/lib/x509/pkcs7_int.h @@ -84,16 +84,19 @@ _gnutls_decrypt_pbes1_des_md5_data(const char *password, int _gnutls_check_pkcs_cipher_schema(const char *oid); int -_gnutls_pkcs_raw_decrypt_data(schema_id schema, asn1_node pkcs8_asn, - const char *root, const char *password, - const struct pbkdf2_params *kdf_params, - const struct pbe_enc_params *enc_params, - gnutls_datum_t *decrypted_data); - +_gnutls_pkcs_pbe_encrypt_data(asn1_node asn, + schema_id schema, + const gnutls_datum_t * plain, + const char *password, + const char *algo, + const char *params, + const char *content); int -_gnutls_pkcs_raw_encrypt_data(const gnutls_datum_t * plain, - const struct pbe_enc_params *enc_params, - const gnutls_datum_t * key, gnutls_datum_t * encrypted); +_gnutls_pkcs_pbe_decrypt_data(const gnutls_datum_t * data, asn1_node asn, + const char *password, gnutls_datum_t * dec, + const char *algo, + const char *params, + const char *content); int _gnutls_pkcs7_encrypt_int(const cipher_entry_st *ce, const gnutls_datum_t *key, const gnutls_datum_t *iv, const gnutls_datum_t *plain, gnutls_datum_t *enc); int _gnutls_pkcs7_decrypt_int(const cipher_entry_st *ce, const gnutls_datum_t *key, const gnutls_datum_t *iv, gnutls_datum_t *data); |