<div dir="ltr">Hello Mark,<div>Thank you so much for your input. </div><div>Indeed there is not an entry for the private key, and that let me understand why i could not extract it.</div><div><br></div><div>But now the issue would become different, and I'll try to share it possibly even if the subject changes, in case i could get advice. </div><div>I needed the private key for adding it in wireshark for decoding some encrypted messages exchanged between "my" server and a client. </div><div>If the private key does not exist, how we could decode the messages?</div><div><br></div><div>Thank You!.</div><div><br></div><div>Kind regards</div><div><br></div><div> loredana</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mar 15 feb 2022 alle ore 20:30 Mark Hack <<a href="mailto:markhack@markhack.com">markhack@markhack.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="text-align:left;direction:ltr"><div><br></div><div>Use keytool -list -v to ensure that the original store actually contains a private key</div><div><br></div><div>If there is no entry of <b>Entry type: PrivateKeyEntry</b> then the store has no private key</div><div><br></div><div><br></div><div>Mark Hack</div><div><br></div><div><br></div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"></div></div></blockquote><div>On Tue, 2022-02-15 at 18:30 +0100, mary mary wrote:Hello community,</div><blockquote type="cite" style="margin:0px 0px 0px 0.8ex;border-left:2px solid rgb(114,159,207);padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div>A beginner here. </div><div><br></div><div>I would need to extract a private key, PEM or RSA format, from a keystore file ("server.keystore") which I have. <br>I've executed:</div><div><br></div><div>keytool -importkeystore -srcstorepass 123456 -srckeystore server.keystore -deststorepass 123456 -destkeystore server.p12 -deststoretype PKCS12<br><br>openssl pkcs12 -in server.p12 -passin pass:123456 -out server-key-temp.pem -nodes -nocerts<br></div><div><br></div><div>But i get an empty file: server-key-temp.pem is empty.</div><div><br></div><div>What's wrong?</div><div><br></div><div>Thank You.</div><div><br></div><div>Kind regards</div><div><br></div><div><br></div></div>
</div></div>
</blockquote></div>
</blockquote></div>