Explorar el Código

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

Source commit: a74063cfc658b497af62831dd4748a7ed678561c
Martin Prikryl hace 4 años
padre
commit
4a1ce1c673
Se han modificado 1 ficheros con 10 adiciones y 1 borrados
  1. 10 1
      source/core/NeonIntf.cpp

+ 10 - 1
source/core/NeonIntf.cpp

@@ -453,7 +453,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);
   }