<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>data/cacert.pem</filename>
    </added>
    <added>
      <filename>data/gpl-2.0.txt</filename>
    </added>
    <added>
      <filename>data/lgpl-2.1.txt</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,2 +1,5 @@
+.DS_Store
+**/.DS_Store
+
 doc
 pkg</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -1,3 +1,10 @@
+== 3.2.3
+
+* Upgraded to JSON 1.1.6
+* Upgraded to RestClient 1.0 for improved SSL support
+* 
+* Fixed a bug where certain API requests could die with a networking Exception
+
 == 3.2.2
 
 * Fixed a bug where older versions of the standard timeout library could kill</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -23,7 +23,8 @@ SA_SPEC = Gem::Specification.new do |spec|
 
   spec.test_files      = %w[test/ts_all.rb]
 	spec.files           = Dir.glob(&quot;{bin,lib,test}/**/*.rb&quot;) +
-	                       %w[Rakefile setup.rb]
+	                       %w[ Rakefile setup.rb data/cacert.pem
+	                           data/gpl-2.0.txt data/lgpl-2.1.txt ]
   spec.executables     = %w[scout_agent]
 
 	spec.has_rdoc         = true
@@ -36,8 +37,8 @@ SA_SPEC = Gem::Specification.new do |spec|
 	
   spec.add_dependency(&quot;arrayfields&quot;, &quot;=4.7.3&quot;)  # fix Amalgalite's results
   spec.add_dependency(&quot;amalgalite&quot;,  &quot;=0.9.0&quot;)
-  spec.add_dependency(&quot;rest-client&quot;, &quot;=0.9.2&quot;)
-  spec.add_dependency(&quot;json&quot;,        &quot;=1.1.4&quot;)
+  spec.add_dependency(&quot;rest-client&quot;, &quot;=1.0&quot;)
+  spec.add_dependency(&quot;json&quot;,        &quot;=1.1.6&quot;)
   spec.add_dependency(&quot;xmpp4r&quot;,      &quot;=0.4&quot;)
   spec.add_dependency(&quot;elif&quot;,        &quot;=0.1.0&quot;)  # used by some plugins
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -27,9 +27,9 @@ require &quot;scout_agent/dispatcher&quot;
 require &quot;scout_agent/api&quot;
 
 # require gems
-require_lib_or_gem &quot;json&quot;,          &quot;=1.1.4&quot;
+require_lib_or_gem &quot;json&quot;,          &quot;=1.1.6&quot;
 require_lib_or_gem &quot;amalgalite&quot;,    &quot;=0.9.0&quot;
-require_lib_or_gem &quot;rest_client&quot;,   &quot;=0.9.2&quot;
+require_lib_or_gem &quot;rest_client&quot;,   &quot;=1.0&quot;
 require_lib_or_gem &quot;xmpp4r&quot;,        &quot;=0.4&quot;
 require_lib_or_gem &quot;xmpp4r/roster&quot;  # loads from xmpp4r's version
 
@@ -92,7 +92,7 @@ module ScoutAgent
   end
 
   # The version of this agent.
-  VERSION = &quot;3.2.2&quot;.freeze
+  VERSION = &quot;3.2.3&quot;.freeze
   # A Pathname reference to the agent code directory, used in dynamic loading.
   LIB_DIR = Pathname.new(File.dirname(__FILE__)) + agent_name
 end</diff>
      <filename>lib/scout_agent.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,7 +14,7 @@ rescue LoadError    # library not found
   begin
     require &quot;rubygems&quot;
     begin
-      gem(&quot;json&quot;, &quot;=1.1.4&quot;)
+      gem(&quot;json&quot;, &quot;=1.1.6&quot;)
     rescue NoMethodError
       abort &quot;Please upgrade RubyGems as the gem() method is required.&quot;
     end</diff>
      <filename>lib/scout_agent/api.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,8 +15,12 @@ module ScoutAgent
       @log         = log
       @rest_client = RestClient::Resource.new(
         Plan.agent_url,
-        :headers =&gt; { :client_version   =&gt; ScoutAgent::VERSION,
-                      :accept_encoding  =&gt; &quot;gzip&quot; }
+        :headers     =&gt; { :client_version   =&gt; ScoutAgent::VERSION,
+                          :accept_encoding  =&gt; &quot;gzip&quot; },
+        :ssl_ca_file =&gt; File.join( File.dirname(__FILE__),
+                                   *%w[.. .. data cacert.pem] ),
+        :verify_ssl  =&gt; OpenSSL::SSL::VERIFY_PEER |
+                        OpenSSL::SSL::VERIFY_FAIL_IF_NO_PEER_CERT
       )
       # make sure proxy is set, if needed
       RestClient.proxy = Plan.proxy_url
@@ -47,6 +51,9 @@ module ScoutAgent
     rescue RestClient::NotModified
       log.info(&quot;Plan was not modified.&quot;)
       &quot;&quot;  # empty plan
+    rescue OpenSSL::SSL::SSLError
+      log.warn(&quot;SSL verification failed.  The plan could not be trusted.&quot;)
+      nil  # cannot trust any plan we received
     rescue Exception =&gt; error  # networking problem
       log.warn(&quot;Plan could not be retrieved:  #{error.class}.&quot;)
       nil  # failed to retrieve plan
@@ -81,6 +88,10 @@ module ScoutAgent
       log.warn( &quot;Check-in was returned as a failure code:  &quot; +
                 &quot;#{error.http_code}.&quot; )
       false
+    rescue OpenSSL::SSL::SSLError
+      log.warn( &quot;SSL verification failed.  &quot; +
+                &quot;Could not send check-in to untrusted server.&quot; )
+      false  # cannot trust server
     rescue Exception =&gt; error  # networking problem
       log.warn(&quot;Check-in could not be sent:  #{error.class}.&quot;)
       false  # we failed to send and will retry later
@@ -103,7 +114,11 @@ module ScoutAgent
       log.warn( &quot;Log upload was returned as a failure code:  &quot; +
                 &quot;#{error.http_code}.&quot; )
       false
-    rescue Errno::ECONNREFUSED, RestClient::Exception  # networking problem
+    rescue OpenSSL::SSL::SSLError
+      log.warn( &quot;SSL verification failed.  &quot; +
+                &quot;Could not send log to untrusted server.&quot; )
+      false  # cannot trust server
+    rescue Exception =&gt; error  # networking problem
       log.warn(&quot;Log could not be sent:  #{error.class}.&quot;)
       false  # could not send log
     end</diff>
      <filename>lib/scout_agent/server.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4cbc0c01578258d0bcc98662efcbcc564ffd35c5</id>
    </parent>
  </parents>
  <author>
    <name>James Edward Gray II</name>
    <email>james@graysoftinc.com</email>
  </author>
  <url>http://github.com/highgroove/scout_agent/commit/f9a8d9e014cf484badcd12d13bad42749adbad4b</url>
  <id>f9a8d9e014cf484badcd12d13bad42749adbad4b</id>
  <committed-date>2009-05-29T09:35:40-07:00</committed-date>
  <authored-date>2009-05-29T09:35:40-07:00</authored-date>
  <message>Adding SSL certificate verification.</message>
  <tree>02f0f8cb9214a94a1a7e028322033184cc64c34d</tree>
  <committer>
    <name>James Edward Gray II</name>
    <email>james@graysoftinc.com</email>
  </committer>
</commit>
