Ver código fonte

Activate sslv2 and sslv3 on openssl 1.0.2g

master
Aeris 3 anos atrás
pai
commit
8b6f08ab4d
7 arquivos alterados com 71 adições e 49 exclusões
  1. 1
    0
      .gitignore
  2. 32
    26
      Makefile
  3. 1
    0
      bin/supported
  4. 11
    0
      bin/supported.rb
  5. 1
    0
      output/alexa.yml
  6. 2
    2
      output/xmpp.erb
  7. 23
    21
      output/xmpp.yml

+ 1
- 0
.gitignore Ver arquivo

@@ -11,3 +11,4 @@ Gemfile.lock
11 11
 /db/schema.rb
12 12
 /lib/**/*.so
13 13
 /lib/**/*.so.1.0.0
14
+/build/

+ 32
- 26
Makefile Ver arquivo

@@ -1,11 +1,14 @@
1 1
 PWD = $(shell pwd)
2 2
 export CPATH = $(PWD)/openssl/include
3 3
 export LIBRARY_PATH = $(PWD)/openssl
4
-OPENSSL_VERSION = 1.0.2d
5
-OPENSSL_DIR = openssl-$(OPENSSL_VERSION)
4
+OPENSSL_VERSION = 1.0.2g
5
+OPENSSL_NAME = openssl-$(OPENSSL_VERSION)
6
+OPENSSL_DIR = build/$(OPENSSL_NAME)
7
+#OPENSSL_DIR = openssl
6 8
 RUBY_MAJOR_VERSION = 2.3
7 9
 RUBY_VERSION = $(RUBY_MAJOR_VERSION).0
8
-RUBY_DIR = ruby-$(RUBY_VERSION)-preview1
10
+RUBY_NAME = ruby-$(RUBY_VERSION)
11
+RUBY_DIR = build/$(RUBY_NAME)
9 12
 RUBY_OPENSSL_EXT_DIR = $(RUBY_DIR)/ext/openssl
10 13
 export LIBRARY_PATH = $(PWD)/lib
11 14
 export C_INCLUDE_PATH = $(PWD)/$(OPENSSL_DIR)/include
@@ -14,44 +17,47 @@ export C_INCLUDE_PATH = $(PWD)/$(OPENSSL_DIR)/include
14 17
 
15 18
 all: libs ext
16 19
 
17
-clean:
18
-	rm -rf $(RUBY_DIR) $(OPENSSL_DIR)
20
+clean: clean-libs clean-ext
19 21
 clean-libs:
20
-	find $(OPENSSL_DIR) \( -name "*.o" -o -name "*.so" \) -delete
21
-	rm -f lib/libcrypto.so lib/libssl.so lib/libcrypto.so.1.0.0 lib/libssl.so.1.0.0
22
+	[ -d $(OPENSSL_DIR) ] \
23
+		&& find $(OPENSSL_DIR) \( -name "*.o" -o -name "*.so" \) -delete \
24
+		|| true
25
+	rm -f lib/libcrypto.so* lib/libssl.so* $(OPENSSL_DIR)/Makefile
22 26
 clean-ext:
23
-	find $(RUBY_OPENSSL_EXT_DIR) \( -name "*.o" -o -name "*.so" \) -delete
27
+	[ -d $(RUBY_OPENSSL_EXT_DIR) ] \
28
+		&& find $(RUBY_OPENSSL_EXT_DIR) \( -name "*.o" -o -name "*.so" \) -delete \
29
+		|| true
24 30
 	rm -f lib/openssl.so
31
+mr-proper:
32
+	rm -rf lib/libcrypto.so* lib/libssl.so* lib/openssl.so build
25 33
 
26
-mr-proper: clean
27
-	rm -rf lib/libcrypto.so lib/libssl.so lib/libcrypto.so.1.0.0 lib/libssl.so.1.0.0 lib/openssl.so
34
+build/:
35
+	mkdir $@
28 36
 
29
-$(OPENSSL_DIR)/:
30
-	wget https://www.openssl.org/source/$(OPENSSL_DIR).tar.gz
31
-	tar xf $(OPENSSL_DIR).tar.gz
32
-	rm -rf $(OPENSSL_DIR).tar.gz
37
+$(OPENSSL_DIR)/: | build/
38
+	cd build && \
39
+		wget https://www.openssl.org/source/$(OPENSSL_NAME).tar.gz && \
40
+		tar xf $(OPENSSL_NAME).tar.gz && \
41
+		rm -rf $(OPENSSL_NAME).tar.gz
33 42
 
34 43
 $(OPENSSL_DIR)/Makefile: | $(OPENSSL_DIR)/
35
-	cd $(OPENSSL_DIR); ./config shared
44
+	cd $(OPENSSL_DIR); ./Configure enable-ssl3 enable-ssl2 enable-shared linux-x86_64
36 45
 
37 46
 $(OPENSSL_DIR)/libssl.so \
38
-$(OPENSSL_DIR)/libcrypto.so \
39
-$(OPENSSL_DIR)/libssl.so.1.0.0 \
40
-$(OPENSSL_DIR)/libcrypto.so.1.0.0: $(OPENSSL_DIR)/Makefile
47
+$(OPENSSL_DIR)/libcrypto.so: $(OPENSSL_DIR)/Makefile
41 48
 	$(MAKE) -C $(OPENSSL_DIR) depend build_libs
42 49
 
43 50
 lib/%.so: $(OPENSSL_DIR)/%.so
44 51
 	cp $< $@
45
-
46
-lib/%.so.1.0.0: $(OPENSSL_DIR)/%.so.1.0.0
47
-	cp $< $@
48
-
52
+lib/%.so.1.0.0:
53
+	ln -fs $(notdir $(subst .1.0.0,, $@)) $@
49 54
 libs: lib/libssl.so lib/libcrypto.so lib/libssl.so.1.0.0 lib/libcrypto.so.1.0.0
50 55
 
51
-$(RUBY_DIR)/:
52
-	wget http://cache.ruby-lang.org/pub/ruby/$(RUBY_MAJOR_VERSION)/$(RUBY_DIR).tar.gz
53
-	tar xf $(RUBY_DIR).tar.gz
54
-	rm -f $(RUBY_DIR).tar.gz
56
+$(RUBY_DIR)/: | build/
57
+	cd build && \
58
+		wget http://cache.ruby-lang.org/pub/ruby/$(RUBY_MAJOR_VERSION)/$(RUBY_NAME).tar.gz && \
59
+		tar xf $(RUBY_NAME).tar.gz && \
60
+		rm -f $(RUBY_NAME).tar.gz
55 61
 
56 62
 $(RUBY_OPENSSL_EXT_DIR)/Makefile: libs | $(RUBY_DIR)/
57 63
 	cd $(RUBY_OPENSSL_EXT_DIR); ruby extconf.rb

+ 1
- 0
bin/supported Ver arquivo

@@ -0,0 +1 @@
1
+runner

+ 11
- 0
bin/supported.rb Ver arquivo

@@ -0,0 +1,11 @@
1
+#!/usr/bin/env ruby
2
+$:.unshift File.expand_path File.join File.dirname(__FILE__), '../lib'
3
+require 'rubygems'
4
+require 'bundler/setup'
5
+require 'cryptcheck'
6
+
7
+puts 'Supported methods'
8
+puts OpenSSL::SSL::SSLContext::METHODS.select { |m| CryptCheck::Tls::Server::EXISTING_METHODS.include? m  }.sort.join ' '
9
+
10
+puts 'Supported ciphers'
11
+puts CryptCheck::Tls::Cipher.list.collect { |c| c.name }.sort.join ' '

+ 1
- 0
output/alexa.yml Ver arquivo

@@ -1,4 +1,5 @@
1 1
 - description: Top 100 Alexa
2
+  hostnames:
2 3
   - google.com
3 4
   - facebook.com
4 5
   - youtube.com

+ 2
- 2
output/xmpp.erb Ver arquivo

@@ -76,8 +76,8 @@
76 76
 								s = n.server
77 77
 							%>
78 78
 							<tr>
79
-								<th id="<%= s.domain %>">
80
-									<a href="#<%= s.domain %>"><%= s.domain %></a>
79
+								<th id="<%= s.hostname %>">
80
+									<a href="#<%= s.hostname %>"><%= s.hostname %></a>
81 81
 								</th>
82 82
 								<% if s.is_a? Tls::TlsNotSupportedServer %>
83 83
 									<td class="critical" colspan="16">

+ 23
- 21
output/xmpp.yml Ver arquivo

@@ -1,21 +1,23 @@
1
-- imirhil.fr
2
-- magicbox.okhin.fr
3
-- cyphercat.eu
4
-- jabber.ccc.de
5
-- jbfavre.im
6
-- axelsimon.net
7
-- google.com
8
-- ecuri.es
9
-- dattaz.fr
10
-- jabber.lqdn.fr
11
-- mailfr.com
12
-- arysthaar.pw
13
-- startcom.org
14
-- riseup.net
15
-- citronna.de
16
-- matlink.fr
17
-- verry.org
18
-- keuse.fr
19
-- cappuccino.uk.to
20
-- corzntin.fr
21
-- fralef.me
1
+- description: XMPP
2
+  hostnames:
3
+  - imirhil.fr
4
+  - magicbox.okhin.fr
5
+  - cyphercat.eu
6
+  - jabber.ccc.de
7
+  - jbfavre.im
8
+  - axelsimon.net
9
+  - google.com
10
+  - ecuri.es
11
+  - dattaz.fr
12
+  - jabber.lqdn.fr
13
+  - mailfr.com
14
+  - arysthaar.pw
15
+  - startcom.org
16
+  - riseup.net
17
+  - citronna.de
18
+  - matlink.fr
19
+  - verry.org
20
+  - keuse.fr
21
+  - cappuccino.uk.to
22
+  - corzntin.fr
23
+  - fralef.me

Carregando…
Cancelar
Salvar