Lines Matching refs:pkcs8
478 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(X509_SIG *pkcs8, const char *pass, in PKCS8_decrypt() argument
482 if (!pass_to_pass_raw(OBJ_obj2nid(pkcs8->algor->algorithm), pass, pass_len, in PKCS8_decrypt()
487 PKCS8_PRIV_KEY_INFO *ret = PKCS8_decrypt_pbe(pkcs8, pass_raw, pass_raw_len); in PKCS8_decrypt()
496 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_pbe(X509_SIG *pkcs8, const uint8_t *pass_raw, in PKCS8_decrypt_pbe() argument
498 return pkcs12_item_decrypt_d2i(pkcs8->algor, in PKCS8_decrypt_pbe()
500 pass_raw_len, pkcs8->digest); in PKCS8_decrypt_pbe()
557 X509_SIG *pkcs8 = NULL; in PKCS8_encrypt_pbe() local
560 pkcs8 = X509_SIG_new(); in PKCS8_encrypt_pbe()
561 if (pkcs8 == NULL) { in PKCS8_encrypt_pbe()
576 X509_ALGOR_free(pkcs8->algor); in PKCS8_encrypt_pbe()
577 pkcs8->algor = pbe; in PKCS8_encrypt_pbe()
578 M_ASN1_OCTET_STRING_free(pkcs8->digest); in PKCS8_encrypt_pbe()
579 pkcs8->digest = pkcs12_item_i2d_encrypt( in PKCS8_encrypt_pbe()
581 if (!pkcs8->digest) { in PKCS8_encrypt_pbe()
586 return pkcs8; in PKCS8_encrypt_pbe()
589 X509_SIG_free(pkcs8); in PKCS8_encrypt_pbe()