1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

Add support for proxy certificates to X509 Cloud Auth

This commit is contained in:
Hyun Woo Kim 2014-10-28 15:29:45 +01:00 committed by Ruben S. Montero
parent 9aff29cfb0
commit 32b8d4262e

View File

@ -34,8 +34,12 @@ module X509CloudAuth
end
# Password should be DN with whitespace removed.
username = get_username(
OpenNebula::X509Auth.escape_dn(cert.subject.to_s))
username = get_username(OpenNebula::X509Auth.escape_dn(
cert.subject.to_s))
# For proxy certificates look at the issuer
username = get_username(OpenNebula::X509Auth.escape_dn(
cert.issuer.to_s)) if username.nil?
return username if username