<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Archiwa keystore - soban</title>
	<atom:link href="https://soban.pl/category/keystore/feed/" rel="self" type="application/rss+xml" />
	<link>https://soban.pl/category/keystore/</link>
	<description>IT, Linux, Servers, Security</description>
	<lastBuildDate>Sat, 25 Feb 2023 22:20:07 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>keytools add new alias to keystor (jceks) and delete old</title>
		<link>https://soban.pl/keytools-add-new-alias-pem-and-delete-old/</link>
		
		<dc:creator><![CDATA[soban]]></dc:creator>
		<pubDate>Wed, 13 Oct 2021 12:48:16 +0000</pubDate>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[keystore]]></category>
		<category><![CDATA[keytool]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<guid isPermaLink="false">https://soban.pl/?p=119</guid>

					<description><![CDATA[<p>Java Keytool is a command-line tool that is used for managing cryptographic keys, certificates, and keystores in Java-based applications. In Linux, Java Keytool is often used for managing SSL/TLS certificates and securing web applications that run on Java-based servers like Tomcat, GlassFish, and JBoss. Some of the key features of Java Keytool in Linux include: [&#8230;]</p>
<p>Artykuł <a href="https://soban.pl/keytools-add-new-alias-pem-and-delete-old/">keytools add new alias to keystor (jceks) and delete old</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Java Keytool is a command-line tool that is used for managing cryptographic keys, certificates, and keystores in Java-based applications. In Linux, Java Keytool is often used for managing SSL/TLS certificates and securing web applications that run on Java-based servers like Tomcat, GlassFish, and JBoss.</p>



<p>Some of the key features of Java Keytool in Linux include:</p>



<ol class="wp-block-list">
<li>Generating key pairs: Java Keytool can be used to generate key pairs, which are used for encryption, decryption, and digital signatures.</li>



<li>Importing and exporting certificates: Java Keytool can import and export certificates, which are used for verifying the authenticity of digital signatures and ensuring secure communications.</li>



<li>Managing keystores: Java Keytool can create, modify, and delete keystores, which are containers for cryptographic keys and certificates.</li>



<li>Configuring SSL/TLS: Java Keytool can be used to configure SSL/TLS connections for Java-based web applications, which are essential for securing data communications.</li>
</ol>



<p>Some of the most commonly used Java Keytool commands in Linux include:</p>



<ul class="wp-block-list">
<li>keytool -genkeypair: This command is used to generate a new key pair.</li>



<li>keytool -import: This command is used to import a certificate into a keystore.</li>



<li>keytool -list: This command is used to list the contents of a keystore.</li>



<li>keytool -delete: This command is used to delete a key or certificate from a keystore.</li>
</ul>



<p>Overall, Java Keytool is an important tool for managing cryptographic keys and certificates in Java-based applications in Linux, and it is essential for securing web applications and ensuring the privacy and integrity of sensitive information.</p>



<p>Before we begin make copy of old keystor like this:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">$ cp /path/to/keystore.jceks cp /path/to/keystore.jceks.backup.$(date +%F)</pre></div>



<p>and then we can remove alias:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">$ /opt/java/bin/keytool -delete -alias name_alias  -keystore /path/to/keystore.jceks -storetype JCEKS</pre></div>



<p>when you gonna add new alias by keytool:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">$ /opt/java/bin/keytool -import -file /path/to/cert.pem  -alias mc -keystore /path/to/keystore.jceks</pre></div>



<p>To be sure, you can check it and see more information like date or fingerprint:</p>



<div class="wp-block-urvanov-syntax-highlighter-code-block"><pre class="urvanov-syntax-highlighter-plain-tag">$ /opt/java/bin/keytool -list -keystore /path/to/keystore.jceks -storetype JCEKS -v | less</pre></div>



<p>When sometings go wrong, you can also copy backup file.</p>



<p>Good luck!</p>
<p>Artykuł <a href="https://soban.pl/keytools-add-new-alias-pem-and-delete-old/">keytools add new alias to keystor (jceks) and delete old</a> pochodzi z serwisu <a href="https://soban.pl">soban</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
