From 316b250a69b98f74e0de8ed6daaaab3e7105ef18 Mon Sep 17 00:00:00 2001 From: Joshua Thijssen Date: Mon, 24 Oct 2022 10:26:35 +0200 Subject: [PATCH] make sure we return the instances --- src/CryptoServiceProvider.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/CryptoServiceProvider.php b/src/CryptoServiceProvider.php index fb6bf70..0e768e7 100644 --- a/src/CryptoServiceProvider.php +++ b/src/CryptoServiceProvider.php @@ -14,7 +14,7 @@ public function register(): void $this->app->bind(TempFileInterface::class, TempFileService::class); $this->app->singleton(CmsCryptoInterface::class, function () { - Factory::createCmsCryptoService( + return Factory::createCmsCryptoService( encryptionCertPaths: config('crypto.cms.encryption_certificate_paths'), decryptionCertPath: config('crypto.cms.decryption_certificate_path'), decryptionKeyPath: config('crypto.cms.decryption_certificate_key_path'), @@ -23,14 +23,14 @@ public function register(): void }); $this->app->singleton(SealboxCryptoInterface::class, function () { - Factory::createSealboxCryptoService( + return Factory::createSealboxCryptoService( privKey: config('crypto.sealbox.private_key'), recipientPubKey: config('crypto.sealbox.recipient_pub_key'), ); }); $this->app->singleton(SignatureCryptoInterface::class, function () { - Factory::createSignatureCryptoService( + return Factory::createSignatureCryptoService( certificatePath: config('crypto.signature.x509_cert'), certificateKeyPath: config('crypto.signature.x509_key'), certificateKeyPass: config('crypto.signature.x509_pass'),