Examples of entryInstanceOf()


Examples of java.security.KeyStore.entryInstanceOf()

            // true if the keystore entry is a SecretKeyEntry
            boolean secretKeyEntry = false;

            // get the type of the entry to print it out
            String entryType = "Key entry";
            if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.TrustedCertificateEntry.class)) {
                entryType = "Trusted certificate entry";
                trustedEntry = true;
            } else if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.PrivateKeyEntry.class)) {
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

            String entryType = "Key entry";
            if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.TrustedCertificateEntry.class)) {
                entryType = "Trusted certificate entry";
                trustedEntry = true;
            } else if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.PrivateKeyEntry.class)) {
                entryType = "Private key entry";
            } else if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.SecretKeyEntry.class)) {
                entryType = "Secret key entry";
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

                entryType = "Trusted certificate entry";
                trustedEntry = true;
            } else if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.PrivateKeyEntry.class)) {
                entryType = "Private key entry";
            } else if (keyStore.entryInstanceOf(currentAlias,
                    KeyStore.SecretKeyEntry.class)) {
                entryType = "Secret key entry";
                secretKeyEntry = true;
            }
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

            KeytoolException, CertificateException {

        KeyStore keyStore = param.getKeyStore();
        String alias = param.getAlias();

        if (!keyStore.entryInstanceOf(alias, KeyStore.PrivateKeyEntry.class)) {
            throw new KeytoolException(
                    "Failed to generate a certificate request. \n" + "Entry <"
                            + alias + "> is not a private key entry. ");
        }
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

            if (!keyStore.containsAlias(issuerAlias)) {
                throw new KeytoolException("Certificate issuer alias <"
                        + issuerAlias + "> does not exist.");
            }

            if (!keyStore.entryInstanceOf(issuerAlias,
                    KeyStore.PrivateKeyEntry.class)) {
                throw new KeytoolException("Issuer alias <" + issuerAlias
                        + "> is not a private key entry. ");
            }
            issuerCertChain = keyStore.getCertificateChain(issuerAlias);
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

            CertificateException {

        String alias = param.getAlias();
        KeyStore keyStore = param.getKeyStore();

        if (!keyStore.entryInstanceOf(alias, KeyStore.PrivateKeyEntry.class)) {
            throw new KeytoolException("Failed to generate a certificate. "
                    + "Entry <" + alias + "> is not a private key entry");
        }

        // get the keys and the certificate from the keystore
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

            if (!keyStore.containsAlias(issuerAlias)) {
                throw new KeytoolException("Certificate issuer alias <"
                        + issuerAlias + "> does not exist.");
            }

            if (!keyStore.entryInstanceOf(issuerAlias,
                    KeyStore.PrivateKeyEntry.class)) {
                throw new KeytoolException("Issuer alias <" + issuerAlias
                        + "> is not a private key entry. ");
            }
            issuerCertChain = keyStore.getCertificateChain(issuerAlias);
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

            CertificateException {

        String alias = param.getAlias();
        KeyStore keyStore = param.getKeyStore();

        if (!keyStore.entryInstanceOf(alias, KeyStore.PrivateKeyEntry.class)) {
            throw new KeytoolException("Failed to generate a certificate. "
                    + "Entry <" + alias + "> is not a private key entry");
        }

        // get the keys and the certificate from the keystore
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

        if (store.isKeyEntry("cert") || store.isKeyEntry("CERT"))
        {
            fail("cert identified as key entry");
        }
       
        if (!store.entryInstanceOf("cert", KeyStore.TrustedCertificateEntry.class))
        {
            fail("cert not identified as TrustedCertificateEntry");
        }
       
        if (!store.entryInstanceOf("CERT", KeyStore.TrustedCertificateEntry.class))
View Full Code Here

Examples of java.security.KeyStore.entryInstanceOf()

        if (!store.entryInstanceOf("cert", KeyStore.TrustedCertificateEntry.class))
        {
            fail("cert not identified as TrustedCertificateEntry");
        }
       
        if (!store.entryInstanceOf("CERT", KeyStore.TrustedCertificateEntry.class))
        {
            fail("CERT not identified as TrustedCertificateEntry");
        }

        if (store.entryInstanceOf("cert", KeyStore.PrivateKeyEntry.class))
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.