Lines Matching refs:oplc

92 	KMF_POLICY_RECORD oplc, plc;  in kc_modify_policy()  local
95 (void) memset(&oplc, 0, sizeof (KMF_POLICY_RECORD)); in kc_modify_policy()
587 ret = kmf_get_policy(filename, plc.name, &oplc); in kc_modify_policy()
597 oplc.ignore_date = plc.ignore_date; in kc_modify_policy()
600 oplc.ignore_unknown_ekus = plc.ignore_unknown_ekus; in kc_modify_policy()
603 oplc.ignore_trust_anchor = plc.ignore_trust_anchor; in kc_modify_policy()
606 if (oplc.validity_adjusttime) in kc_modify_policy()
607 free(oplc.validity_adjusttime); in kc_modify_policy()
608 oplc.validity_adjusttime = in kc_modify_policy()
613 if (oplc.ta_name) in kc_modify_policy()
614 free(oplc.ta_name); in kc_modify_policy()
615 oplc.ta_name = plc.ta_name; in kc_modify_policy()
618 if (oplc.ta_serial) in kc_modify_policy()
619 free(oplc.ta_serial); in kc_modify_policy()
620 oplc.ta_serial = plc.ta_serial; in kc_modify_policy()
630 (mapper_name != NULL && oplc.mapper.pathname != NULL) || in kc_modify_policy()
631 (mapper_pathname != NULL && oplc.mapper.mapname != NULL) || in kc_modify_policy()
635 oplc.mapper.mapname == NULL) || in kc_modify_policy()
636 (mapper_dir != NULL && oplc.mapper.pathname != NULL) || in kc_modify_policy()
638 ((plc.mapper.options != NULL || oplc.mapper.options != NULL) && in kc_modify_policy()
639 (mapper_name == NULL && oplc.mapper.mapname == NULL && in kc_modify_policy()
640 mapper_pathname == NULL && oplc.mapper.pathname == NULL))) { in kc_modify_policy()
662 UPDATE_IF_DIFFERENT(oplc.mapper.mapname, plc.mapper.mapname); in kc_modify_policy()
663 UPDATE_IF_DIFFERENT(oplc.mapper.pathname, plc.mapper.pathname); in kc_modify_policy()
664 UPDATE_IF_DIFFERENT(oplc.mapper.dir, plc.mapper.dir); in kc_modify_policy()
667 if (oplc.mapper.options != NULL) in kc_modify_policy()
668 free(oplc.mapper.options); in kc_modify_policy()
669 oplc.mapper.options = plc.mapper.options; in kc_modify_policy()
688 if (oplc.revocation & KMF_REVOCATION_METHOD_OCSP) { in kc_modify_policy()
689 if (oplc.VAL_OCSP_BASIC.responderURI) { in kc_modify_policy()
690 free(oplc.VAL_OCSP_BASIC.responderURI); in kc_modify_policy()
691 oplc.VAL_OCSP_BASIC.responderURI = NULL; in kc_modify_policy()
694 if (oplc.VAL_OCSP_BASIC.proxy) { in kc_modify_policy()
695 free(oplc.VAL_OCSP_BASIC.proxy); in kc_modify_policy()
696 oplc.VAL_OCSP_BASIC.proxy = NULL; in kc_modify_policy()
699 if (oplc.VAL_OCSP_BASIC.response_lifetime) { in kc_modify_policy()
700 free(oplc.VAL_OCSP_BASIC.response_lifetime); in kc_modify_policy()
701 oplc.VAL_OCSP_BASIC.response_lifetime = NULL; in kc_modify_policy()
705 free(oplc.VAL_OCSP_RESP_CERT.name); in kc_modify_policy()
706 oplc.VAL_OCSP_RESP_CERT.name = NULL; in kc_modify_policy()
710 free(oplc.VAL_OCSP_RESP_CERT.serial); in kc_modify_policy()
711 oplc.VAL_OCSP_RESP_CERT.serial = NULL; in kc_modify_policy()
715 oplc.revocation &= ~KMF_REVOCATION_METHOD_OCSP; in kc_modify_policy()
726 if (oplc.VAL_OCSP_RESPONDER_URI) in kc_modify_policy()
727 free(oplc.VAL_OCSP_RESPONDER_URI); in kc_modify_policy()
728 oplc.VAL_OCSP_RESPONDER_URI = in kc_modify_policy()
733 if (oplc.VAL_OCSP_PROXY) in kc_modify_policy()
734 free(oplc.VAL_OCSP_PROXY); in kc_modify_policy()
735 oplc.VAL_OCSP_PROXY = plc.VAL_OCSP_PROXY; in kc_modify_policy()
739 oplc.VAL_OCSP_URI_FROM_CERT = in kc_modify_policy()
743 if (oplc.VAL_OCSP_RESP_LIFETIME) in kc_modify_policy()
744 free(oplc.VAL_OCSP_RESP_LIFETIME); in kc_modify_policy()
745 oplc.VAL_OCSP_RESP_LIFETIME = in kc_modify_policy()
750 oplc.VAL_OCSP_IGNORE_RESP_SIGN = in kc_modify_policy()
754 if (oplc.VAL_OCSP_RESP_CERT_NAME) in kc_modify_policy()
755 free(oplc.VAL_OCSP_RESP_CERT_NAME); in kc_modify_policy()
756 oplc.VAL_OCSP_RESP_CERT_NAME = in kc_modify_policy()
761 if (oplc.VAL_OCSP_RESP_CERT_SERIAL) in kc_modify_policy()
762 free(oplc.VAL_OCSP_RESP_CERT_SERIAL); in kc_modify_policy()
763 oplc.VAL_OCSP_RESP_CERT_SERIAL = in kc_modify_policy()
767 if (oplc.VAL_OCSP_RESP_CERT_NAME != NULL && in kc_modify_policy()
768 oplc.VAL_OCSP_RESP_CERT_SERIAL != NULL) in kc_modify_policy()
769 oplc.VAL_OCSP.has_resp_cert = B_TRUE; in kc_modify_policy()
771 oplc.VAL_OCSP.has_resp_cert = B_FALSE; in kc_modify_policy()
774 oplc.revocation |= KMF_REVOCATION_METHOD_OCSP; in kc_modify_policy()
794 if (oplc.revocation & KMF_REVOCATION_METHOD_CRL) { in kc_modify_policy()
795 if (oplc.VAL_CRL_BASEFILENAME) { in kc_modify_policy()
796 free(oplc.VAL_CRL_BASEFILENAME); in kc_modify_policy()
797 oplc.VAL_CRL_BASEFILENAME = NULL; in kc_modify_policy()
800 if (oplc.VAL_CRL_DIRECTORY) { in kc_modify_policy()
801 free(oplc.VAL_CRL_DIRECTORY); in kc_modify_policy()
802 oplc.VAL_CRL_DIRECTORY = NULL; in kc_modify_policy()
805 if (oplc.VAL_CRL_PROXY) { in kc_modify_policy()
806 free(oplc.VAL_CRL_PROXY); in kc_modify_policy()
807 oplc.VAL_CRL_PROXY = NULL; in kc_modify_policy()
811 oplc.revocation &= ~KMF_REVOCATION_METHOD_CRL; in kc_modify_policy()
821 if (oplc.VAL_CRL_BASEFILENAME) in kc_modify_policy()
822 free(oplc.VAL_CRL_BASEFILENAME); in kc_modify_policy()
823 oplc.VAL_CRL_BASEFILENAME = in kc_modify_policy()
828 if (oplc.VAL_CRL_DIRECTORY) in kc_modify_policy()
829 free(oplc.VAL_CRL_DIRECTORY); in kc_modify_policy()
830 oplc.VAL_CRL_DIRECTORY = plc.VAL_CRL_DIRECTORY; in kc_modify_policy()
834 oplc.VAL_CRL_GET_URI = plc.VAL_CRL_GET_URI; in kc_modify_policy()
838 if (oplc.VAL_CRL_PROXY) in kc_modify_policy()
839 free(oplc.VAL_CRL_PROXY); in kc_modify_policy()
840 oplc.VAL_CRL_PROXY = plc.VAL_CRL_PROXY; in kc_modify_policy()
844 oplc.VAL_CRL_IGNORE_SIGN = in kc_modify_policy()
849 oplc.VAL_CRL_IGNORE_DATE = in kc_modify_policy()
854 oplc.revocation |= KMF_REVOCATION_METHOD_CRL; in kc_modify_policy()
868 oplc.ku_bits = 0; in kc_modify_policy()
876 oplc.ku_bits = plc.ku_bits; in kc_modify_policy()
891 if (oplc.eku_set.eku_count > 0) { in kc_modify_policy()
892 kmf_free_eku_policy(&oplc.eku_set); in kc_modify_policy()
893 oplc.eku_set.eku_count = 0; in kc_modify_policy()
894 oplc.eku_set.ekulist = NULL; in kc_modify_policy()
904 kmf_free_eku_policy(&oplc.eku_set); in kc_modify_policy()
905 oplc.eku_set = plc.eku_set; in kc_modify_policy()
910 ret = kmf_verify_policy(&oplc); in kc_modify_policy()
918 ret = kmf_delete_policy_from_db(oplc.name, filename); in kc_modify_policy()
927 ret = kmf_add_policy_to_db(&oplc, filename, B_FALSE); in kc_modify_policy()
939 kmf_free_policy_record(&oplc); in kc_modify_policy()