keystore

Azure Java SDK: ServiceException: ForbiddenError:

◇◆丶佛笑我妖孽 提交于 2019-12-31 06:48:00
问题 Tried the basic location retriever code (shown below) String uri = "https://management.core.windows.net/"; String subscriptionId = "XXXXXXXX-5fad-XXXXXX-9dfa-XXXXXX"; String keyStoreLocation = "D:\\test.jks"; String keyStorePassword = "123456"; Configuration config = ManagementConfiguration.configure( new URI(uri), subscriptionId, keyStoreLocation, // the file path to the JKS keyStorePassword, // the password for the JKS KeyStoreType.jks // flags that I'm using a JKS keystore );

Tomcat 7 and invalid keystore format

余生颓废 提交于 2019-12-31 06:06:06
问题 I'm trying to connect to Tomcat through https on a remote server; I've found many answers, but no one has worked for me; I'm using Apache, Tomcat 7 on Ubuntu Server 14.04. First, I created the certificate keystore writing: keytool -genkey -alias tomcat -keyalg RSA after I' ve edited "/etc/tomcat7/server.xml" to use ssl on port 8443: <Connector port="8443" SSLEnabled="true" protocol="org.apache.coyote.http11.Http11Protocol" keystoreType="JKS" maxThreads="150" scheme="https" secure="true"

Tomcat 7 and invalid keystore format

为君一笑 提交于 2019-12-31 06:04:49
问题 I'm trying to connect to Tomcat through https on a remote server; I've found many answers, but no one has worked for me; I'm using Apache, Tomcat 7 on Ubuntu Server 14.04. First, I created the certificate keystore writing: keytool -genkey -alias tomcat -keyalg RSA after I' ve edited "/etc/tomcat7/server.xml" to use ssl on port 8443: <Connector port="8443" SSLEnabled="true" protocol="org.apache.coyote.http11.Http11Protocol" keystoreType="JKS" maxThreads="150" scheme="https" secure="true"

How to store and reuse keypair in Java?

孤街浪徒 提交于 2019-12-30 08:17:21
问题 I am wanting generate a keypair once and reuse it. public static KeyPair generateKeyPair() throws Exception { KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); generator.initialize(2048, new SecureRandom()); KeyPair pair = generator.generateKeyPair(); return pair; } How do I go about this? 回答1: There is a bit of a problem here: Java's focus is almost entirely on TLS and the cryptography required to implement TLS. For TLS a private key and a certificate is required. So you get

How to store and reuse keypair in Java?

邮差的信 提交于 2019-12-30 08:17:08
问题 I am wanting generate a keypair once and reuse it. public static KeyPair generateKeyPair() throws Exception { KeyPairGenerator generator = KeyPairGenerator.getInstance("RSA"); generator.initialize(2048, new SecureRandom()); KeyPair pair = generator.generateKeyPair(); return pair; } How do I go about this? 回答1: There is a bit of a problem here: Java's focus is almost entirely on TLS and the cryptography required to implement TLS. For TLS a private key and a certificate is required. So you get

wrong version keystore when doing https call

主宰稳场 提交于 2019-12-30 08:04:57
问题 Hello fellow android coders. I'm trying to do a https secure call from my android code. The call goes fine on the emulator but on the actual Samsung Galaxy device I get a SSL error. I used crazy bobs method for handling the cetificate. Here is crazy bobs link: http://blog.crazybob.org/2010/02/android-trusting-ssl-certificates.html. Problem is I get an error: "wrong version of keystore" inside the custom SSLSocketFactory object. Any suggestions on what to do to fix this? Thanks. 回答1: Did you

I'm having trouble getting SHA1 certificate with keytool

让人想犯罪 __ 提交于 2019-12-30 02:43:12
问题 I'm trying to find the SHA1 hash of my signature key store on macos sierra using the following comand: keytool -exportcert -alias androiddebugkey -keystore $HOME/.android/debug.keystore -list -v -storepass android The result looks like below: Alias ​​name: androiddebugkey Date of creation: Oct 25, 2017 Input Type: PrivateKeyEntry Length of certificate chain: 1 Certificate [1]: keytool error: java.util.IllegalFormatConversionException: d != java.lang.String java.util

trusted certificate entries are not password-protected java

℡╲_俬逩灬. 提交于 2019-12-29 09:59:11
问题 I have a .cer file provided from some other party. I need to create a saml credential with this .cer file. For this, I imported .cer file to jks file using following command. ( Password is same as password. It asked from prompt to accept certificate. I gave y then it said certificate is added to keystore ) keytool -importcert -file xyz.cer -keystore test.jks -alias "testsp" Then I used this jks file to create credential as below. private Credential getCredential() { KeyStore keystore =

Which is the default location for keystore/truststore of Java applications?

风格不统一 提交于 2019-12-29 04:27:07
问题 I am writing an application that uses SSL. Hence, I have a dummy keystore and a dummy truststore I want to supply to my customer. Is there any default folder to put them inside my distribution? e.g. docs, lib, bin...etc. Where is usually the keystore put on the server and where is usually truststore put on the client? Thanks 回答1: In Java, according to the JSSE Reference Guide, there is no default for the keystore , the default for the truststore is " jssecacerts, if it exists. Otherwise,

Setting multiple truststore on the same JVM

谁说我不能喝 提交于 2019-12-28 04:09:06
问题 I have an Java application running on a weblogic server. The application has two distinct modules which use SSL to connect to external web services - let's say module A and module B. Module A - Built on Axis - Uses truststore A Moudle B - Built on Spring-ws - Uses truststore B. Module A is existing. Module B is being introduced. I need to be able to set the truststore dynamically in the JVM based on which module is being invoked. Due to some constraints I do not have the option - to create a