summaryrefslogtreecommitdiff
path: root/src/ClientCertificate.php
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-01-15 13:54:52 +0100
committerDaniel Weipert <git@mail.dweipert.de>2024-01-15 13:54:52 +0100
commitfaf9ddfc29676b86621bdc3033e05d63df5c2a93 (patch)
tree353517d8ce5c20ff7476b7d50f3505b37b2c5051 /src/ClientCertificate.php
parent3776ab80f23c07943d2228f2975e515c494f930a (diff)
client certificate handling and workaroundHEADmain
Diffstat (limited to 'src/ClientCertificate.php')
-rw-r--r--src/ClientCertificate.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/ClientCertificate.php b/src/ClientCertificate.php
new file mode 100644
index 0000000..d2b9530
--- /dev/null
+++ b/src/ClientCertificate.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace GeminiFoundation;
+
+class ClientCertificate
+{
+ protected \OpenSSLCertificate $certificate;
+
+ public function __construct(\OpenSSLCertificate $certificate)
+ {
+ $this->certificate = $certificate;
+ }
+
+ public function getObject(): \OpenSSLCertificate
+ {
+ return $this->certificate;
+ }
+
+ public function getFingerprint(): string
+ {
+ return openssl_x509_fingerprint($this->certificate);
+ }
+
+ public function parse(): array
+ {
+ return openssl_x509_parse($this->certificate);
+ }
+}