Skip to content

Commit

Permalink
Merge pull request #11 from minvws/verify
Browse files Browse the repository at this point in the history
Creating 'empty' verify service
  • Loading branch information
jaytaph authored Sep 23, 2022
2 parents 13faebe + 79ecd61 commit 6cd28ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/CryptoServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,14 @@ public function register(): void

return new Signature\ProcessSpawnService(...$args);
});

$this->app->singleton(SignatureVerifyCryptoInterface::class, function () {
if (function_exists('openssl_cms_verify')) {
return new Signature\NativeService(tempFileService: app(TempFileInterface::class));
} else {
return new Signature\ProcessSpawnService(tempFileService: app(TempFileInterface::class));
}
});
}

public function boot(): void
Expand Down

0 comments on commit 6cd28ec

Please sign in to comment.