Checker¶
-
class
OC\IntegrityCheck\
Checker
¶ - Class Checker handles the code signing using X.509 and RSA. ownCloud ships witha public root certificate certificate that allows to issue new certificates thatwill be trusted for signing code. The CN will be used to verify that a certificategiven to a third-party developer may not be used for other applications. Forexample the author of the application “calendar” would only receive a certificateonly valid for this application.
Source: lib/private/IntegrityCheck/Checker.php#60
Constants¶
-
CACHE_KEY = oc.integritycheck.checker
Source: lib/private/IntegrityCheck/Checker.php#61
Properties¶
Methods¶
-
public
OC\IntegrityCheck\Checker::
__construct
($environmentHelper, $fileAccessHelper, $appLocator, $config, $cacheFactory, $appManager, $mimeTypeDetector)¶ Source: Parameters: - $environmentHelper (
OC\IntegrityCheck\Helpers\EnvironmentHelper
) - $fileAccessHelper (
OC\IntegrityCheck\Helpers\FileAccessHelper
) - $appLocator (
OC\IntegrityCheck\Helpers\AppLocator
) - $config (
OCP\IConfig
| null) - $cacheFactory (
OCP\ICacheFactory
) - $appManager (
OCP\App\IAppManager
| null) - $mimeTypeDetector (
OCP\Files\IMimeTypeDetector
)
- $environmentHelper (
-
public
OC\IntegrityCheck\Checker::
isCodeCheckEnforced
()¶ - Whether code signing is enforced or not.
Source: lib/private/IntegrityCheck/Checker.php#107 Returns: bool
-
public
OC\IntegrityCheck\Checker::
writeAppSignature
($path, $certificate, $privateKey)¶ - Write the signature of the app in the specified folder
Source: Parameters: - $path (string)
- $certificate (
phpseclib\File\X509
) - $privateKey (
phpseclib\Crypt\RSA
)
Throws: \Exception
-
public
OC\IntegrityCheck\Checker::
writeCoreSignature
($certificate, $rsa, $path)¶ - Write the signature of core
Source: Parameters: - $certificate (
phpseclib\File\X509
) - $rsa (
phpseclib\Crypt\RSA
) - $path (string)
Throws: \Exception
- $certificate (
-
public
OC\IntegrityCheck\Checker::
hasPassedCheck
()¶ - Whether the code integrity check has passed successful or not
Source: lib/private/IntegrityCheck/Checker.php#428 Returns: bool
-
public
OC\IntegrityCheck\Checker::
getResults
()¶ Source: lib/private/IntegrityCheck/Checker.php#440 Returns: array
-
public
OC\IntegrityCheck\Checker::
verifyAppSignature
($appId, $path="", $forceVerify=false)¶ - Verify the signature of $appId. Returns an array with the following content:[‘FILE_MISSING’ =>[‘filename’ => [‘expected’ => ‘expectedSHA512’,‘current’ => ‘currentSHA512’,],],‘EXTRA_FILE’ =>[‘filename’ => [‘expected’ => ‘expectedSHA512’,‘current’ => ‘currentSHA512’,],],‘INVALID_HASH’ =>[‘filename’ => [‘expected’ => ‘expectedSHA512’,‘current’ => ‘currentSHA512’,],],]Array may be empty in case no problems have been found.
Source: Parameters: - $appId (string)
- $path (string) Optional path. If none is given it will be guessed.
- $forceVerify (bool)
Returns: array
-
public
OC\IntegrityCheck\Checker::
verifyCoreSignature
()¶ - Verify the signature of core. Returns an array with the following content:[‘FILE_MISSING’ =>[‘filename’ => [‘expected’ => ‘expectedSHA512’,‘current’ => ‘currentSHA512’,],],‘EXTRA_FILE’ =>[‘filename’ => [‘expected’ => ‘expectedSHA512’,‘current’ => ‘currentSHA512’,],],‘INVALID_HASH’ =>[‘filename’ => [‘expected’ => ‘expectedSHA512’,‘current’ => ‘currentSHA512’,],],]Array may be empty in case no problems have been found.
Source: lib/private/IntegrityCheck/Checker.php#566 Returns: array
-
public
OC\IntegrityCheck\Checker::
runInstanceVerification
()¶ - Verify the core code of the instance as well as all applicable applicationsand store the results.
Source: lib/private/IntegrityCheck/Checker.php#590