aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-03-26 15:28:59 +0100
committerFredrik Gustafsson <[email protected]>2013-03-26 15:28:59 +0100
commite6a695bc61b262cebecf9086058be306a13a0043 (patch)
tree38bc8ddeebba8127450771ddc31928ba9a61dd8d
parent61613acb659553004538ad13ded3d6bf343bf6a7 (diff)
parentc43a6ef57aa29efda944c0cf9c4d10f28feeb929 (diff)
downloadotp-e6a695bc61b262cebecf9086058be306a13a0043.tar.gz
otp-e6a695bc61b262cebecf9086058be306a13a0043.tar.bz2
otp-e6a695bc61b262cebecf9086058be306a13a0043.zip
Merge branch 'vk/fix_ssl_connection/OTP-10980' into maint
* vk/fix_ssl_connection/OTP-10980: Added comment about proxy certificates Fix ssl_connection to support reading proxy/chain certificates
-rw-r--r--lib/ssl/src/ssl_connection.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index 4d29ecce7a..4f241ecc0a 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -1151,7 +1151,9 @@ init_certificates(undefined, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHan
init_certificates(undefined, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHandle, CacheHandle, CertFile, client) ->
try
- [OwnCert] = ssl_certificate:file_to_certificats(CertFile, PemCacheHandle),
+ %% Ignoring potential proxy-certificates see:
+ %% http://dev.globus.org/wiki/Security/ProxyFileFormat
+ [OwnCert|_] = ssl_certificate:file_to_certificats(CertFile, PemCacheHandle),
{ok, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHandle, CacheHandle, OwnCert}
catch _Error:_Reason ->
{ok, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHandle, CacheHandle, undefined}
@@ -1159,7 +1161,7 @@ init_certificates(undefined, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHan
init_certificates(undefined, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHandle, CacheRef, CertFile, server) ->
try
- [OwnCert] = ssl_certificate:file_to_certificats(CertFile, PemCacheHandle),
+ [OwnCert|_] = ssl_certificate:file_to_certificats(CertFile, PemCacheHandle),
{ok, CertDbRef, CertDbHandle, FileRefHandle, PemCacheHandle, CacheRef, OwnCert}
catch
_:Reason ->