I am trying to add certificate for Kubernetes, but when I run the following command on cmd (MacOS):
openssl ec -in mycompany-robert.key -out mycompany-robert.dkey
I get the following prompt:
read EC key
Enter PEM pass phrase:
Then I enter some password, but it is not accepted and get the following error:
unable to load Key
4315711020:error:06FFF064:digital envelope routines:CRYPTO_internal:bad
decrypt:/AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/
Library/Caches/com.apple.xbs/Sources/libressl/libressl-2.8/crypto/evp/evp_enc.c:521:
4315711020:error:09FFF065:PEM routines:CRYPTO_internal:bad
decrypt:/AppleInternal/Library/BuildRoots/a0876c02-1788-11ed-b9c4-96898e02b808/
Library/Caches/com.apple.xbs/Sources/libressl/libressl-2.8/crypto/pem/pem_lib.c:469:
So, how can I fix the problem?
There is a shell script that builds a Docker Image (calling a Dockerfile). In the Dockerfile there are several CURL commands like this:
The Docker Container is using base OS as : Debian GNU/Linux 10
RUN curl -s -L \
https://repo1.maven.org/ ...
RUN curl -s -L \
https://github.com/CodeNarc/ ... \
-o codenarc.jar
RUN curl -s -L \
https://repo1.maven.org/ ...
RUN curl -s -L \
https://repo1.maven.org/ ...
The above Dockerfile is running fine when the host machine is either Mac or Linux based.
But when we are trying to run this on Windows host machine the 2nd curl command i.e. to “github.com” is failing with SSL Certificate issue (Exit Code 60).
We are not doing anything related to PHP, so any such solution (related to php.ini file) is irrelevant for me.
Now I have tried almost everything available to solve this issue but nothing seems to be working:
Downloading cacert.pem file from given location and putting into “/etc/ssl/certs”, but it didn’t work
I tried using update-ca-certificate, but it didn’t work
Used --cacert <cacert.pem file location on docker container>, but this also didn’t work
The only solution working is with -k flag in curl command, but that is insecure and we don't want to use that.
I cant find any other solution for this, if anyone can help, it will be much appreciated.
Thanks
Adding on what I tried running openssl s_client -showcerts -connect github.com:443 on Windows Host Machine:
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 3851 bytes and written 438 bytes
Verification error: unable to get local issuer certificate
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: 441C92CFBEA27773315E4A9476C3A5173F0A2AB0AADDE708568DD8752EAA8A5A
Session-ID-ctx:
Master-Key: DF6DB0BC64F84ADD5974694845136249AEBEFB2559009AAD2A5C27A6FC981915AB50A765914CAA8AFCAC904B9998FF54
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1614064531
Timeout : 7200 (sec)
Verify return code: 20 (unable to get local issuer certificate)
Extended master secret: no
---
depth=2 C = US, O = "Blue Coat Systems, Inc.", CN = Cloud Services CA - G2
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=1 C = US, O = Cloud Services, OU = Operations, CN = SSL-SG1-GINCH7
verify return:1
depth=0 C = US, ST = California, L = San Francisco, O = "GitHub, Inc.", CN = github.com
verify return:1
Then I ran the same command from inside the Docker:
---
No client certificate CA names sent
Peer signing digest: SHA256
Peer signature type: RSA
Server Temp Key: ECDH, P-256, 256 bits
---
SSL handshake has read 3851 bytes and written 438 bytes
Verification error: unable to get local issuer certificate
---
New, TLSv1.2, Cipher is ECDHE-RSA-AES256-GCM-SHA384
Server public key is 2048 bit
Secure Renegotiation IS supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
Protocol : TLSv1.2
Cipher : ECDHE-RSA-AES256-GCM-SHA384
Session-ID: 441C92CFBEA27773315E4A9476C3A5173F0A2AB0AADDE708568DD8752EAA8A5A
Session-ID-ctx:
Master-Key: DF6DB0BC64F84ADD5974694845136249AEBEFB2559009AAD2A5C27A6FC981915AB50A765914CAA8AFCAC904B9998FF54
PSK identity: None
PSK identity hint: None
SRP username: None
Start Time: 1614064531
Timeout : 7200 (sec)
Verify return code: 20 (unable to get local issuer certificate)
Extended master secret: no
---
depth=2 C = US, O = "Blue Coat Systems, Inc.", CN = Cloud Services CA - G2
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=1 C = US, O = Cloud Services, OU = Operations, CN = SSL-SG1-GINCH7
verify return:1
depth=0 C = US, ST = California, L = San Francisco, O = "GitHub, Inc.", CN = github.com
verify return:1
Whatever is the problem, it is not related to the container itself, otherwise it will not work on Linux and macOS as well (providing the test was done in the same network). The problem could be in the Windows host or the network in which the host is residing.
Check the following:
Antivirus or a proxy running on the windows machine
Corporate firewall
Content/packet inspectors (DPI)
Trace the connection with tpcpdump / wireshark from both hosts and compare the traffic
Also, see which certificate is the problem with openssl s_client -showcerts -connect github.com:443 to find which certificate is the problem
Searched all the questions related to recover keyerror, got no answer on my situation.
So, I just have several simple operations:
install jmeter 4.0 (on centos 7)
cd to the bin directory, run ./create-rmi-keystore.sh and pressed Enter in each steps(entered a password 123654 at final step), and finally it gives me
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format using "keytool -importkeystore -srckeystore rmi_keystore.jks -destkeystore rmi_keystore.jks -deststoretype pkcs12".
Copy the generated rmi_keystore.jks to jmeter/bin folder or reference it in property 'server.rmi.ssl.keystore.file'
so I run keytool -importkeystore -srckeystore rmi_keystore.jks -destkeystore rmi_keystore.jks -deststoretype pkcs12 and give a password 123654
It gives me:
Enter source keystore password:
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect
Can anybody give a hand, Thanks advance:)
solved by this , to answer the question What is your first and last name?, you'll have to reply with rmi which must be a corresponding value with server.rmi.ssl.keystore.alias in jmeter.propertise.
I know how to view the expiration date of an .ipa file's provisioning profile (by renaming the ipa to zip, then unzip it and view the ExpirationDate key in the embedded.mobileprovisioning file).
But how can I view the expiration date of the certificate itself that was used to sign the ipa?
I found that you can use the codesign utility to "extract" certs:
codesign --display --extract-certificates /Applications/Example.app
This produces three files: codesign0, codesign1, codesign2. Not sure how to proceed after that.
Do the following:
unzip -q MyApp.ipa
$ codesign -d --extract-certificates Payload/*.app
$ openssl x509 -inform DER -in codesign0 -noout -nameopt -oneline -dates
After doing the above, you will get output with:
notAfter=Aug 4 16:08:00 2017 GMT
This is the certificate expiration date.
project config:
CODE_SIGN_IDENTITY = "iPhone Developer: Maarten Billemont (9V38BLC46F)";
PROVISIONING_PROFILE = "6A477BC7-051A-4FE4-B285-E6E658937C24";
profile:
profile.mobileprovision.plist is the plist contents of the mobile provisioning profile:
$ PlistBuddy -c 'Print :Name' profile.mobileprovision.plist
iOS Team Provisioning Profile: *
$ PlistBuddy -c 'Print :UUID' profile.mobileprovision.plist
6A477BC7-051A-4FE4-B285-E6E658937C24
$ PlistBuddy -c 'Print :DeveloperCertificates' profile.mobileprovision.plist | grep -a Maarten
QTZ8SQGT6H1907U0iPhone Developer: Maarten Billemont (9V38BLC46F)10U
$ PlistBuddy -c 'Print :DeveloperCertificates:1' profile.mobileprovision.plist | openssl md5
cc0e202ff8be100352e04a4e9cc8763a
$ openssl md5 < ios_development.cer
cc0e202ff8be100352e04a4e9cc8763a
$ openssl x509 -inform der -subject -noout < ios_development.cer
subject= /UID=QTZ8SQGT6H/CN=iPhone Developer: Maarten Billemont (9V38BLC46F)/OU=7PCL8KGYD3/O=Tristan Interactive Inc./C=CA
keychain:
Common Name: iPhone Developer: Maarten Billemont (9V38BLC46F)
This certificate is valid.
This certificate has an associated private key.
This certificate and its private key are in the default keychain.
build result:
Check dependencies
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings (“iOS Team Provisioning Profile: *”) were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
question
What could be causing this code sign error? What other information could I gather to diagnose the problem? Can I somehow find out the exact codesign command used to double-check it's using the exact identifiers from the project configuration? How does it determine what keychain to look at? Can I run it in debug/diagnostic/verbose mode?
It is pretty well explained in the error message that the specified provisioning profile's certificate and private key pair does not exist in your keychain. Double check the certificate you had selected for the prov profile. Download it and place it again in your keychain. Then, reboot your computer.