瀏覽代碼

After update to neon 0.32.1 and 7d9dbdcf, SHA-256 fingerprint of TLS certificate was missing colons

(cherry picked from commit 4a1ce1c673e9c10daf3f882bed6de901aa004e35)

Source commit: 65dd20ee33a741b4bab0ec9e442458d1f3425d69
Martin Prikryl 4 年之前
父節點
當前提交
3f6a289b30
共有 1 個文件被更改,包括 10 次插入1 次删除
  1. 10 1
      source/core/NeonIntf.cpp

+ 10 - 1
source/core/NeonIntf.cpp

@@ -463,7 +463,16 @@ void __fastcall RetrieveNeonCertificateData(
   }
   else
   {
-    Data.FingerprintSHA256 = StrFromNeon(FingeprintSHA256);
+    UnicodeString Buf = StrFromNeon(FingeprintSHA256);
+    if (DebugAlwaysTrue(Buf.Length() > 2) &&
+        DebugAlwaysTrue((Buf.Length() % 2) == 0))
+    {
+      for (int Index = 3; Index < Buf.Length(); Index += 3)
+      {
+        Buf.Insert(L":", Index);
+      }
+    }
+    Data.FingerprintSHA256 = Buf;
     ne_free(FingeprintSHA256);
   }