Questions tagged [pkcs#12]
PKCS#12 is a file format to store and exchange private keys and certificates.
491
questions
1
vote
1
answer
23
views
Sign a pdf file in Go (Golang) using digitorus/pdfsign
In go (golang) I need to sign a pdf document, but unlike other languages there are no libraries that make the job easier. I have found a couple of paid ones but they are not an option.
To start, I ...
0
votes
0
answers
15
views
Pkcs12Store without constructor
Good morning. I have been trying for many days to transfer my signature process, which used iTextSharp, to iText7.
The main error it gives me is when trying to use Pkcs12Stores, because it tells me ...
0
votes
0
answers
76
views
openssl: exporting PFX to PEM and back
I'm having trouble getting a working .pfx file from an exported .pem. I have read the various questions regarding the conversion, but they all deal with it in either direction and never both.
The ...
0
votes
0
answers
42
views
C#- AES256 Key Encryption using (RSA/ECB/PKCS1Padding) and Decryption using Java (RSA/ECB/PKCS1Padding)
Title: Issue with RSA decryption in Java, getting BadPaddingException
Question:
I'm working on a project that involves encrypting a secret key using AES and then decrypting it using RSA. The ...
0
votes
0
answers
50
views
how to get private keys from certificates into the p12 file?
Inside a .p12 file, I have 2 certificates of which one of them is expired. With the cryptography library, I can obtain the certificate but I don't know how to obtain the private key of that ...
0
votes
0
answers
39
views
PKCS12 keystore is empty after loading on Android device
I'm trying to load PKCS12 keystore with a single SecretKeyEntry on Android device:
Keystore type: PKCS12
Keystore provider: SUN
Your keystore contains 1 entry
Alias name: client_key_11
Creation date:...
-1
votes
1
answer
53
views
Can a server accept a client certificate in JKS format and refuse the same certificate in PKCS12
I am testing get requests for mutual TLS, and I started from a JKS certificate that was working, but when I convert it to PKCS12 it is refused by the server, and when I convert it back to JKS from ...
0
votes
0
answers
47
views
cURL error 58 error reading PKCS12 file in pem file
i have pem.key file and .cer file
GuzzleHttp\Exception\RequestException: cURL error 58: error reading PKCS12 file '/home/azureuser/nightshades/storage/app/public/documents/merchant_id.cer' (see
...
0
votes
1
answer
41
views
FreeIPA sign csr which can give out other certificates
How can I sign a csr with CA:true attribute using FreeIPA's CA private key?
Reason being, I want a remote site to give out its own certificate using this certificate.
Is this even possible?
-1
votes
1
answer
39
views
How to store RSA private keypair to PKCS#12
I have several RSA private keypairs which I now hold in a own format file.
I want to store them with Java into PKCS#12 keystore to have better access to them but cannot find clear example.
I already ...
0
votes
0
answers
29
views
Openssl command to Java or Loading Pem with encrypted key and cert into keystore
I am looking to convert this command to java so that i can convert a pem file to the p12 format to be used in the application key store:
openssl pkcs12 -export -inkey combinedCertAndKey.pem -in ...
0
votes
0
answers
53
views
Does Quarkus implementation gRPC service supports using PKCS #12 certificates for SSL?
I found this link which probably hints that it is not possible (https://github.com/googleapis/google-cloud-cpp/issues/5116). In case, some one figured out the secret sauce. Do share.
I am hosting gRPC ...
0
votes
0
answers
44
views
error while using pkcs12 certificate with tomcat 9
I am using below command to run tomcat 9 docker image,
docker run \
-p 8443:8443 \
-e KEYSTORE_PATH=/usr/local/tomcat/keystore.p12 \
-e KEYSTORE_PASSWORD=pskp \
-e KEYSTORE_TYPE=PKCS12 \
-e ...
0
votes
0
answers
38
views
Problems with importCertificate function in electron
My electron app is running inside a snap and connects to an api that is serving content with a custom self signed certificate. I'd like to properly add that certificate into the store of my electron ...
0
votes
0
answers
114
views
Springboot using cert not working, gives Alias name does not identify a key entry
I am attempting to enable a certificate that was ordered on sslcertificaten.nl in my Spring Boot runnable JAR application with Tomcat 9. Here is what I'm doing:
keytool -import -alias springboot -file ...
1
vote
0
answers
297
views
Export private key is not showing when creating certificate from CSR
I am trying to create CSR from powershell script. When running the script CSR is getting generated. After that certificate is created.
Now when executing certmgr on my window machine i am opening ...
0
votes
0
answers
74
views
Android: PKCS12 not found
In my Android application, I'm using PKCS12 certificates for https, authentication and it works.
But when I'm trying to display details from certificate in PKCS12 format, I'm getting exception:
java....
0
votes
0
answers
22
views
Generation of CA signed PKCS#12 certificate without .csr file
We need to create CA signed PKCS#12 certificate. Only private key is available. Is there a way to create .crt or .p12 file without creating .csr file?
0
votes
1
answer
202
views
javax.net.ssl.SSLHandshakeException: No available authentication scheme in java 19 and jetty 9 (and Camel 3.20.4)
(Hope it's not a Camel specific question)
Hello,
I am migrating my app (Camel, Jetty) from java 8 to the newer java, which is currently:
$ java --version
openjdk 19.0.1 2022-10-18
OpenJDK Runtime ...
3
votes
2
answers
626
views
Parsing PKCS file fails after upgrading OpenSSL to 3.0.8
Background
I have complex application which uses some OpenSSL features. One of the features is possibility to read PKCS12 files. OpenSSL is statically linked and my project builds it from sources.
...
1
vote
1
answer
1k
views
Changing encryption in pkcs12 file from RC2-40-CBC to AES-256-CBC using openssl
as title says, I'm trying to change the encryption of the private key contained within an pkcs12 file from RC2-40-CBC to AES-256-CBC using openssl 3.0
I tried
openssl pkcs12 -legacy -in cert.p12 -out ...
-1
votes
1
answer
123
views
How to access private key as PrivateKey object from a pfx certificate stored in Azure key vault using Java?
CertificateClient certificateClient = new CertificateClientBuilder().vaultUrl().credential(new DefaultAzureCredentialBuilder().build()).buildClient();
KeyVaultCertificateWithPolicy certificate = ...
1
vote
0
answers
196
views
How to check user certificates file format in order to install them on Android phone
I am setting up a freeradius instance for multiple Android end-devices authentication with EAP-TLS.
I first test it with an embedded linux device and the setup works.
The first step is to make it ...
0
votes
0
answers
522
views
Import of PEM certificate chain and key to Java Keystore
I have a base-64 encoded PEM string which contains a certificate chain and private key. When I am trying to load the same in "JKS" type keystore its giving "java.io.IOException: Invalid ...
1
vote
2
answers
339
views
How to create private key from pkcs12 in java
I need to create PrivateKey from privateKeyContent which is in pkcs12 format. Below code doesn't work for it.
KeyFactory kf = KeyFactory.getInstance("RSA");
PKCS8EncodedKeySpec ...
1
vote
0
answers
465
views
Why my PKCS#12 (generated by openssl) canot be read by java
OpenSSL 1.0.2k-fips
openjdk-17.0.1
I use Openssl to generate PKCS12 file. My java keystore canot read it.
My openssl cmds:(rootca.key is privatekey and rootca.crt is selfSigned certificate.)
openssl ...
4
votes
1
answer
4k
views
PKCS#1 vs PKCS#8 vs PKCS#12 for RSA keys
What is the recommended RSA key format to use if you only started using it nowadays?
I know that PKCS#1 is a format dedicated to RSA keys but do I need to avoid using it because it's old?
...
0
votes
0
answers
104
views
PHP openssl_pkcs12_export creates invalid pkcs12-file
I have a MySQL-DB, which contains SSL certificate private keys and the certificate. My goal is to create a PHP script, that creates a pkcs12-file and sends it to browser/download.
Thats my code:
<?...
3
votes
0
answers
493
views
PKCS12_parse: unsupported - when running a ruby application as a service on the server
In my ruby application, I am creating Apple wallet passes.
The application actually works well, but when I try to start it as a service (/etc/systemd/system), it is failing.
I can see that almost ...
1
vote
1
answer
331
views
Read and get secrete key from PKCS12 file using C#
I have PKCS12 file (secured by password) which contains Aux key and main key generated using aux key.
Now I am trying to read the keys programmatically in C#.
Please let me know am I missing something?...
0
votes
0
answers
21
views
wpscan with a client certificate PKCS#12 in bash
how to scan a website using wpscan which is accessible only with the Client certificate (.p12).
I was able to access the site with curl
curl --cerr-type p12 --cert cert.p12:password https://website....
0
votes
0
answers
896
views
How to import / read PKCS#12 pfx with Bouncy Castle
I have a file based .pfx certificate file containing a certificate and private key.
I would like to import / load it to an Org.BouncyCastle.X509.X509Certificate using BC.
I am able to load it with ....
0
votes
0
answers
24
views
How to get a pfx file onto a windows machine that is not publicly accessible?
I have an internal web application running on a windows machine at the moment the web pages are running insecurely over http which all users in the company have access to. A few pages within this that ...
0
votes
1
answer
221
views
Can I extract keys based on friendly name using openssl?
My keystore contains 2 keys, and I would like to run 2 commands which will output each respective key based on alias/friendlyName. At the moment the command below outputs both keys to the TESTKEY.key ...
0
votes
1
answer
652
views
error initializing configuration envoy.yaml Failed to load pkcs12 from /etc/cert.p12
This is what i want to reach with envoy as proxy for https traffic:
I got the certificate (p12) from the java developer to load it with envoy, then make developer happy by hitting envoy without ...
0
votes
1
answer
280
views
digital signature in pkcs7 format with base64 encoding PHP
Is any pre-define function in PHP for making signature in pkcs7 format?
I have .pfx certificate with me
0
votes
1
answer
710
views
PFX keystore password vs password for export of certificate and key contained by the PFX-file
I'm having a hard time trying to set a password on the PFX itself, not on the contained certificate. Let me try to explain
Create the PFX file
openssl pkcs12 -export -out internal-multidomain.pfx -...
0
votes
0
answers
259
views
How to use pfx, crt and key files to connect to Java Spring boot server
We have received crt, pfx and key file from our server team which is a Spring boot application. These are not self signed certificates.
Now, we are requested to use the certificates and change our ...
0
votes
0
answers
355
views
http to https migration in Jenkins not working
We need to migrate the Jenkins URL from http to https.
We have a server where Jenkins is installed and the jobs are running fine.
Now for the security enhancement we need to migrate to https.
We ...
1
vote
0
answers
688
views
Using a .json private key instead of p12
This is a two part question, if that is OK here. I maintain an application that reads Google data, using a .p12 key file that is downloaded from Google by our customers. One customer for some reason ...
0
votes
1
answer
483
views
Read pfx file that is protected by a password
I’m trying to read the pkcs12store to extract the private certificate and the chain of certificate. The pfx file is protected by a password. If the password is empty everything works fine, but if it ...
4
votes
0
answers
397
views
Configuring TLS for Sentry Relay
I have the following config file for Sentry Relay:
---
relay:
mode: static
upstream: "https://sentry.io/"
host: 0.0.0.0
port: 3000
tls_port: 3001
tls_identity_path: /etc/cert/...
0
votes
0
answers
1k
views
Convert Oracle Wallet PKCS12 to JKS
I have a service that must be configured to connect to a database using Oracle Wallet. However, the program cannot use the standard PKCS12 format created by the Oracle mkstore -wrl commands. Guidance ...
0
votes
0
answers
124
views
While reading .pkcs12 file content as method parameter getting error as java.io.IOException: DerInputStream.getLength(): lengthTag=58, too big
I am getting .pkcs12 file content as string param from other service. In java while reading getting error as
java.io.IOException: DerInputStream.getLength(): lengthTag=58, too
big.
sample code:
...
0
votes
2
answers
340
views
How to bind a custom TLS/SSL certificate to an Azure App Service app using Python?
The Microsoft Azure documentation has an article on how to Add a TLS/SSL certificate in Azure App Service from the web portal. That page links to the documentation on how to do the same thing from ...
1
vote
1
answer
767
views
Can't extract private key from PCKS#12 encoded certificate file in .NET 6
I'm writing a .NET 6 application for Windows that is intended to extract the private key from a PFX file containing an RSA cert/key bundle.
public static Boolean ToCertAndKey(String pfxFilePath, ...
2
votes
1
answer
4k
views
Java keytool yields "keystore password was incorrect" when trying to import a PKCS12 to JKS
I know this issue looks like a known one (many questions on this here), several bugs have been reported on different JDK versions and the situation has been very well summarized in this post:
https://...
32
votes
2
answers
21k
views
Convert an old style .p12 to .pem (unsupported algorithm RC2-40-CBC)
There seem to exist still some tools which generate private keys encrypted with RC2-40-CBC
Although I'm able to export it to a new key store using keytool -importkeystore it seems that I can't get rid ...
1
vote
1
answer
3k
views
Keycloak 18 with Quarkus SSL configuration failed to use PKCS12 as keystore(*.p12)
With jboss distribution I was able to configure keystore for SSL in standalone.xml as below and it is working fine
<tls>
<key-stores>
<key-store name="applicationKS&...
35
votes
3
answers
66k
views
curl - OpenSSL error error:0308010C:digital envelope routines::unsupported
I try to use curl on Windows to post a timestamp request. Authentication is needed, so I use p12 file. I get error message, but password of p12 file is correct.
Command:
curl --insecure --cert-type ...