keytool

Using custom PKCS11 provider with jarsigner

老子叫甜甜 提交于 2020-01-14 14:13:41
问题 I wrote a custom PKCS11 provider and now i want to user it via jarsigner. My command : jarsigner -verbose -keystore NONE -storetype PKCS11 -providerClass my.provider.class jar_to_sign_on.jar "key_name" And i get the following error : jarsigner error: java.lang.ClassNotFoundException: my.provider.class This is because jarsinger can't find my provider .jar implementation. When i put mt .jar in ...\Java\jdk1.8.0_31\jre\lib\ext it works perfectly. My question is : There is a way to dynamically

clientkeystore Access is denied

折月煮酒 提交于 2020-01-12 10:54:30
问题 When I want to create a keystore with keytool , I get an access denied error message. See below PS C:\Program Files\Java\jdk1.8.0_144\bin> .\keytool.exe -keystore clientkeystore -genkey -alias client Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: ... What is the name of your organizational unit? [Unknown]: ... What is the name of your organization? [Unknown]: ... What is the name of your City or Locality? [Unknown]: ... What is the name of your

Only RSAPrivate (Crt) KeySpec and PKCS8EncodedKeySpec supported for RSA private keys

橙三吉。 提交于 2020-01-12 08:38:53
问题 I following the steps from the link : How to read .pem file to get private and public key. I executed the following three commands: 1. $openssl genrsa -out mykey.pem 2048 2. $openssl pkcs8 -topk8 -inform PEM -outform PEM -in mykey.pem -out private_key.pem -nocrypt 3. $ openssl rsa -in mykey.pem -pubout -outform DER -out public_key.der This created three files, but when I was trying to read those through Java code I started facing below error: PUBLIC KEY EXPO : 65537 Only RSAPrivate(Crt

Java keyTool - append primary/secondary intermediate certificates to key store [closed]

烈酒焚心 提交于 2020-01-11 05:26:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have already created a keystore (server.jks in the image) having imported the relevant key-pair. keytool -importkeystore -srckeystore server.p12 -destkeystore server.jks -srcstoretype pkcs12 I need to append intermediate certificates to it using the java keytool. Using KeyStore explorer tool on windows, I can

Tomcat 配置SSL/TLS(https)

我的未来我决定 提交于 2020-01-11 02:15:11
1.什么是SSL/TLS TLS:Transport Layer Security 安全传输层 SSL:Secure Sockets Layer 安全接口层 SSL/TLS协议确保安全的访问web页面,它是如何做到的呢? 1.当配置了SSL/TLS后,数据在传输前将被加密,传输方在传输数据时进行加密,接收方接受数据时解密,这意味着服务器和客户端在传输数据时都会进行加密与解密操作,所以在中间截断者(抓包)即使获取到了传输内容也无法看到其内容。 2.当客户端第一次请求网页内容时会弹出一个是否添加到信任网站的页面,当你选择将该页面添加为信任页面后并继续请求访问时,服务器会请求询问该客户端是否确认授权,如果授权则允许访问。 3.SSL/TLS协议常被应用于B2B(business-to-business) 4.大多数SSL网站无需手动授权,因为这些网站经过了有公信的第三方证书授权,而这些授权信息已经添加到浏览器中了 2.SSL/TLS与Tomcat 当在tomcat服务器跑一个项目时(javaweb),配合SSL是十分有必要的。通常来说,当配置了SSL后,当服务器接只有对收到请求的进行解密操作才能看到请求内容,如果无法解密,将会返回一个错误的请求给客户端。 tomcat支持大部分加密协议和加密算法,Java语言自带加密能力(tomcat用java语言编写),通过JCE/JCA进行加密操作

tomcat配置https访问

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-09 23:59:58
tomcat配置https访问 一. 创建tomcat证书 使用JDK自带的keytool工具来生成证书: 1. 打开cmd,启动keytool 2. 在命令行中输入以下命令: keytool -genkeypair -alias " tomcat " -keyalg " RSA " -keystore "c :\tomcat.keystore " 完成后在磁盘生成tomcat.keystore文件 二. 配置tomcat服务器 定位到tomcat服务器的安装目录, 找到conf下的server.xml文件 找到如下已经被注释的代码: 1 <!-- 2 <Connector port= " 8443 " protocol= " HTTP/1.1 " SSLEnabled= " true " 3 maxThreads= " 150 " scheme= " https " secure= " true " 4 clientAuth= " false " sslProtocol= " TLS " /> 5 --> 去掉注释,修改为: 1 <Connector port= " 8443 " protocol= " HTTP/1.1 " SSLEnabled= " true " 2 maxThreads= " 150 " scheme= " https " secure= " true "

Client-Server SSL communication + Self signed certificate

邮差的信 提交于 2020-01-06 13:27:37
问题 I'm building a Java Client-Server application. The client will communicating with the Server through SSL. I want to achive that the client needs to be authenticate itself. I mean use a keystore or whatever, but this topic is really new to me. So my question would be, how can I generate a Client and a Server side Keystore (if that's what it's called) and self sign it. From here I can do the rest. What I have: keytool -genkeypair -alias test -keystore test.store -storepass StorePass -validity

Client-Server SSL communication + Self signed certificate

℡╲_俬逩灬. 提交于 2020-01-06 13:27:14
问题 I'm building a Java Client-Server application. The client will communicating with the Server through SSL. I want to achive that the client needs to be authenticate itself. I mean use a keystore or whatever, but this topic is really new to me. So my question would be, how can I generate a Client and a Server side Keystore (if that's what it's called) and self sign it. From here I can do the rest. What I have: keytool -genkeypair -alias test -keystore test.store -storepass StorePass -validity

Getting fingerprint for Android keystore certificate on Mac

故事扮演 提交于 2020-01-06 04:46:48
问题 I'm following Google's tutorial on how to set up OAuth 2.0. The documentation asks me to find the debug certificate fingerprint with the following command in the terminal: keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v This doesn't work, I get the following error: keytool error: java.lang.Exception: Only one command is allowed: both -exportcert and -list were specified. What's the correct command on a Mac? 回答1: The command provided in the tutorial

How do I do “Authenticating Your Client with Google”?

这一生的挚爱 提交于 2020-01-04 03:51:14
问题 How do I Authenticating Your Client correctly with google? I'm following this tutorial https://developers.google.com/android/guides/client-auth I copy this text into my command prompt - keytool -exportcert -list -v \ -alias androiddebugkey -keystore %USERPROFILE%.android\debug.keystore I get this message back "-alias is not recognized as an internal or external command, operable program or batch file." What am doing wrong? 回答1: The copied command shouldn't contain the backslash after -v and