<pre>
Use this operation to get certificates on NetScaler Instance(s).
</pre>
481294
public static ns_ssl_certkey[] get(nitro_service client) throws Exception
	{
		ns_ssl_certkey resource = new ns_ssl_certkey();
		resource.validate("get");
		return (ns_ssl_certkey[]) resource.get_resources(client);
	}
118514
public static sslaction[] get(nitro_service service) throws Exception{
		sslaction obj = new sslaction();
		sslaction[] response = (sslaction[])obj.get_resources(service);
		return response;
	}
1271354
public static sslcertkey get(nitro_service service, String certkey) throws Exception{
		sslcertkey obj = new sslcertkey();
		obj.set_certkey(certkey);
		sslcertkey response = (sslcertkey) obj.get_resource(service);
		return response;
	}
1209528
public static sslvserver[] get(nitro_service service) throws Exception{
		sslvserver obj = new sslvserver();
		sslvserver[] response = (sslvserver[])obj.get_resources(service);
		return response;
	}
1175085
private Collection<? extends java.security.cert.Certificate>
        parseX509orPKCS7Cert(InputStream is)
        throws CertificateException, IOException
    {
        Collection<X509CertImpl> coll = new ArrayList<>();
        byte[] data = readOneBlock(is);
        if (data == null) {
            return new ArrayList<>(0);
        }
        try {
            PKCS7 pkcs7 = new PKCS7(data);
            X509Certificate[] certs = pkcs7.getCertificates();
            // certs are optional in PKCS #7
            if (certs != null) {
                return Arrays.asList(certs);
            } else {
                // no crls provided
                return new ArrayList<>(0);
            }
        } catch (ParsingException e) {
            while (data != null) {
                coll.add(new X509CertImpl(data));
                data = readOneBlock(is);
            }
        }
        return coll;
    }
442186
public static sslcertkey[] get(nitro_service service) throws Exception{
		sslcertkey obj = new sslcertkey();
		sslcertkey[] response = (sslcertkey[])obj.get_resources(service);
		return response;
	}
229931
public static ntpserver[] get(nitro_service service) throws Exception{
		ntpserver obj = new ntpserver();
		ntpserver[] response = (ntpserver[])obj.get_resources(service);
		return response;
	}
623935
public static sslcertkey[] get(nitro_service service, String certkey[]) throws Exception{
		if (certkey !=null && certkey.length>0) {
			sslcertkey response[] = new sslcertkey[certkey.length];
			sslcertkey obj[] = new sslcertkey[certkey.length];
			for (int i=0;i<certkey.length;i++) {
				obj[i] = new sslcertkey();
				obj[i].set_certkey(certkey[i]);
				response[i] = (sslcertkey) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
943847
public static vpnglobal_authenticationcertpolicy_binding[] get(nitro_service service) throws Exception{
		vpnglobal_authenticationcertpolicy_binding obj = new vpnglobal_authenticationcertpolicy_binding();
		vpnglobal_authenticationcertpolicy_binding response[] = (vpnglobal_authenticationcertpolicy_binding[]) obj.get_resources(service);
		return response;
	}
150254
def list_service_certificates(kwargs=None, conn=None, call=None):
    '''
    
    '''
    if call != 'function':
        raise SaltCloudSystemExit(
            'The list_service_certificates function must be called with -f or --function.'
        )

    if kwargs is None:
        kwargs = {}

    if 'name' not in kwargs:
        raise SaltCloudSystemExit('A service name must be specified as "name"')

    if not conn:
        conn = get_conn()

    data = conn.list_service_certificates(service_name=kwargs['name'])
    ret = {}
    for item in data.certificates:
        ret[item.thumbprint] = object_to_dict(item)
    return ret
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;
    }
421015
public static sslglobal_sslpolicy_binding[] get(nitro_service service) throws Exception{
		sslglobal_sslpolicy_binding obj = new sslglobal_sslpolicy_binding();
		sslglobal_sslpolicy_binding response[] = (sslglobal_sslpolicy_binding[]) obj.get_resources(service);
		return response;
	}
342963
public static sslfipskey[] get(nitro_service service, String fipskeyname[]) throws Exception{
		if (fipskeyname !=null && fipskeyname.length>0) {
			sslfipskey response[] = new sslfipskey[fipskeyname.length];
			sslfipskey obj[] = new sslfipskey[fipskeyname.length];
			for (int i=0;i<fipskeyname.length;i++) {
				obj[i] = new sslfipskey();
				obj[i].set_fipskeyname(fipskeyname[i]);
				response[i] = (sslfipskey) obj[i].get_resource(service);
			}
			return response;
		}
		return null;
	}
1088392
def cert_from_instance(instance):
    
    if instance.signature:
        if instance.signature.key_info:
            return cert_from_key_info(instance.signature.key_info,
                                      ignore_age=True)
    return []
222548
private String getCertCN(X509Certificate x509)
        throws CertificateParsingException {

        X500Principal principal = x509.getSubjectX500Principal();
        String subjectName = principal.getName();

        String[] fields = subjectName.split(",");
        for (String field : fields) {
            if (field.startsWith("CN=")) {
                String serverName = field.substring(3);
                return serverName.toLowerCase();
            }
        }

        throw new CertificateParsingException("Certificate CN not found");
    }
855272
public static sslwrapkey[] get(nitro_service service) throws Exception{
		sslwrapkey obj = new sslwrapkey();
		sslwrapkey[] response = (sslwrapkey[])obj.get_resources(service);
		return response;
	}
294610
public static mps_ssl_certkey[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception
	{
		mps_ssl_certkey obj = new mps_ssl_certkey();
		options option = new options();
		option.set_filter(filter);
		mps_ssl_certkey[] response = (mps_ssl_certkey[]) obj.getfiltered(service, option);
		return response;
	}