Browse Source

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 năm trước cách đây
mục cha
commit
3f6a289b30
1 tập tin đã thay đổi với 10 bổ sung1 xóa
  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);
   }