Does deleting an alias in a key store using keytool delete the private key?
<p>So if I have a public cert sat in a key store will deleting it using key tool also delete the private key information?</p>

<p>A CSR was produced and the certificate was signed using an external CA then imported. </p>

<p>I take it an Alias can be anything you make it, and deleting a certificate specified by its alias deletes the cert itself and corresponding private key? </p>

<p>Can the Alias be changed in anyway without affecting the key information? Also can the same certificate be imported under a different alias and still work (ie match up with the private key)?</p>

<p>The reason I ask is when importing the certificate I expect to see it listed as type privatekeyentry and not trustedcertentry which it is currently showing up as, not sure why.</p>

<p>The certificate us a root and inter that were previously added and showing up ok. </p>

<p>Update:</p>

<p>Thank you for the reply. So just to clarify my understanding and to make sure I've got it right, renaming an alias for a private key entry is valid as the certificate and key are held together under this one Alias. Same goes with deleting an alias for a private key entry type which will delete both the certificate and key.</p>

<p>So back to one of my original questions, can the certificate be imported again under a different alias and still match up with a private key held in the store? Based on the info id say no, it would need to use the alias as set for the private key previously.</p>

<p>I think the confusion and complexity lies in the fact the private key never leaves the key store, it's generated when a CSR is created and so is never imported at the same time as the certificate.</p>

<p>My problem is that the imported certificate is showing up as a trustedcert entry so I'm guessing it's not matching up to a private key in the store.</p>

<p>Is an alias for a private key specified when a CSR generation is performed? If that's the case is it possible importing the signed certificate under a different alias will cause the two not to match up? The only other thing I can think of is that the wrong CSR was used.</p>