Package java.security

Examples of java.security.GeneralSecurityException


     */
    protected PKIXBuilderParameters getPKIXBuilderParameters(PKIXValidationInformation validationInfo,
            X509Credential untrustedCredential) throws GeneralSecurityException {
        Set<TrustAnchor> trustAnchors = getTrustAnchors(validationInfo);
        if (trustAnchors == null || trustAnchors.isEmpty()) {
            throw new GeneralSecurityException(
                    "Unable to validate X509 certificate, no trust anchors found in the PKIX validation information");
        }

        X509CertSelector selector = new X509CertSelector();
        selector.setCertificate(untrustedCredential.getEntityCertificate());
View Full Code Here


                        {
                            serverInstance = createBougusServerSSLContext();
                        }
                        catch (Exception ioe)
                        {
                            throw new GeneralSecurityException(
                                    "Can't create Server SSLContext:" + ioe);
                        }
                    }
                }
            }
View Full Code Here

        int sessionTimeoutInt = Integer.parseInt(this.parsePropertyValue(sessionTimeout));
       
        if (sessionContext != null) {
            sessionContext.setSessionTimeout(sessionTimeoutInt);
        } else {
            throw new GeneralSecurityException(
                    "The SSLContext does not support SSLSessionContext, "
                            + "but a session timeout is configured. Set sessionTimeout to null "
                            + "to avoid this error.");
        }
    }
View Full Code Here

                        {
                            serverInstance = createBougusServerSSLContext();
                        }
                        catch( Exception ioe )
                        {
                            throw new GeneralSecurityException(
                                    "Can't create Server SSLContext:" + ioe );
                        }
                    }
                }
            }
View Full Code Here

                        {
                            serverInstance = createBougusServerSSLContext();
                        }
                        catch( Exception ioe )
                        {
                            throw new GeneralSecurityException(
                                    "Can't create Server SSLContext:" + ioe );
                        }
                    }
                }
            }
View Full Code Here

                        {
                            serverInstance = createBougusServerSSLContext();
                        }
                        catch( Exception ioe )
                        {
                            throw new GeneralSecurityException(
                                    "Can't create Server SSLContext:" + ioe );
                        }
                    }
                }
            }
View Full Code Here

        case MAC:
            return new MacDigestManager(ledgerId, passwd);
        case CRC32:
            return new CRC32DigestManager(ledgerId);
        default:
            throw new GeneralSecurityException("Unknown checksum type: " + digestType);
        }
    }
View Full Code Here

    /**
     * Test for <code>GeneralSecurityException()</code> constructor Assertion:
     * constructs GeneralSecurityException with no detail message
     */
    public void testGeneralSecurityException01() {
        GeneralSecurityException tE = new GeneralSecurityException();
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    }
View Full Code Here

     * Test for <code>GeneralSecurityException(String)</code> constructor
     * Assertion: constructs GeneralSecurityException with detail message msg.
     * Parameter <code>msg</code> is not null.
     */
    public void testGeneralSecurityException02() {
        GeneralSecurityException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new GeneralSecurityException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);
            assertNull("getCause() must return null", tE.getCause());
        }
    }
View Full Code Here

     * Assertion: constructs GeneralSecurityException when <code>msg</code> is
     * null
     */
    public void testGeneralSecurityException03() {
        String msg = null;
        GeneralSecurityException tE = new GeneralSecurityException(msg);
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    }
View Full Code Here

TOP

Related Classes of java.security.GeneralSecurityException

Copyright © 2018 www.massapicom. 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.