fix marker rendering & modernize riding widgets for dark mode - 2026-04-11
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'package:Intaleq/print.dart';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
@@ -11,25 +12,25 @@ Future<bool> verifyCertificateManually(
|
||||
|
||||
final certificate = socket.peerCertificate;
|
||||
if (certificate == null) {
|
||||
print("❌ لا يوجد شهادة.");
|
||||
Log.print("❌ لا يوجد شهادة.");
|
||||
return false;
|
||||
}
|
||||
|
||||
final der = certificate.der;
|
||||
final actualPin = base64.encode(sha256.convert(der).bytes);
|
||||
|
||||
print("📛 HOST: $host");
|
||||
print("📜 Subject: ${certificate.subject}");
|
||||
print("📜 Issuer: ${certificate.issuer}");
|
||||
print("📅 Valid From: ${certificate.startValidity}");
|
||||
print("📅 Valid To: ${certificate.endValidity}");
|
||||
print(
|
||||
Log.print("📛 HOST: $host");
|
||||
Log.print("📜 Subject: ${certificate.subject}");
|
||||
Log.print("📜 Issuer: ${certificate.issuer}");
|
||||
Log.print("📅 Valid From: ${certificate.startValidity}");
|
||||
Log.print("📅 Valid To: ${certificate.endValidity}");
|
||||
Log.print(
|
||||
"🔐 Server Pin: $actualPin → ${actualPin == expectedPin ? '✅ MATCH' : '❌ MISMATCH'}");
|
||||
|
||||
socket.destroy();
|
||||
return actualPin == expectedPin;
|
||||
} catch (e) {
|
||||
print("❌ خطأ أثناء الاتصال أو الفحص: $e");
|
||||
Log.print("❌ خطأ أثناء الاتصال أو الفحص: $e");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -37,4 +38,4 @@ Future<bool> verifyCertificateManually(
|
||||
/// تحويل المفتاح العام إلى بصمة SHA-256
|
||||
List<int> sha256Convert(Uint8List der) {
|
||||
return sha256.convert(der).bytes;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user