Lines Matching refs:copy
4 * Permission to use, copy, modify, and distribute this software for any
923 struct sshbuf *copy = NULL, *sect = NULL;
941 /* Take a copy of the KRL buffer so we can verify its signature later */
942 if ((copy = sshbuf_fromb(buf)) == NULL) {
946 if ((r = sshbuf_consume(copy, sizeof(KRL_MAGIC) - 1)) != 0)
954 if ((r = sshbuf_get_u32(copy, &format_version)) != 0)
960 if ((r = sshbuf_get_u64(copy, &krl->krl_version)) != 0 ||
961 (r = sshbuf_get_u64(copy, &krl->generated_date)) != 0 ||
962 (r = sshbuf_get_u64(copy, &krl->flags)) != 0 ||
963 (r = sshbuf_skip_string(copy)) != 0 ||
964 (r = sshbuf_get_cstring(copy, &krl->comment, NULL)) != 0)
977 if (sshbuf_len(buf) < sshbuf_len(copy)) {
982 sects_off = sshbuf_len(buf) - sshbuf_len(copy);
983 while (sshbuf_len(copy) > 0) {
984 if ((r = sshbuf_get_u8(copy, &type)) != 0 ||
985 (r = sshbuf_get_string_direct(copy, &blob, &blen)) != 0)
1004 if (sshbuf_len(buf) < sshbuf_len(copy)) {
1009 sig_off = sshbuf_len(buf) - sshbuf_len(copy);
1011 if ((r = sshbuf_get_string_direct(copy, &blob, &blen)) != 0) {
1040 if (sshbuf_len(copy) != 0) {
1050 sshbuf_free(copy);
1051 if ((copy = sshbuf_fromb(buf)) == NULL) {
1055 if ((r = sshbuf_consume(copy, sects_off)) != 0)
1057 while (sshbuf_len(copy) > 0) {
1060 if ((r = sshbuf_get_u8(copy, &type)) != 0 ||
1061 (r = sshbuf_froms(copy, §)) != 0)
1094 if ((r = sshbuf_skip_string(copy)) != 0)
1155 sshbuf_free(copy);