keystore

Java's keytool command with IP addresses

允我心安 提交于 2019-12-01 08:56:14
问题 I'm trying to get an image via an https URL, and am having some problems. I generate a keystore with Java's keytool command. If I specify the common name (CN) equal to my hostname, such as CN=JONMORRA, and then try to query via my hostname, such as https://JONMORRA:8443/ then it works fine. However, if I specify the common name as my ip address, such that CN=192.168.56.1, and try to query via my ip address, such as https://192.168.56.1:8443/ then I get an error HTTPS hostname wrong: should be

asp.net keystore for password storage?

我们两清 提交于 2019-12-01 08:10:19
I know that encrypted passwords can be stored in the web.config or hashed and salted passwords can be stored in a database, but is it possible to store passwords in something like a keystore? Would a keystore even be a good idea to store 'service account' passwords that are needed by an application? The closest analogue to a Java keystore in .NET/Windows world is DPAPI ( http://en.wikipedia.org/wiki/Data_Protection_API ). It stores encrypted values in the Windows registry, with the encryption key derived from system or user account level secrets. It is in fairly wide use, though a paper was

asp.net keystore for password storage?

亡梦爱人 提交于 2019-12-01 07:12:33
问题 I know that encrypted passwords can be stored in the web.config or hashed and salted passwords can be stored in a database, but is it possible to store passwords in something like a keystore? Would a keystore even be a good idea to store 'service account' passwords that are needed by an application? 回答1: The closest analogue to a Java keystore in .NET/Windows world is DPAPI (http://en.wikipedia.org/wiki/Data_Protection_API). It stores encrypted values in the Windows registry, with the

How to remove just one certificate from a certificate chain in a Java keystore

半世苍凉 提交于 2019-12-01 05:21:24
I have a Tomcat server with a certificate chain for HTTPS stored in a Java keystore. The chain includes the self-signed root CA certificate. Although this is apparently okay by the TLS spec , some validation services warn about it, and it's probably better to leave it off . How can I edit the keystore to remove just the self-signed root CA certificate, but leave the rest of the chain and the private key intact? First, convert the keystore from JKS to PKCS12 (this and other commands will require password entry): keytool -importkeystore -srckeystore old.jks -destkeystore old.p12 -deststoretype

wrong version keystore when doing https call

北慕城南 提交于 2019-12-01 03:03:06
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. Did you create your keystore with the Bouncy Castle format? All these 3 parameters are mandatory when creating the

spring-boot executable war keystore not found

吃可爱长大的小学妹 提交于 2019-12-01 02:43:42
问题 I build spring-boot executable war with ssl support. My application.properties file is: server.port = 8443 server.ssl.key-store = classpath:keystore.jks server.ssl.key-store-password = secret server.ssl.key-password = another-secret WAR file contains 'keystore.jks' file. But I get strange exception: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Could

How to remove just one certificate from a certificate chain in a Java keystore

a 夏天 提交于 2019-12-01 02:22:19
问题 I have a Tomcat server with a certificate chain for HTTPS stored in a Java keystore. The chain includes the self-signed root CA certificate. Although this is apparently okay by the TLS spec, some validation services warn about it, and it's probably better to leave it off. How can I edit the keystore to remove just the self-signed root CA certificate, but leave the rest of the chain and the private key intact? 回答1: First, convert the keystore from JKS to PKCS12 (this and other commands will

AndroidKeyStore getEntry is consistently failing after certain point

霸气de小男生 提交于 2019-12-01 01:15:29
i am using the AndroidKeyStore to generate a RSA key pair, which are used to encrypt/decrypt the internal data. The code which does that is as follows - it tries to retrieve the existing RSA key pair (via an alias ). If none exists then it tries to generate a new one. the code is as - private void initializePublicPrivateKeys(){ try { KeyStore keyStore = KeyStore.getInstance("AndroidKeyStore"); keyStore.load(null); KeyStore.PrivateKeyEntry entry = (KeyStore.PrivateKeyEntry) keyStore.getEntry(APP_RSA_KEY_PAIR_SECRET_ALIAS, null); _app_privateRSAKey = entry.getPrivateKey(); _app_publicRSAKey =

Keystore does not work on Java 9

倖福魔咒の 提交于 2019-11-30 22:30:32
I've converted a JKS keystore to the P12 format using portecle, but it probably didn't go well. The keystore works with Java 8 (various versions), but with Java 9 (OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode), I'm getting java.io.IOException: Invalid keystore format at sun.security.provider.JavaKeyStore.engineLoad(java.base@9-internal/JavaKeyStore.java:659) at sun.security.util.KeyStoreDelegator.engineLoad(java.base@9-internal/KeyStoreDelegator.java:219) at java.security.KeyStore.load(java.base@9-internal/KeyStore.java:1466) at org.eclipse.jetty.util

Storing key using KeyStore in Android

人盡茶涼 提交于 2019-11-30 21:04:31
I am using KeyStore to protect my private key but when the line: FileOutputStream fos = ctx.openFileOutput("bs.keystore", Context.MODE_PRIVATE); is executed I have this exception: 'java.lang.NullPointerException'. I don't understand where is the problem. Code: private Context ctx; public DataSec(Context ctx) { ctx = this.ctx; } public void genKey() throws Exception { SecretKey key = KeyGenerator.getInstance("AES").generateKey(); KeyStore ks = KeyStore.getInstance(KeyStore.getDefaultType()); ks.load(null, "clavedekey".toCharArray()); PasswordProtection pass = new PasswordProtection("fedsgjk"