Permalink
Browse files

Fix SSL cert and key config

typo in type config
  • Loading branch information...
1 parent 0f576f5 commit a7749fa5e8fc208c9b167aaa72808285f9f2c71a @gravis gravis committed Jun 7, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/typhoeus/easy.rb
View
@@ -185,30 +185,30 @@ def params=(params)
# Set SSL certificate
# " The string should be the file name of your certificate. "
# The default format is "PEM" and can be changed with ssl_cert_type=
- def ssl_cert=(cert, cert_type = "PEM")
+ def ssl_cert=(cert)
set_option(OPTION_VALUES[:CURLOPT_SSLCERT], cert)
end
# Set SSL certificate type
# " The string should be the format of your certificate. Supported formats are "PEM" and "DER" "
def ssl_cert_type=(cert_type)
- raise "Invalid ssl cert type : '#{cert_type}'..." unless %w(PEM DER).include?(cert_type)
+ raise "Invalid ssl cert type : '#{cert_type}'..." if cert_type and !%w(PEM DER).include?(cert_type)
set_option(OPTION_VALUES[:CURLOPT_SSLCERTTYPE], cert_type)
end
# Set SSL Key file
# " The string should be the file name of your private key. "
# The default format is "PEM" and can be changed with ssl_key_type=
#
- def ssl_key=(key, options = {})
+ def ssl_key=(key)
set_option(OPTION_VALUES[:CURLOPT_SSLKEY], key)
end
# Set SSL Key type
# " The string should be the format of your private key. Supported formats are "PEM", "DER" and "ENG". "
#
def ssk_key_type=(key_type)
- raise "Invalid ssl key type : '#{key_type}'..." unless %w(PEM DER ENG).include?(cert_type)
+ raise "Invalid ssl key type : '#{key_type}'..." if key_type and !%w(PEM DER ENG).include?(key_type)
set_option(OPTION_VALUES[:CURLOPT_SSLKEYTYPE], key_type)
end

0 comments on commit a7749fa

Please sign in to comment.