Lines Matching refs:amih

595 	ami_handle_t *amih = NULL;
608 if ((ami_err = dld_ami_init(&amih, alias, NULL, 0, 0, NULL))
611 dld_ami_strerror(amih, ami_err));
616 if (!(dn = alias2dn(amih))) {
632 if ((ami_err = dld_ami_sign(amih, sig_in, sig_in_len, AMI_END_DATA,
637 dld_ami_strerror(amih, ami_err));
685 if (amih) {
686 dld_ami_end(amih);
721 ami_handle_t *amih = NULL;
742 if ((ami_err = dld_ami_init(&amih, spi, NULL, 0, 0, NULL)) != AMI_OK) {
744 dld_ami_strerror(amih, ami_err));
754 if ((ami_err = dld_ami_get_cert(amih, spi, &certs, &ccnt)) != AMI_OK) {
757 spi, dld_ami_strerror(amih, ami_err));
765 if ((ami_err = dld_ami_verify(amih, inbytes, inbytes_len, AMI_END_DATA,
772 dld_ami_strerror(amih, ami_err));
777 err = check_spis(amih, certs, icert, spi);
784 if (amih) {
785 dld_ami_end(amih);
797 static char *alias2dn(ami_handle_t *amih) {
804 if ((status = dld_ami_get_cert(amih, NULL, &certs, &ccnt)) != AMI_OK) {
807 dld_ami_strerror(amih, status));
817 if ((status = dld_ami_dn2str(amih, certs[0].info.subject, &answer))
821 dld_ami_strerror(amih, status));
840 static SLPError check_spis(ami_handle_t *amih,
880 if (dncmp(amih, prop_spi, spi) == 0) {
892 ami_err = dld_ami_get_cert_chain(amih, certs + icert, cas, 0,
897 dld_ami_strerror(amih, ami_err));
914 static int dncmp(ami_handle_t *amih, const char *s1, const char *s2) {
923 if ((status = dld_ami_str2dn(amih, (char *)s1, &dn1)) != AMI_OK) {
927 dld_ami_strerror(amih, status));
932 if ((status = dld_ami_str2dn(amih, (char *)s2, &dn2)) != AMI_OK) {
936 dld_ami_strerror(amih, status));
942 if ((status = dld_ami_dn2str(amih, dn1, &dnstr1)) != AMI_OK) {
945 dld_ami_strerror(amih, status));
950 if ((status = dld_ami_dn2str(amih, dn2, &dnstr2)) != AMI_OK) {
953 dld_ami_strerror(amih, status));