simple-gnupg-keyserver 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -66,7 +66,8 @@ The current default options are:
66
66
 
67
67
  defaultOptions = {
68
68
  'debug' => false, # should debug output to logged?
69
- 'title' => 'SimpleHKP' # the title used by the default headerHTML
69
+ 'title' => # the title used by the default headerHTML
70
+ "SimpleHKP @ #{Socket.gethostname}",
70
71
  'simpleHKPdir' => 'simpleHKP', # base disk path to simpleHKP disk space
71
72
  'keyDir' => 'keys', # subdir to key storage directory
72
73
  'idDir' => 'identities', # subdir to identity storage directory
@@ -46,6 +46,6 @@ require 'simpleHKP/server'
46
46
 
47
47
  module SimpleHKP
48
48
 
49
- VERSION = "2.0.0"
49
+ VERSION = "2.0.1"
50
50
 
51
51
  end
@@ -4,6 +4,7 @@ module SimpleHKP
4
4
  module Keys
5
5
 
6
6
  def saveLastKey(lastKey)
7
+ puts "saving last key" if @debug
7
8
  lastKey['colonData'].gsub!(/\\x3a/,':') if
8
9
  lastKey.has_key?('colonData')
9
10
  pp lastKey if @debug
@@ -17,7 +18,12 @@ module SimpleHKP
17
18
  gpg2cmd = "gpg2 --homedir #{@keyDir} --with-fingerprint --with-colons --list-sigs"
18
19
  puts gpg2cmd if @debug
19
20
  lastKey = Hash.new
20
- IO.popen(gpg2cmd, 'r').readlines.each do | aLine |
21
+ gpgData = ""
22
+ IO.popen(gpg2cmd, 'r') do | gpgPipe |
23
+ gpgData = gpgPipe.read
24
+ end
25
+ pp gpgData if @debug
26
+ gpgData.each_line do | aLine |
21
27
  next if aLine =~ /^tru/
22
28
  if aLine =~ /^pub/ then
23
29
  saveLastKey(lastKey)
@@ -38,8 +44,16 @@ module SimpleHKP
38
44
  lastKey['colonData'] << aLine
39
45
  end
40
46
  saveLastKey(lastKey)
47
+ puts "finished initial loading of keys" if @debug
48
+ pp @keyLookupData if @debug
41
49
  @keyLookupData.each_pair do | key, value |
42
- value['humanData'] = `gpg2 --list-sig #{key}`
50
+ puts "looking up human data for #{key}"
51
+ pp value
52
+ gpg2Cmd = "gpg2 --homedir #{@keyDir} --list-sig #{key}"
53
+ puts gpg2Cmd if @debug
54
+ IO.popen(gpg2Cmd) do | gpgPipe |
55
+ value['humanData'] = gpgPipe.read
56
+ end
43
57
  end
44
58
  pp @keyLookupData if @debug
45
59
  puts "SimpleHKP: finished loading keys" if @debug
@@ -80,8 +94,9 @@ module SimpleHKP
80
94
  # send the key data through gpg2 (again ;-( to extract the keyID
81
95
  #
82
96
  gpgKeyData = ""
83
- IO.popen('gpg2 --with-fingerprint --with-colons -', 'r+') do | pipe |
84
- puts 'gpg2 --with-fingerprint --with-colons -' if @debug
97
+ gpg2Cmd = "gpg2 --homedir #{@keyDir} --with-fingerprint --with-colons -"
98
+ puts gpg2Cmd if @debug
99
+ IO.popen(gpg2Cmd, 'r+') do | pipe |
85
100
  pipe.write(keys[0][1])
86
101
  pipe.close_write
87
102
  gpgKeyData = pipe.read
@@ -116,7 +116,7 @@ module SimpleHKP
116
116
  #
117
117
  defaultOptions = {
118
118
  'debug' => false,
119
- 'title' => 'SimpleHKP',
119
+ 'title' => "SimpleHKP @ #{Socket.gethostname}",
120
120
  'simpleHKPdir' => 'simpleHKP',
121
121
  'keyDir' => 'keys',
122
122
  'idDir' => 'identities',
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-gnupg-keyserver
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-03-15 00:00:00.000000000 Z
12
+ date: 2015-03-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rdoc