Lines Matching refs:info

609     OSSL_STORE_INFO *info = OPENSSL_zalloc(sizeof(*info));  in OSSL_STORE_INFO_new()  local
611 if (info == NULL) in OSSL_STORE_INFO_new()
614 info->type = type; in OSSL_STORE_INFO_new()
615 info->_.data = data; in OSSL_STORE_INFO_new()
616 return info; in OSSL_STORE_INFO_new()
621 OSSL_STORE_INFO *info = OSSL_STORE_INFO_new(OSSL_STORE_INFO_NAME, NULL); in OSSL_STORE_INFO_new_NAME() local
623 if (info == NULL) { in OSSL_STORE_INFO_new_NAME()
628 info->_.name.name = name; in OSSL_STORE_INFO_new_NAME()
629 info->_.name.desc = NULL; in OSSL_STORE_INFO_new_NAME()
631 return info; in OSSL_STORE_INFO_new_NAME()
634 int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc) in OSSL_STORE_INFO_set0_NAME_description() argument
636 if (info->type != OSSL_STORE_INFO_NAME) { in OSSL_STORE_INFO_set0_NAME_description()
641 info->_.name.desc = desc; in OSSL_STORE_INFO_set0_NAME_description()
647 OSSL_STORE_INFO *info = OSSL_STORE_INFO_new(OSSL_STORE_INFO_PARAMS, params); in OSSL_STORE_INFO_new_PARAMS() local
649 if (info == NULL) in OSSL_STORE_INFO_new_PARAMS()
651 return info; in OSSL_STORE_INFO_new_PARAMS()
656 OSSL_STORE_INFO *info = OSSL_STORE_INFO_new(OSSL_STORE_INFO_PUBKEY, pkey); in OSSL_STORE_INFO_new_PUBKEY() local
658 if (info == NULL) in OSSL_STORE_INFO_new_PUBKEY()
660 return info; in OSSL_STORE_INFO_new_PUBKEY()
665 OSSL_STORE_INFO *info = OSSL_STORE_INFO_new(OSSL_STORE_INFO_PKEY, pkey); in OSSL_STORE_INFO_new_PKEY() local
667 if (info == NULL) in OSSL_STORE_INFO_new_PKEY()
669 return info; in OSSL_STORE_INFO_new_PKEY()
674 OSSL_STORE_INFO *info = OSSL_STORE_INFO_new(OSSL_STORE_INFO_CERT, x509); in OSSL_STORE_INFO_new_CERT() local
676 if (info == NULL) in OSSL_STORE_INFO_new_CERT()
678 return info; in OSSL_STORE_INFO_new_CERT()
683 OSSL_STORE_INFO *info = OSSL_STORE_INFO_new(OSSL_STORE_INFO_CRL, crl); in OSSL_STORE_INFO_new_CRL() local
685 if (info == NULL) in OSSL_STORE_INFO_new_CRL()
687 return info; in OSSL_STORE_INFO_new_CRL()
693 int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get_type() argument
695 return info->type; in OSSL_STORE_INFO_get_type()
698 void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_data() argument
700 if (info->type == type) in OSSL_STORE_INFO_get0_data()
701 return info->_.data; in OSSL_STORE_INFO_get0_data()
705 const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_NAME() argument
707 if (info->type == OSSL_STORE_INFO_NAME) in OSSL_STORE_INFO_get0_NAME()
708 return info->_.name.name; in OSSL_STORE_INFO_get0_NAME()
712 char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_NAME() argument
714 if (info->type == OSSL_STORE_INFO_NAME) in OSSL_STORE_INFO_get1_NAME()
715 return OPENSSL_strdup(info->_.name.name); in OSSL_STORE_INFO_get1_NAME()
720 const char *OSSL_STORE_INFO_get0_NAME_description(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_NAME_description() argument
722 if (info->type == OSSL_STORE_INFO_NAME) in OSSL_STORE_INFO_get0_NAME_description()
723 return info->_.name.desc; in OSSL_STORE_INFO_get0_NAME_description()
727 char *OSSL_STORE_INFO_get1_NAME_description(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_NAME_description() argument
729 if (info->type == OSSL_STORE_INFO_NAME) in OSSL_STORE_INFO_get1_NAME_description()
730 return OPENSSL_strdup(info->_.name.desc ? info->_.name.desc : ""); in OSSL_STORE_INFO_get1_NAME_description()
735 EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_PARAMS() argument
737 if (info->type == OSSL_STORE_INFO_PARAMS) in OSSL_STORE_INFO_get0_PARAMS()
738 return info->_.params; in OSSL_STORE_INFO_get0_PARAMS()
742 EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_PARAMS() argument
744 if (info->type == OSSL_STORE_INFO_PARAMS) { in OSSL_STORE_INFO_get1_PARAMS()
745 EVP_PKEY_up_ref(info->_.params); in OSSL_STORE_INFO_get1_PARAMS()
746 return info->_.params; in OSSL_STORE_INFO_get1_PARAMS()
752 EVP_PKEY *OSSL_STORE_INFO_get0_PUBKEY(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_PUBKEY() argument
754 if (info->type == OSSL_STORE_INFO_PUBKEY) in OSSL_STORE_INFO_get0_PUBKEY()
755 return info->_.pubkey; in OSSL_STORE_INFO_get0_PUBKEY()
759 EVP_PKEY *OSSL_STORE_INFO_get1_PUBKEY(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_PUBKEY() argument
761 if (info->type == OSSL_STORE_INFO_PUBKEY) { in OSSL_STORE_INFO_get1_PUBKEY()
762 EVP_PKEY_up_ref(info->_.pubkey); in OSSL_STORE_INFO_get1_PUBKEY()
763 return info->_.pubkey; in OSSL_STORE_INFO_get1_PUBKEY()
769 EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_PKEY() argument
771 if (info->type == OSSL_STORE_INFO_PKEY) in OSSL_STORE_INFO_get0_PKEY()
772 return info->_.pkey; in OSSL_STORE_INFO_get0_PKEY()
776 EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_PKEY() argument
778 if (info->type == OSSL_STORE_INFO_PKEY) { in OSSL_STORE_INFO_get1_PKEY()
779 EVP_PKEY_up_ref(info->_.pkey); in OSSL_STORE_INFO_get1_PKEY()
780 return info->_.pkey; in OSSL_STORE_INFO_get1_PKEY()
786 X509 *OSSL_STORE_INFO_get0_CERT(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_CERT() argument
788 if (info->type == OSSL_STORE_INFO_CERT) in OSSL_STORE_INFO_get0_CERT()
789 return info->_.x509; in OSSL_STORE_INFO_get0_CERT()
793 X509 *OSSL_STORE_INFO_get1_CERT(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_CERT() argument
795 if (info->type == OSSL_STORE_INFO_CERT) { in OSSL_STORE_INFO_get1_CERT()
796 X509_up_ref(info->_.x509); in OSSL_STORE_INFO_get1_CERT()
797 return info->_.x509; in OSSL_STORE_INFO_get1_CERT()
803 X509_CRL *OSSL_STORE_INFO_get0_CRL(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get0_CRL() argument
805 if (info->type == OSSL_STORE_INFO_CRL) in OSSL_STORE_INFO_get0_CRL()
806 return info->_.crl; in OSSL_STORE_INFO_get0_CRL()
810 X509_CRL *OSSL_STORE_INFO_get1_CRL(const OSSL_STORE_INFO *info) in OSSL_STORE_INFO_get1_CRL() argument
812 if (info->type == OSSL_STORE_INFO_CRL) { in OSSL_STORE_INFO_get1_CRL()
813 X509_CRL_up_ref(info->_.crl); in OSSL_STORE_INFO_get1_CRL()
814 return info->_.crl; in OSSL_STORE_INFO_get1_CRL()
823 void OSSL_STORE_INFO_free(OSSL_STORE_INFO *info) in OSSL_STORE_INFO_free() argument
825 if (info != NULL) { in OSSL_STORE_INFO_free()
826 switch (info->type) { in OSSL_STORE_INFO_free()
828 OPENSSL_free(info->_.name.name); in OSSL_STORE_INFO_free()
829 OPENSSL_free(info->_.name.desc); in OSSL_STORE_INFO_free()
832 EVP_PKEY_free(info->_.params); in OSSL_STORE_INFO_free()
835 EVP_PKEY_free(info->_.pubkey); in OSSL_STORE_INFO_free()
838 EVP_PKEY_free(info->_.pkey); in OSSL_STORE_INFO_free()
841 X509_free(info->_.x509); in OSSL_STORE_INFO_free()
844 X509_CRL_free(info->_.crl); in OSSL_STORE_INFO_free()
847 OPENSSL_free(info); in OSSL_STORE_INFO_free()