/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }
/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Compares the specified {@code Identity} with this {@code Identity} for * equality and returns {@code true} if the specified object is equal, * {@code false} otherwise. * <p> * To be equal, two {@code Identity} objects need to have the same name and * the same public keys. * * @param identity * the identity to check for equality. * @return {@code true} if the {@code Identity} objects are equal, {@code * false} otherwise. */ protected boolean identityEquals(Identity identity) { if (!name.equals(identity.name)) { return false; } if (publicKey == null) { return (identity.publicKey == null); } return checkKeysEqual(publicKey, identity.publicKey); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }
/** * Adds a {@code Certificate} to this {@code Identity}. * * @param certificate * the {@code Certificate} to be added to this {@code Identity}. * @throws KeyManagementException * if the certificate is not valid. */ public void addCertificate(Certificate certificate) throws KeyManagementException { PublicKey certPK = certificate.getPublicKey(); if (publicKey != null) { if (!checkKeysEqual(publicKey, certPK)) { throw new KeyManagementException("Cert's public key does not match Identity's public key"); } } else { publicKey = certPK; } if (certificates == null) { certificates = new Vector<Certificate>(); } certificates.add(certificate); }