equal
deleted
inserted
replaced
183 /* Should we throw an exception if this is already set? */ |
183 /* Should we throw an exception if this is already set? */ |
184 public void setPublicKey(PublicKey key) throws KeyManagementException { |
184 public void setPublicKey(PublicKey key) throws KeyManagementException { |
185 |
185 |
186 check("setIdentityPublicKey"); |
186 check("setIdentityPublicKey"); |
187 this.publicKey = key; |
187 this.publicKey = key; |
188 certificates = new Vector<Certificate>(); |
188 certificates = new Vector<>(); |
189 } |
189 } |
190 |
190 |
191 /** |
191 /** |
192 * Specifies a general information string for this identity. |
192 * Specifies a general information string for this identity. |
193 * |
193 * |
246 throws KeyManagementException { |
246 throws KeyManagementException { |
247 |
247 |
248 check("addIdentityCertificate"); |
248 check("addIdentityCertificate"); |
249 |
249 |
250 if (certificates == null) { |
250 if (certificates == null) { |
251 certificates = new Vector<Certificate>(); |
251 certificates = new Vector<>(); |
252 } |
252 } |
253 if (publicKey != null) { |
253 if (publicKey != null) { |
254 if (!keyEquals(publicKey, certificate.getPublicKey())) { |
254 if (!keyEquals(publicKey, certificate.getPublicKey())) { |
255 throw new KeyManagementException( |
255 throw new KeyManagementException( |
256 "public key different from cert public key"); |
256 "public key different from cert public key"); |