URL with self-signed certificate and username/password
1 次查看(过去 30 天)
显示 更早的评论
I'm trying to get data from a url where both a self-signed certificate and username/password are required. I can access the site fine from my browser, and I imported the certificate using importcert.m (found online) and unix commands found here: http://serverfault.com/questions/139728/how-to-download-the-ssl-certificate-from-a-website/192731#192731
That seems to work, but when I attempt to log in using username and password, and the routine urlread_auth (also found online - I've also tried urlread with various combinations of username/password in input string to no avail) I get this error:
>>>
[s,info] = urlread_auth('https://glasspoint-historian.invensyscloud.com:8082/Historian/v1',username,password)
Error using urlread_auth (line 17)
Java exception occurred:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path
building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to
find valid certification path to requested target
>>>
urlread_auth with the test site info provided in urlread_auth.m works fine. I guess my question is whether this is an indication of a problem with the certificate or not. Is there some way I can check whether its valid? When I use importcert.m I get this output:
>>>
importcert('test.cer');
Owner: CN=glasspoint-historian.invensyscloud.com
Issuer: CN=invensyscloud.com
Serial number: -3947347c4a189163b44db2247694ec11
Valid from: Fri Dec 11 10:00:21 PST 2015 until: Sat Dec 31 15:59:59 PST 2039
Certificate fingerprints:
MD5: 0B:27:C3:61:39:87:63:BB:77:25:10:6A:FE:ED:E4:30
SHA1: 0A:30:ED:E2:CD:BE:E6:E1:82:73:C0:C0:D2:2C:07:CB:24:C4:FB:B7
SHA256: F5:93:7D:30:BC:BB:39:F2:3A:8D:ED:3E:F8:E1:86:78:D9:E4:34:FF:CC:C3:39:EF:F6:2C:AF:B0:D2:70:E5:43
Signature algorithm name: SHA1withRSA
Version: 3
Extensions:
#1: ObjectId: 2.5.29.1 Criticality=false
0000: 30 44 80 10 87 8C 70 BC 35 C7 B3 4F D7 55 7A FA 0D....p.5..O.Uz.
0010: 66 C8 7B F1 A1 1E 30 1C 31 1A 30 18 06 03 55 04 f.....0.1.0...U.
0020: 03 13 11 69 6E 76 65 6E 73 79 73 63 6C 6F 75 64 ...invensyscloud
0030: 2E 63 6F 6D 82 10 61 CF 7D 33 A3 B9 27 81 4D 9C .com..a..3..'.M.
0040: 3B 8E DC 04 FB AA ;.....
#2: ObjectId: 2.5.29.37 Criticality=false
ExtendedKeyUsages [
serverAuth
]
Trust this certificate? [no]: yes
Certificate was added to keystone
>>>
Is it a problem that the URL includes subdirectories not indicated in the certificate? Any help appreciated.
Thanks,
Matthew
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Web Services 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!