浏览代码

Merge branch 'thirdparty_dev' into dev

Source commit: e5605a58aabb93300cea841485f58bdb6c5af143
Martin Prikryl 10 月之前
父节点
当前提交
e4851c05dd
共有 3 个文件被更改,包括 0 次插入85 次删除
  1. 0 8
      source/putty/crypto/aesgcm-common.c
  2. 0 42
      source/putty/utils/percent_decode.c
  3. 0 35
      source/putty/utils/percent_encode.c

+ 0 - 8
source/putty/crypto/aesgcm-common.c

@@ -1,8 +0,0 @@
-#include "ssh.h"
-#include "aesgcm.h"
-
-void aesgcm_set_prefix_lengths(ssh2_mac *mac, size_t skip, size_t aad)
-{
-    const struct aesgcm_extra *extra = mac->vt->extra;
-    extra->set_prefix_lengths(mac, skip, aad);
-}

+ 0 - 42
source/putty/utils/percent_decode.c

@@ -1,42 +0,0 @@
-/*
- * Decode %-encoding in URL style.
- */
-
-#include <ctype.h>
-
-#include "misc.h"
-
-void percent_decode_bs(BinarySink *bs, ptrlen data)
-{
-    const char *p, *e; // WINSCP
-    for (p = data.ptr, e = ptrlen_end(data); p < e; p++) {
-        char c = *p;
-        if (c == '%' && e-p >= 3 &&
-            isxdigit((unsigned char)p[1]) &&
-            isxdigit((unsigned char)p[2])) {
-            char hex[3];
-            hex[0] = p[1];
-            hex[1] = p[2];
-            hex[2] = '\0';
-            put_byte(bs, strtoul(hex, NULL, 16));
-            p += 2;
-        } else {
-            put_byte(bs, c);
-        }
-    }
-
-}
-
-void percent_decode_fp(FILE *fp, ptrlen data)
-{
-    stdio_sink ss;
-    stdio_sink_init(&ss, fp);
-    percent_decode_bs(BinarySink_UPCAST(&ss), data);
-}
-
-strbuf *percent_decode_sb(ptrlen data)
-{
-    strbuf *sb = strbuf_new();
-    percent_decode_bs(BinarySink_UPCAST(sb), data);
-    return sb;
-}

+ 0 - 35
source/putty/utils/percent_encode.c

@@ -1,35 +0,0 @@
-/*
- * %-encoding in URL style.
- *
- * Defaults to escaping % itself (necessary for decoding to even
- * work), and any C0 escape character. Further bad characters can be
- * provided in 'badchars'.
- */
-
-#include "misc.h"
-
-void percent_encode_bs(BinarySink *bs, ptrlen data, const char *badchars)
-{
-    const char *p, *e; // WINSCP
-    for (p = data.ptr, e = ptrlen_end(data); p < e; p++) {
-        char c = *p;
-        if (c == '%' || c < ' ' || (badchars && strchr(badchars, c)))
-            put_fmt(bs, "%%%02X", (unsigned char)c);
-        else
-            put_byte(bs, c);
-    }
-}
-
-void percent_encode_fp(FILE *fp, ptrlen data, const char *badchars)
-{
-    stdio_sink ss;
-    stdio_sink_init(&ss, fp);
-    percent_encode_bs(BinarySink_UPCAST(&ss), data, badchars);
-}
-
-strbuf *percent_encode_sb(ptrlen data, const char *badchars)
-{
-    strbuf *sb = strbuf_new();
-    percent_encode_bs(BinarySink_UPCAST(sb), data, badchars);
-    return sb;
-}