List Certificate authority url information.

@param userCertificate User's own certificate.
@return AIA Locations
@throws CertificateVerificationException If an error occurs while getting the AIA locations from the certificate.
965215
public static List<String> getAIALocations(X509Certificate userCertificate)
            throws CertificateVerificationException {
        List<String> locations;
        //List the AIA locations from the certificate. Those are the URL's of CA s.
        try {
            locations = OCSPVerifier.getAIALocations(userCertificate);
        } catch (CertificateVerificationException e) {
            throw new CertificateVerificationException("Failed to find AIA locations in the cetificate", e);
        }
        return locations;
    }
275671
public String getAuthorizationUrl(final String relyingPartyIdentifier, final String wctx) {
        return String.format(getIdentityProviderUrl() + QUERYSTRING, relyingPartyIdentifier, wctx);
    }
1313477
public Certificate findCertificateById(byte[] certificateId) throws CertificateNotFoundException {
        if (certificateId == null) {
            throw new CertificateNotFoundException("Certificate with id null not found from pubFile='" + this.toString() + "'");
        }
        for (InMemoryCertificateRecord record : certificateRecords) {
            if (Arrays.equals(certificateId, record.getCertificateId())) {
                return X509CertUtil.toCert(record.getCertificate());
            }
        }
        throw new CertificateNotFoundException("Certificate with id " + Base64.encode(certificateId) + " not found from pubFile='" + this.toString() + "'");
    }
168135
protected String findCertInfo(X509Certificate[] x509certificates) throws NamingException {
        if (x509certificates != null && x509certificates.length != 0) {
            // Only ever use the first certificate, as this si the client supplied one.
            // Further ones are trust stores and CAs that have signed the first cert.
            Principal subject = x509certificates[0].getSubjectDN();
            if (subject != null && subject.getName() != null) {
                List<Rdn> rdns;
                try {
                    rdns = new LdapName(subject.getName()).getRdns();
                }
                catch (InvalidNameException ine) {
                    return null;
                }
                return certInfoExtractor.extractCertInfo(rdns);
            }
        }
        return null;
    }
474002
def getTaxCertURL(self, CorpNum, UserID):
        
        result = self._httpget('/?TG=CERT', CorpNum, UserID)
        return result.url
157993
private void verifyCert(X500Name subject,
        CertificateExtensions extensions)
        throws CertificateParsingException, IOException {

        // if SubjectName is empty, check for SubjectAlternativeNameExtension
        if (subject.isEmpty()) {
            if (extensions == null) {
                throw new CertificateParsingException("X.509 Certificate is " +
                        "incomplete: subject field is empty, and certificate " +
                        "has no extensions");
            }
            SubjectAlternativeNameExtension subjectAltNameExt = null;
            SubjectAlternativeNameExtension extValue = null;
            GeneralNames names = null;
            try {
                subjectAltNameExt = (SubjectAlternativeNameExtension)
                        extensions.get(SubjectAlternativeNameExtension.NAME);
                names = subjectAltNameExt.get(
                        SubjectAlternativeNameExtension.SUBJECT_NAME);
            } catch (IOException e) {
                throw new CertificateParsingException("X.509 Certificate is " +
                        "incomplete: subject field is empty, and " +
                        "SubjectAlternativeName extension is absent");
            }

            // SubjectAlternativeName extension is empty or not marked critical
            if (names == null || names.isEmpty()) {
                throw new CertificateParsingException("X.509 Certificate is " +
                        "incomplete: subject field is empty, and " +
                        "SubjectAlternativeName extension is empty");
            } else if (subjectAltNameExt.isCritical() == false) {
                throw new CertificateParsingException("X.509 Certificate is " +
                        "incomplete: SubjectAlternativeName extension MUST " +
                        "be marked critical when subject field is empty");
            }
        }
    }
1217515
public static AuthenticationData createAuthenticationData(Certificate[] certs, UserRegistry userRegistry) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.entry(tc, CLASS_NAME + "createAuthenticationData", certs);
        }
        AuthenticationData authData = new WSAuthenticationData();
        X509Certificate[] _certs;
        _certs = new X509Certificate[certs.length];
        for (int i = 0; i < certs.length; i++) {
            if (certs[i] instanceof X509Certificate) {
                _certs[i] = (X509Certificate) certs[i];
            } else {
                _certs = null;
                break;
            }
        }
        authData.set(AuthenticationData.CERTCHAIN, _certs);
        authData.set(AuthenticationData.REALM, getDefaultRealm(userRegistry));
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            SibTr.exit(tc, CLASS_NAME + "createAuthenticationData", authData);
        }
        return authData;
    }
800543
private function getCertificate($certificatePath)
    {
        $httpCurlRequest  = new HttpCurl($this->ipnConfig);

    $response = $httpCurlRequest->httpGet($certificatePath);

        return $response;
    }
900615
public java.util.List<Certificate> getCertificates() {
        if (certificates == null) {
            certificates = new com.amazonaws.internal.SdkInternalList<Certificate>();
        }
        return certificates;
    }
751909
private IAuthorizationPrincipal getAuthorizationPrincipal(Authentication authentication) {

        final Object authPrincipal = authentication.getPrincipal();
        logger.trace("getAuthorizationPrincipal -- authPrincipal=[{}]", authPrincipal);

        String username;
        if (authPrincipal instanceof UserDetails) {
            // User is authenticated
            UserDetails userDetails = (UserDetails) authPrincipal;
            logger.trace(
                    "getAuthorizationPrincipal -- AUTHENTICATED, userDetails=[{}]", userDetails);
            username = userDetails.getUsername();
        } else {
            // Which guest user are we?
            final HttpServletRequest req = portalRequestUtils.getCurrentPortalRequest();
            final IPerson person = personManager.getPerson(req);
            logger.trace("getAuthorizationPrincipal -- UNAUTHENTICATED, person=[{}]", person);
            username = person.getUserName();
        }

        return authorizationServiceFacade.newPrincipal(username, IPerson.class);
    }
1125251
private function _verifyIssuer(): Certificate
    {
        $path = $this->_config->issuerPath();
        $config = PathValidationConfig::defaultConfig()->withMaxLength(
            count($path))->withDateTime($this->_config->evaluationTime());
        try {
            $issuer = $path->validate($config, $this->_crypto)->certificate();
        } catch (PathValidationException $e) {
            throw new ACValidationException(
                "Failed to validate issuer PKC's certification path.", 0, $e);
        }
        if (!$this->_ac->isIssuedBy($issuer)) {
            throw new ACValidationException("Name mismatch of AC's issuer PKC.");
        }
        $pubkey_info = $issuer->tbsCertificate()->subjectPublicKeyInfo();
        if (!$this->_ac->verify($pubkey_info, $this->_crypto)) {
            throw new ACValidationException("Failed to verify signature.");
        }
        return $issuer;
    }
1051813
private function _validateHolder(): Certificate
    {
        $path = $this->_config->holderPath();
        $config = PathValidationConfig::defaultConfig()->withMaxLength(
            count($path))->withDateTime($this->_config->evaluationTime());
        try {
            $holder = $path->validate($config, $this->_crypto)->certificate();
        } catch (PathValidationException $e) {
            throw new ACValidationException(
                "Failed to validate holder PKC's certification path.", 0, $e);
        }
        if (!$this->_ac->isHeldBy($holder)) {
            throw new ACValidationException("Name mismatch of AC's holder PKC.");
        }
        return $holder;
    }
128819
public List<UserIdentification> listByUserAndAuthSource(User user, AuthSource authSource) {
    EntityManager entityManager = getEntityManager(); 
    
    CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();
    CriteriaQuery<UserIdentification> criteria = criteriaBuilder.createQuery(UserIdentification.class);
    Root<UserIdentification> root = criteria.from(UserIdentification.class);
    criteria.select(root);
    criteria.where(
        criteriaBuilder.and(
            criteriaBuilder.equal(root.get(UserIdentification_.user), user),
            criteriaBuilder.equal(root.get(UserIdentification_.authSource), authSource)
        )
    );
    
    return entityManager.createQuery(criteria).getResultList();
  }
530844
public X509Certificate[] getAcceptedIssuers() {
        try {
            Collection<X509Certificate> trusted = CertificateLoadUtil.getTrustedCertificates(
                    this.parameters.getTrustStore(), null);
            return trusted.toArray(new X509Certificate[trusted.size()]);
        } catch (KeyStoreException e) {
            logger.warn("Unable to load trusted Certificates.  Authentication will fail.",e);
            return new X509Certificate[]{};
        }
    }
1322031
public X509CRLEntry getRevokedCertificate(X509Certificate cert) {
        if (revokedMap.isEmpty()) {
            return null;
        }
        X509IssuerSerial issuerSerial = new X509IssuerSerial(cert);
        return revokedMap.get(issuerSerial);
    }
558574
public Map<String, Object> verifyCredentials(SocialLoginConfig config, String accessToken, @Sensitive String accessTokenSecret) {

        String endpointUrl = config.getUserApi();
        try {
            SocialUtil.validateEndpointWithQuery(endpointUrl);
        } catch (SocialLoginException e) {
            return createErrorResponse("TWITTER_BAD_USER_API_URL", new Object[] { endpointUrl, TwitterLoginConfigImpl.KEY_userApi, config.getUniqueId(), e.getLocalizedMessage() });
        }

        tokenSecret = accessTokenSecret;
        requestMethod = "GET";

        // Create the Authorization header string necessary to authenticate the request
        String authzHeaderString = createAuthzHeaderForVerifyCredentialsEndpoint(endpointUrl, accessToken);
        if (tc.isDebugEnabled()) {
            Tr.debug(tc, "Authz header string: " + authzHeaderString);
        }

        return executeRequest(config, requestMethod, authzHeaderString, endpointUrl, TwitterConstants.TWITTER_ENDPOINT_VERIFY_CREDENTIALS, null);
    }
721560
public ServiceFuture<List<CertificateItem>> listCertificatesAsync(final String vaultBaseUrl,
            final ListOperationCallback<CertificateItem> serviceCallback) {
        return getCertificatesAsync(vaultBaseUrl, serviceCallback);
    }