Query the signer chain set on this context.

@return X509Certificate[] - null if not set
337772
public X509Certificate[] getSignerChain() {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "getSignerChain");
        return signer == null ? null : signer.clone();
    }
11384
private function getAssignedValue()
    {
        $this->match(DocLexer::T_IDENTIFIER);

        $tokens = array(
            array(DocLexer::T_IDENTIFIER, $this->lexer->token['value']),
            array(DocLexer::T_EQUALS),
        );

        $this->match(DocLexer::T_EQUALS);

        return array_merge($tokens, $this->getPlainValue());
    }
749873
private List<Certificate> convertToBouncyCastleCertificate(
      X509Certificate[] chain)
  {
    final List<Certificate> bcChain = new ArrayList<>();
    for (X509Certificate cert : chain)
    {
      try
      {
        bcChain.add(Certificate.getInstance(cert.getEncoded()));
      }
      catch (CertificateEncodingException ex)
      {
        throw new RuntimeException("Failed to decode the certificate DER data");
      }
    }
    return bcChain;
  }
287213
public List<TemplateRole> getSignerRoles() {
        List<TemplateRole> masterList = getList(TemplateRole.class, TEMPLATE_SIGNER_ROLES);
        if (masterList == null || masterList.size() == 0) {
            return masterList;
        }
        if (masterList.get(0).getOrder() == null) {
            return masterList;
        }
        List<TemplateRole> sortedList = new ArrayList<TemplateRole>(masterList.size());
        for (TemplateRole r : masterList) {
            sortedList.add(r.getOrder(), r);
        }
        return sortedList;
    }
1046785
public static X500Principal[] getIssuerDNsFromChain(List<X509Certificate> chain)
	{
		if (chain == null || chain.isEmpty())
			throw new IllegalArgumentException("Must provide a chain that is non-null and non-empty");

		// Given a chain of n, there are n-1 values for "issuers" and 1 "subject"
		final X500Principal[] issuers = new X500Principal[chain.size() - 1]; // Allocate array of n-1 for issuers

		for (int i = 0; i < issuers.length; i++)
		{
			final X509Certificate certificate = chain.get(i);
			final X500Principal subject = certificate.getSubjectX500Principal();

			issuers[i] = subject;
		}

		return issuers;
	}
299249
public function getCharacterCorporations()
    {

        // TODO : rewrite the method according to the new ACL mechanic

        $user = auth()->user();

        $corporations = ApiKeyInfoCharacters::join(
            'eve_api_keys',
            'eve_api_keys.key_id', '=',
            'account_api_key_info_characters.keyID')
            ->distinct();

        // If the user us a super user, return all
        if (! $user->hasSuperUser()) {

            $corporations = $corporations->orWhere(function ($query) use ($user) {

                // If the user has any affiliations and can
                // list those characters, add them
                if ($user->has('character.list', false))
                    $query = $query->whereIn('characterID',
                        array_keys($user->getAffiliationMap()['char']));

                // Add any characters from owner API keys
                $query->orWhere('eve_api_keys.user_id', $user->id);
            });
        }

        return $corporations->orderBy('corporationName')
            ->pluck('corporationName');
    }
649973
public SigningPolicy[] getSigningPolicies() {
        if (this.policyDNMap == null) {
            return null;
        }
        Collection values = this.policyDNMap.values();
        return (SigningPolicy[]) this.policyDNMap.values().toArray(new SigningPolicy[values.size()]);
    }
772655
public function getJwtVerificationKeys()
    {
        $factory = $this->getRequestFactory();
        $request = $factory->getRequestWithOptions('get', 'https://login.windows.net/common/discovery/keys', []);

        $response = $this->getParsedResponse($request);

        $keys = [];
        foreach ($response['keys'] as $i => $keyinfo) {
            if (isset($keyinfo['x5c']) && is_array($keyinfo['x5c'])) {
                foreach ($keyinfo['x5c'] as $encodedkey) {
                    $cert =
                        '-----BEGIN CERTIFICATE-----' . PHP_EOL
                        . chunk_split($encodedkey, 64,  PHP_EOL)
                        . '-----END CERTIFICATE-----' . PHP_EOL;

                    $cert_object = openssl_x509_read($cert);

                    if ($cert_object === false) {
                        throw new \RuntimeException('An attempt to read ' . $encodedkey . ' as a certificate failed.');
                    }

                    $pkey_object = openssl_pkey_get_public($cert_object);

                    if ($pkey_object === false) {
                        throw new \RuntimeException('An attempt to read a public key from a ' . $encodedkey . ' certificate failed.');
                    }

                    $pkey_array = openssl_pkey_get_details($pkey_object);

                    if ($pkey_array === false) {
                        throw new \RuntimeException('An attempt to get a public key as an array from a ' . $encodedkey . ' certificate failed.');
                    }

                    $publicKey = $pkey_array ['key'];

                    $keys[$keyinfo['kid']] = $publicKey;
                }
            }
        }

        return $keys;
    }
716762
protected function getTokenFromCache()
    {
        if (!$this->cache || !$this->cache->hasItem(self::TOKEN_CACHE_KEY)) {
            return null;
        }

        /** @var Token $token */
        $token = $this->cache->getItem(self::TOKEN_CACHE_KEY)->get();

        if (!$token || !$token->getAuth()) {
            $this->logger->debug('No token in cache or auth is empty, returning null.');

            return null;
        }

        // invalidate token
        if ($this->isTokenExpired($token)) {
            $this->logger->debug('Token is expired.');

            $this->writeTokenInfoToDebugLog();

            return null;
        }

        return $token;
    }
792978
@Override
    public X509Certificate[] getCertificateChain(String s) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.entry(tc, "getCertificateChain: " + s);

        X509Certificate[] rc = getX509KeyManager().getCertificateChain(s);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            Tr.exit(tc, "getCertificateChain", rc);
        return rc;
    }
581720
public function getCertificacion()
    {
        $datos = $this->getDatos();
        $idk = !empty($datos['TED']['DD']['CAF']['DA']['IDK']) ? (int)$datos['TED']['DD']['CAF']['DA']['IDK'] : null;
        return $idk ? $idk === 100 : null;
    }
80467
private Collection<String> getCertServerNames(X509Certificate x509)
        throws CertificateParsingException {

        Collection<String> serverNames = new LinkedHashSet<>();

        /* Add CN for the certificate */
        String certCN = getCertCN(x509);
        serverNames.add(certCN);

        /* Add alternative names for each certificate */
        try {
            Collection<List<?>> altNames = x509.getSubjectAlternativeNames();
            if (altNames != null) {
                for (List<?> entry : altNames) {
                    if (entry.size() >= 2) {
                        Object entryType = entry.get(0);
                        if (entryType instanceof Integer &&
                            (Integer) entryType == 2) {

                            Object field = entry.get(1);
                            if (field instanceof String) {
                                serverNames.add(((String) field).toLowerCase());
                            }
                        }
                    }
                }
            }

        } catch (CertificateParsingException cpe) {
            LOGGER.warn("Certificate alternative names ignored for certificate " + (certCN != null ? " " + certCN : ""), cpe);
        }

        return serverNames;
    }
657198
@Override
    public Callback[] getRequiredCallbacks(CallbackHandler callbackHandler) throws IOException, UnsupportedCallbackException {
        Callback[] callbacks = new Callback[1];
        callbacks[0] = new WSX509CertificateChainCallback(null);

        callbackHandler.handle(callbacks);
        return callbacks;
    }
343178
public function findAllIdentifiers(): array
    {
        $queryBuilder = $this->createQuery();
        $rows = $queryBuilder->select('identifier')
            ->from($this->getTableName())
            ->groupBy('identifier')
            ->execute()
            ->fetchAll();

        $cacheIdentifiers = [];
        foreach ($rows as $row) {
            $cacheIdentifiers[] = $row['identifier'];
        }

        return $cacheIdentifiers;
    }
165335
public function getListOfAuthorizations()
    {
        if (0 === count($this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE])) {
            return null;
        }

        return $this->idLists[IAmazonReferenceId::TYPE_AUTHORIZE];
    }
1099696
public function getRootEntities()
    {
        $entities = [];

        foreach ($this->dqlParts['from'] as &$fromClause) {
            if (is_string($fromClause)) {
                $spacePos = strrpos($fromClause, ' ');
                $from     = substr($fromClause, 0, $spacePos);
                $alias    = substr($fromClause, $spacePos + 1);

                $fromClause = new Query\Expr\From($from, $alias);
            }

            $entities[] = $fromClause->getFrom();
        }

        return $entities;
    }
1305948
public function getRequiredOptions()
    {
        if (! $this->required) {
            return null;
        }

        if ($this->required instanceof ConfigInterface) {
            return $this->required->getArrayCopy();
        }

        return (array)$this->required;
    }