Get 'Authority Key Identifier' extension.

@throws \LogicException If extension is not present
@return \X509\Certificate\Extension\AuthorityKeyIdentifierExtension
357981
public function authorityKeyIdentifier(): Ext\AuthorityKeyIdentifierExtension
    {
        /** @var Extension\AuthorityKeyIdentifierExtension $keyIdentifier */
        $keyIdentifier = $this->get(Ext\Extension::OID_AUTHORITY_KEY_IDENTIFIER);
        return $keyIdentifier;
    }
235926
public function getID()
    {
        // RUN/RUT se encuentra en la extensión del certificado, esto de acuerdo
        // a Ley 19.799 sobre documentos electrónicos y firma electrónica
        $x509 = new \phpseclib\File\X509();
        $cert = $x509->loadX509($this->certs['cert']);
        if (isset($cert['tbsCertificate']['extensions'])) {
            foreach ($cert['tbsCertificate']['extensions'] as $e) {
                if ($e['extnId']=='id-ce-subjectAltName') {
                    return ltrim($e['extnValue'][0]['otherName']['value']['ia5String'], '0');
                }
            }
        }
        // se obtiene desde serialNumber (esto es sólo para que funcione la firma para tests)
        if (isset($this->data['subject']['serialNumber'])) {
            return ltrim($this->data['subject']['serialNumber'], '0');
        }
        // no se encontró el RUN
        return $this->error('No fue posible obtener el ID de la firma');
    }
1294497
public function keyUsage(): Ext\KeyUsageExtension
    {
        /** @var Extension\KeyUsageExtension $keyUsage */
        $keyUsage = $this->get(Ext\Extension::OID_KEY_USAGE);
        return $keyUsage;
    }
1151443
protected function getSign()
    {
        $content = wordwrap($this->config->get('private_key'), 64, "\n", true);
        $string = "-----BEGIN RSA PRIVATE KEY-----\n{$content}\n-----END RSA PRIVATE KEY-----";
        if ($this->options->get('sign_type') === 'RSA2') {
            openssl_sign($this->getSignContent($this->options->get(), true), $sign, $string, OPENSSL_ALGO_SHA256);
        } else {
            openssl_sign($this->getSignContent($this->options->get(), true), $sign, $string, OPENSSL_ALGO_SHA1);
        }
        return base64_encode($sign);
    }
927573
public function policyMappings(): Ext\PolicyMappingsExtension
    {
        /** @var Extension\PolicyMappingsExtension $policyMappings */
        $policyMappings = $this->get(Ext\Extension::OID_POLICY_MAPPINGS);
        return $policyMappings;
    }
1114939
public function key()
    {
        // TODO: Track position internally to avoid repeated info() calls
        if ( ! $this->useIdentifierKeys) {
            $info = $this->riakCursor->info();

            return isset($info['at']) ? $info['at'] : null;
        }

        return $this->riakCursor->key();
    }
1228156
public static function getStandard()
    {
        if (self::$standard === null) {
            $cn = self::$standardCN;
            if (!class_exists($cn, true)) {
                throw new \LogicException('The standard FS implementation not installed');
            }
            if (!is_subclass_of($cn, self::$interface)) {
                throw new \LogicException('OMG, standard FS is fake');
            }
            self::$standard = new $cn;
        }
        return self::$standard;
    }
1239557
protected function _guessForeignKey()
    {
        $name = explode('\\', $this->getEntity()->getClassName());
        $name = end($name);
        return strtolower($name) .'_id';
    }
1177734
protected function getEncryptionKey()
    {
        if ($this->encryptionKey === null) {
            $this->encryptionKey = $this->cache->get('encryptionKey');
        }
        if ($this->encryptionKey === false && file_exists(FLOW_PATH_DATA . 'Persistent/EncryptionKey')) {
            $this->encryptionKey = file_get_contents(FLOW_PATH_DATA . 'Persistent/EncryptionKey');
        }
        if ($this->encryptionKey === false) {
            $this->encryptionKey = bin2hex(Utility\Algorithms::generateRandomBytes(48));
            $this->cache->set('encryptionKey', $this->encryptionKey);
        }
        return $this->encryptionKey;
    }
1322511
public function getExtension()
    {
        $pathInfo = pathinfo($this->getName());
        $extension = ExtensionGuesser::getInstance()->guess($this->getMimeType());
        if ($extension) {
            return $extension;
        } elseif (isset($pathInfo['extension'])) {
            return $pathInfo['extension'];
        }

        return null;
    }
992582
public function getApiClient()
    {
        if (!class_exists('\\Gitlab\\Client')) {
            throw new \LogicException(__METHOD__ . ' requires package m4tthumphrey/php-gitlab-api to be installed and autoloaded'); // @codeCoverageIgnore
        }
        $client = \Gitlab\Client::create(rtrim($this->domain, '/') . self::PATH_API);

        return $client->authenticate($this->token->getToken(), Client::AUTH_OAUTH_TOKEN);
    }
599368
public function extendedKeyUsage(): Ext\ExtendedKeyUsageExtension
    {
        /** @var Extension\ExtendedKeyUsageExtension $keyUsage */
        $keyUsage = $this->get(Ext\Extension::OID_EXT_KEY_USAGE);
        return $keyUsage;
    }
226722
public function getApiKeyWithPrefix($apiKeyIdentifier)
    {
        $prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
        $apiKey = $this->getApiKey($apiKeyIdentifier);

        if ($apiKey === null) {
            return null;
        }

        if ($prefix === null) {
            $keyWithPrefix = $apiKey;
        } else {
            $keyWithPrefix = $prefix . ' ' . $apiKey;
        }

        return $keyWithPrefix;
    }
1104470
protected function _guessForeignKey()
    {
        $descriptor = Entity\Manager::getInstance()
            ->get($this->getRelatedEntity());
        $name = explode('\\', $descriptor->getEntity()->getClassName());
        $name = end($name);
        return strtolower($name) . '_id';
    }
765994
public function getIdentifier()
    {
        $identifier = $this->getFromNode()->getIdentifier() 
                    . '-'
                    . $this->getType()
                    . '-'
                    . $this->getToNode()->getIdentifier();
        
        return $identifier;
    }
259298
public function getRootId()
    {
        if (empty($this->hierarchy)) {
            throw new Exception\LogicException('The root item does not exist.');
        }

        reset($this->hierarchy);
        $id = key($this->hierarchy);

        return $id;
    }
1196980
public function get(string $oid): PolicyQualifierInfo
    {
        if (!$this->has($oid)) {
            throw new \LogicException("No $oid qualifier.");
        }
        return $this->_qualifiers[$oid];
    }