You need to convert your private key to PKCS8 format using following command:
openssl pkcs8 -topk8 -inform PEM -outform DER -in private_key_file -nocrypt > pkcs8_key
After this your java program can read it.
More Related Contents:
- Load RSA public key from file
- Why are the RSA-SHA256 signatures I generate with OpenSSL and Java different?
- getting a IllegalBlockSizeException: Data must not be longer than 256 bytes when using rsa
- Read RSA private key of format PKCS1 in JAVA
- Using SHA1 and RSA with java.security.Signature vs. MessageDigest and Cipher
- Generating RSA keys in PKCS#1 format in Java
- convert openSSH rsa key to javax.crypto.Cipher compatible format
- Algid parse error, not a sequence
- How can I construct a java.security.PublicKey object from a base64 encoded string?
- Get a PrivateKey from a RSA .pem file [duplicate]
- Encrypt and decrypt large string in java using RSA [closed]
- Breaking down RSA/ECB/OAEPWithSHA-256AndMGF1Padding
- ArrayList is reinitialising when a method is called
- Java regex capturing groups indexes
- Named placeholders in string formatting
- Recursively list all files within a directory using nio.file.DirectoryStream;
- SEVERE: MessageBodyWriter not found for media type=application/json, type=class com.jersey.jaxb.Todo, genericType=class com.jersey.jaxb.Todo
- Java : Read last n lines of a HUGE file
- Scanner only reads file name and nothing else
- Error scanning entry “module-info.class” when starting Jetty server
- What is the fastest Java collection with the basic functionality of a Queue?
- Comparing chars in Java
- Convert string to Date in java
- Run Java Threads sequentially
- How to read text file from classpath in Java?
- Java generic methods in generics classes
- Lambdas in the classical Operation enum example
- Parse Date from String in this format : dd/MM/yyyy [to dd/MM/yyyy]
- JAVAFX : why wait cursor needs a new thread?
- Trigger 404 in Spring-MVC controller?