I'm trying to access Azure blob via Shared Access Signatures using HTTPS in Java SDK and I got a
SSLHandshakeException. I can successfully download the blob from browser via SAS, and I can access the blob using HTTP, so I guess it must be some certificate issues. The following are the code and the error details:
=====Code=====
String blobSASUri = "https://mystorage.blob.core.chinacloudapi.cn/mycontainer/myfile.txt?sv=2015-12-11&sr=b&sig=8iAChUIIQl2n%2BwYZJeDDfiOvuojdDm2AdHb8K3BGDGA%3D&st=2016-09-01T01%3A30%3A11Z&se=2016-09-01T02%3A35%3A11Z&sp=r";
CloudBlockBlob blob = new CloudBlockBlob(new URI(blobSASUri));
boolean exists = blob.exists(); //error happens
=====Error=====
StorageException
Message: The server encountered an unknown failure:
ErrorCode: SERVICE_INTERNAL_ERROR
Cause: 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