Skip to content
This repository has been archived by the owner on Oct 5, 2018. It is now read-only.

Commit

Permalink
Added options for OpenSSL peer verification
Browse files Browse the repository at this point in the history
  • Loading branch information
Boris Parak committed Oct 11, 2014
1 parent 1ea6f19 commit cecb937
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/initializers/force_ssl.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Force SSL according to settings in Rails.application.config.rocci_server_etc_dir/ENV.yml
Rails.application.config.force_ssl = (ROCCI_SERVER_CONFIG.common.force_ssl.to_s == 'true')

# Disable mandatory peer verification if SSL_CERT_* vars are not available
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE if ENV['SSL_CERT_FILE'].blank? && ENV['SSL_CERT_DIR'].blank?
4 changes: 4 additions & 0 deletions examples/etc/apache2/sites-available/occi-ssl
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
# enable passing of SSL variables to passenger. For GridSite/VOMS, enable also exporting certificate data
SSLOptions +StdEnvVars +ExportCertData

# configure OpenSSL inside rOCCI-server to validate peer certificates (for CMFs)
#SetEnv SSL_CERT_FILE /path/to/ca_bundle.crt
#SetEnv SSL_CERT_DIR /etc/grid-security/certificates

# set RackEnv
RackEnv production
LogLevel info
Expand Down

0 comments on commit cecb937

Please sign in to comment.