The version of cURL in my z/OS system is: curl 7.52.1 (i370-ibm-openedition)
curl-config --ca returns: /u/mvsbuild/py361z/python36/etc/ssl/cacert.pem
But I can't find that directory. Instead I found cacert.pem is under /u/python/python36/etc/ssl. So I created that directory and copy cacert.pem there.
I tried 3 different ways:
1) When I issue the command without specifying --cacert and --capath, I got error
curl: (60) SSL certificate problem: self signed certificate in certificate chain
2) When I issue the command specifying --cacert and --capath, I got error
curl: (77) error setting certificate verify locations:
CAfile: cacert.pem
CApath: /u/mvsbuild/py361z/python36/etc/ssl
3) When I copy the cacert.pem file to the current directory, it works.
Questions:
1. Is there something wrong with the build process that made the cacert.pem stored in a wrong location?
2. After manually copied the cacert.pem to the desired location, why can't it be used, even specifying the location explicitly?
3. Is it a requirement that cacert.pem has to be in the current directory and it needs to be specified explicitly?
4. Is there a way to use a RACF keyring specified in the configured AT-TLS policy file that contains the CA certs instead of using the pem file?
------------------------------
Wai Choi
MS
IBM
POUGHKEEPSIE NY US
------------------------------
The version of cURL in my z/OS system is: curl 7.52.1 (i370-ibm-openedition)
curl-config --ca returns: /u/mvsbuild/py361z/python36/etc/ssl/cacert.pem
But I can't find that directory. Instead I found cacert.pem is under /u/python/python36/etc/ssl. So I created that directory and copy cacert.pem there.
I tried 3 different ways:
1) When I issue the command without specifying --cacert and --capath, I got error
curl: (60) SSL certificate problem: self signed certificate in certificate chain
2) When I issue the command specifying --cacert and --capath, I got error
curl: (77) error setting certificate verify locations:
CAfile: cacert.pem
CApath: /u/mvsbuild/py361z/python36/etc/ssl
3) When I copy the cacert.pem file to the current directory, it works.
Questions:
1. Is there something wrong with the build process that made the cacert.pem stored in a wrong location?
2. After manually copied the cacert.pem to the desired location, why can't it be used, even specifying the location explicitly?
3. Is it a requirement that cacert.pem has to be in the current directory and it needs to be specified explicitly?
4. Is there a way to use a RACF keyring specified in the configured AT-TLS policy file that contains the CA certs instead of using the pem file?
------------------------------
Wai Choi
MS
IBM
POUGHKEEPSIE NY US
------------------------------
Curl 7.52.2 is a pretty old version. Could you tell us how did you install it?
------------------------------
Tatiana Balaburkina
Engineering Manager
Rocket Internal - All Brands
------------------------------
Curl 7.52.2 is a pretty old version. Could you tell us how did you install it?
------------------------------
Tatiana Balaburkina
Engineering Manager
Rocket Internal - All Brands
------------------------------
Would those problems I reported go away with the latest version?
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
Would those problems I reported go away with the latest version?
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
export CURL_CA_BUNDLE=/u/python/python36/etc/sslexport _BPXK_AUTOCVT=ONcat /u/python/python36/etc/ssl/cacert.pem------------------------------
Sergey Rezepin
Rocket Software
------------------------------
export CURL_CA_BUNDLE=/u/python/python36/etc/sslexport _BPXK_AUTOCVT=ONcat /u/python/python36/etc/ssl/cacert.pem------------------------------
Sergey Rezepin
Rocket Software
------------------------------
Thanks for the response. I managed to find a newer version of curl from another system.
curl 7.83.1 (i370-ibm-openedition) libcurl/7.83.1 OpenSSL/1.1.1s
Release-Date: 2022-05-11
Seems
CURL_CA_BUNDLE needs to include the CA file name together with the full path, like /tmp/cafile/cacert.pem, not just /tmp/cafile so that --cacert can be omitted from the command. And do you have an answer to my question 4:
4. Is there a way to use a RACF keyring specified in the configured AT-TLS policy file that contains the CA certs instead of using the pem file?
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
Thanks for the response. I managed to find a newer version of curl from another system.
curl 7.83.1 (i370-ibm-openedition) libcurl/7.83.1 OpenSSL/1.1.1s
Release-Date: 2022-05-11
Seems
CURL_CA_BUNDLE needs to include the CA file name together with the full path, like /tmp/cafile/cacert.pem, not just /tmp/cafile so that --cacert can be omitted from the command. And do you have an answer to my question 4:
4. Is there a way to use a RACF keyring specified in the configured AT-TLS policy file that contains the CA certs instead of using the pem file?
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
Keyring support is not available at the moment, but it is on the table.
------------------------------
Tatiana Balaburkina
Engineering Manager
Rocket Internal - All Brands
------------------------------
Keyring support is not available at the moment, but it is on the table.
------------------------------
Tatiana Balaburkina
Engineering Manager
Rocket Internal - All Brands
------------------------------
Glad to know keyring support for z/OS curl is on the table.
A related question: Do you know if curl on z/OS can make use of AT-TLS? If yes, how? Can I specify -k to bypass the build in validation mechanism from curl to force it to use AT-TLS?
------------------------------
Wai Choi
MS
IBM
POUGHKEEPSIE NY US
------------------------------
Glad to know keyring support for z/OS curl is on the table.
A related question: Do you know if curl on z/OS can make use of AT-TLS? If yes, how? Can I specify -k to bypass the build in validation mechanism from curl to force it to use AT-TLS?
------------------------------
Wai Choi
MS
IBM
POUGHKEEPSIE NY US
------------------------------
I might be misunderstanding completely, but what I would expect is that curl would specify a non-encrypted connection e.g. http, and AT-TLS implements the TLS. So there is no certificate for curl to validate, certificate validation is done by AT-TLS?
------------------------------
Andrew Rowley
Self Registered
Ballarat AU
------------------------------
I might be misunderstanding completely, but what I would expect is that curl would specify a non-encrypted connection e.g. http, and AT-TLS implements the TLS. So there is no certificate for curl to validate, certificate validation is done by AT-TLS?
------------------------------
Andrew Rowley
Self Registered
Ballarat AU
------------------------------
I have the same understanding on AT. But I can't get it work for curl. Not sure if there is some set up needed. That's why I asked.
When I use the CURL_CA_BUNDLE to specify the CA root cert and go to a site whose cert is not originated from that CA (just for testing), I got
TLSv1.2 (OUT), TLS alert, unknown CA (560):
SSL certificate problem: self signed certificate in certificate chain
curl: (60) SSL certificate problem: self signed certificate in certificate chain
...
Unknown CA is expected. But 'self signed certificate in certificate chain' refers to which cert?
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
I have the same understanding on AT. But I can't get it work for curl. Not sure if there is some set up needed. That's why I asked.
When I use the CURL_CA_BUNDLE to specify the CA root cert and go to a site whose cert is not originated from that CA (just for testing), I got
TLSv1.2 (OUT), TLS alert, unknown CA (560):
SSL certificate problem: self signed certificate in certificate chain
curl: (60) SSL certificate problem: self signed certificate in certificate chain
...
Unknown CA is expected. But 'self signed certificate in certificate chain' refers to which cert?
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
You can see this with
openssl x509 -inform PEM -in <root ca>.pem -text -out certdata
The issuer of the root CA will be the root CA, hence it is self-signed, hence the error message about a self-signed certificate in the chain.
AT-TLS should be transparent, although I think it is possible that AT-TLS rules can be configured such that they only apply for traffic originating from outside the mainframe and not for traffic that originate from the mainframe
------------------------------
Jorn Thyssen
Solutions Advisor
Rocket Internal - All Brands
Waltham MA US
------------------------------
You can see this with
openssl x509 -inform PEM -in <root ca>.pem -text -out certdata
The issuer of the root CA will be the root CA, hence it is self-signed, hence the error message about a self-signed certificate in the chain.
AT-TLS should be transparent, although I think it is possible that AT-TLS rules can be configured such that they only apply for traffic originating from outside the mainframe and not for traffic that originate from the mainframe
------------------------------
Jorn Thyssen
Solutions Advisor
Rocket Internal - All Brands
Waltham MA US
------------------------------
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
If the latter, then that is expected, as the reply from your web server now contains a self-signed certificate in the chain (namely the root ca).
--data works fine for me:
------------------------------
Jorn Thyssen
Solutions Advisor
Rocket Internal - All Brands
Waltham MA US
------------------------------
If the latter, then that is expected, as the reply from your web server now contains a self-signed certificate in the chain (namely the root ca).
--data works fine for me:
------------------------------
Jorn Thyssen
Solutions Advisor
Rocket Internal - All Brands
Waltham MA US
------------------------------
When I pass an incorrect CA, I got:
TLSv1.2 (OUT), TLS alert, unknown CA (560): <==this is expected
...
curl: (60) SSL certificate problem: self signed certificate in certificate chain <==this is misleading. A complete cert chain must contain a root cert, which is self-signed.
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
When I pass an incorrect CA, I got:
TLSv1.2 (OUT), TLS alert, unknown CA (560): <==this is expected
...
curl: (60) SSL certificate problem: self signed certificate in certificate chain <==this is misleading. A complete cert chain must contain a root cert, which is self-signed.
------------------------------
Wai Choi
MS
IBM / Tivoli Software
POUGHKEEPSIE NY US
------------------------------
------------------------------
Jorn Thyssen
Solutions Advisor
Rocket Internal - All Brands
Waltham MA US
------------------------------
Sign up
Already have an account? Login
Welcome to the Rocket Forum!
Please log in or register:
Employee Login | Registration Member Login | RegistrationEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.