This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new df85ce82 openssl needs a port
df85ce82 is described below

commit df85ce824c12ae125eb7a93eff975dcdf92bdc16
Author: Sebb <[email protected]>
AuthorDate: Fri Aug 5 22:23:49 2022 +0100

    openssl needs a port
    
    SKIP CI
---
 lib/whimsy/asf/ldap.rb | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/whimsy/asf/ldap.rb b/lib/whimsy/asf/ldap.rb
index e60e263a..468192fc 100644
--- a/lib/whimsy/asf/ldap.rb
+++ b/lib/whimsy/asf/ldap.rb
@@ -179,9 +179,10 @@ module ASF
     # returns the last certificate found (WHIMSY-368)
     def self.extract_cert(host=nil)
       host ||= hosts.sample[%r{//(.*?)(/|$)}, 1]
-      puts ['openssl', 's_client', '-connect', host, '-showcerts'].join(' ')
-      out, _, _ = Open3.capture3 'openssl', 's_client',
-        '-connect', host, '-showcerts'
+      host += ':636' unless host =~ %r{:\d+\z}
+      cmd = ['openssl', 's_client', '-connect', host, '-showcerts'] 
+      puts cmd.join(' ')
+      out, _, _ = Open3.capture3(*cmd)
       out.scan(/^-+BEGIN.*?\n-+END[^\n]+\n/m).last
     end
 

Reply via email to