Lines Matching refs:lineinfo
684 struct hostkey_foreach_line lineinfo; in hostkeys_foreach() local
687 memset(&lineinfo, 0, sizeof(lineinfo)); in hostkeys_foreach()
698 sshkey_free(lineinfo.key); in hostkeys_foreach()
699 memset(&lineinfo, 0, sizeof(lineinfo)); in hostkeys_foreach()
700 lineinfo.path = path; in hostkeys_foreach()
701 lineinfo.linenum = linenum; in hostkeys_foreach()
702 lineinfo.line = oline; in hostkeys_foreach()
703 lineinfo.marker = MRK_NONE; in hostkeys_foreach()
704 lineinfo.status = HKF_STATUS_OK; in hostkeys_foreach()
705 lineinfo.keytype = KEY_UNSPEC; in hostkeys_foreach()
712 lineinfo.status = HKF_STATUS_COMMENT; in hostkeys_foreach()
713 if ((r = callback(&lineinfo, ctx)) != 0) in hostkeys_foreach()
719 if ((lineinfo.marker = check_markers(&cp)) == MRK_ERROR) { in hostkeys_foreach()
730 lineinfo.hosts = cp; in hostkeys_foreach()
735 if ((s = match_maybe_hashed(host, lineinfo.hosts, in hostkeys_foreach()
738 __func__, path, linenum, lineinfo.hosts); in hostkeys_foreach()
742 lineinfo.status = HKF_STATUS_MATCHED; in hostkeys_foreach()
743 lineinfo.match |= HKF_MATCH_HOST | in hostkeys_foreach()
748 if ((s = match_maybe_hashed(ip, lineinfo.hosts, in hostkeys_foreach()
752 linenum, lineinfo.hosts); in hostkeys_foreach()
756 lineinfo.status = HKF_STATUS_MATCHED; in hostkeys_foreach()
757 lineinfo.match |= HKF_MATCH_IP | in hostkeys_foreach()
766 lineinfo.status != HKF_STATUS_MATCHED) in hostkeys_foreach()
778 lineinfo.rawkey = cp = cp2; in hostkeys_foreach()
786 if ((lineinfo.key = sshkey_new(KEY_UNSPEC)) == NULL) { in hostkeys_foreach()
791 if (!hostfile_read_key(&cp, &kbits, lineinfo.key)) { in hostkeys_foreach()
793 sshkey_free(lineinfo.key); in hostkeys_foreach()
794 lineinfo.key = sshkey_new(KEY_RSA1); in hostkeys_foreach()
795 if (lineinfo.key == NULL) { in hostkeys_foreach()
801 lineinfo.key)) in hostkeys_foreach()
807 lineinfo.keytype = lineinfo.key->type; in hostkeys_foreach()
808 lineinfo.comment = cp; in hostkeys_foreach()
811 l = strcspn(lineinfo.rawkey, " \t"); in hostkeys_foreach()
813 lineinfo.rawkey[l] == '\0') in hostkeys_foreach()
815 memcpy(ktype, lineinfo.rawkey, l); in hostkeys_foreach()
817 lineinfo.keytype = sshkey_type_from_name(ktype); in hostkeys_foreach()
823 if (lineinfo.keytype == KEY_UNSPEC && l < 8 && in hostkeys_foreach()
825 lineinfo.keytype = KEY_RSA1; in hostkeys_foreach()
838 lineinfo.keytype = KEY_UNSPEC; in hostkeys_foreach()
840 if (lineinfo.keytype == KEY_UNSPEC) { in hostkeys_foreach()
842 sshkey_free(lineinfo.key); in hostkeys_foreach()
843 lineinfo.key = NULL; in hostkeys_foreach()
844 lineinfo.status = HKF_STATUS_INVALID; in hostkeys_foreach()
845 if ((r = callback(&lineinfo, ctx)) != 0) in hostkeys_foreach()
850 if ((r = callback(&lineinfo, ctx)) != 0) in hostkeys_foreach()
853 sshkey_free(lineinfo.key); in hostkeys_foreach()