Home | History | Annotate | Download | only in pkcs8

Lines Matching defs:pkcs8

56 #include <openssl/pkcs8.h>
204 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
231 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_DECODE_ERROR);
238 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_DECODE_ERROR);
251 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_KEY_GEN_ERROR);
257 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_KEY_GEN_ERROR);
332 OPENSSL_PUT_ERROR(PKCS8, ERR_R_OVERFLOW);
339 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_DECODE_ERROR);
345 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
364 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNKNOWN_ALGORITHM);
379 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNKNOWN_CIPHER);
389 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNKNOWN_DIGEST);
396 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_KEYGEN_FAILURE);
417 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNKNOWN_CIPHER_ALGORITHM);
423 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_TOO_LONG);
429 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
435 OPENSSL_PUT_ERROR(PKCS8, ERR_R_EVP_LIB);
442 OPENSSL_PUT_ERROR(PKCS8, ERR_R_EVP_LIB);
465 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_CRYPT_ERROR);
472 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_DECODE_ERROR);
478 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(X509_SIG *pkcs8, const char *pass,
482 if (!pass_to_pass_raw(OBJ_obj2nid(pkcs8->algor->algorithm), pass, pass_len,
487 PKCS8_PRIV_KEY_INFO *ret = PKCS8_decrypt_pbe(pkcs8, pass_raw, pass_raw_len);
496 PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_pbe(X509_SIG *pkcs8, const uint8_t *pass_raw,
498 return pkcs12_item_decrypt_d2i(pkcs8->algor,
500 pass_raw_len, pkcs8->digest);
514 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
519 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_ENCODE_ERROR);
524 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_ENCRYPT_ERROR);
557 X509_SIG *pkcs8 = NULL;
560 pkcs8 = X509_SIG_new();
561 if (pkcs8 == NULL) {
562 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
572 OPENSSL_PUT_ERROR(PKCS8, ERR_R_ASN1_LIB);
576 X509_ALGOR_free(pkcs8->algor);
577 pkcs8->algor = pbe;
578 M_ASN1_OCTET_STRING_free(pkcs8->digest);
579 pkcs8->digest = pkcs12_item_i2d_encrypt(
581 if (!pkcs8->digest) {
582 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_ENCRYPT_ERROR);
586 return pkcs8;
589 X509_SIG_free(pkcs8);
604 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
609 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM);
617 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_PRIVATE_KEY_DECODE_ERROR);
621 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_METHOD_NOT_SUPPORTED);
637 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);
645 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_PRIVATE_KEY_ENCODE_ERROR);
649 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_METHOD_NOT_SUPPORTED);
653 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM);
687 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_PKCS12_TOO_DEEPLY_NESTED);
696 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
707 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
714 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
744 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
772 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
778 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
789 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
809 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
822 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_MULTIPLE_PRIVATE_KEYS_IN_PKCS12);
827 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
835 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
839 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
865 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
871 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
877 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
881 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
913 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
930 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
935 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_VERSION);
940 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
945 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_MISSING_MAC);
950 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
959 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
967 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_PKCS12_PUBLIC_KEY_INTEGRITY_NOT_SUPPORTED);
972 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
980 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_DECODE_ERROR);
999 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
1008 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_BAD_PKCS12_DATA);
1016 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_UNKNOWN_HASH);
1032 OPENSSL_PUT_ERROR(PKCS8, PKCS8_R_INCORRECT_PASSWORD);
1161 OPENSSL_PUT_ERROR(PKCS8, ERR_R_MALLOC_FAILURE);