X509CertSelector setSubject - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for X509CertSelector setSubject method.

This code example shows how to use the following methods:setCertificate, setSubject
This code example shows how to use the following methods:setSubject
        X509CertSelector selector = new X509CertSelector();
        // with BC as provider for the factory, this fails if i do getSubjectDN().toString() 
        selector.setSubject(cert.getSubjectX500Principal());
        assertEquals(1, store.engineGetCertificates(selector).size());
 
        X509CertSelector certSelector = new X509CertSelector();
        certSelector.setSubject("CN=non-existent");
        assertEquals(0, store.engineGetCertificates(certSelector).size());
         
    } 
 
} 
6
CodeRank
This code example shows how to use the following methods:setSubject
This code example shows how to use the following methods:setCertificate, setSubject
This code example shows how to use the following methods:setCertificate, setSubject
This code example shows how to use the following methods:setSubject
This code example shows how to use the following methods:setCertificate, setSubject
This code example shows how to use the following methods:setBasicConstraints, setSubject
 
    /** 
     * {@inheritDoc} 
     */ 
	protected Collection<X509CertSelector> getIssuerSelectors(byte[] subjectDN) {
		X509CertSelector caSelector = new X509CertSelector();
        caSelector.setBasicConstraints(0);
        try { 
            caSelector.setSubject(subjectDN);
        } catch (IOException e) {
            // shut up 
        } 
         
		return Arrays.asList(caSelector);
	} 
 
	/** 
     * {@inheritDoc} 
     */ 
	protected Collection<X509CertSelector> getSignerSelectors() {
5
CodeRank
This code example shows how to use the following methods:setBasicConstraints, setSubject
 
	/** 
     	 * {@inheritDoc} 
     	 */ 
	protected Collection<X509CertSelector> getIssuerSelectors(byte[] subjectDN) {
		X509CertSelector caSelector = new X509CertSelector();
		caSelector.setBasicConstraints(0);
		try { 
            		caSelector.setSubject(subjectDN);
		} catch (IOException e) {
            		// Do nothing 
        	} 
		return Arrays.asList(caSelector);
	} 
 
	/** 
     	 * {@inheritDoc} 
     	 */ 
	protected Collection<X509CertSelector> getSignerSelectors() {
		X509CertSelector digSigSelector = new X509CertSelector();
5
CodeRank
This code example shows how to use the following methods:setCertificate, setSubject
setSubject Method Overview
Sets the subject criterion.
See Code Examples for other Java 8 X509CertSelector Methods: