gpg-locksmith 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +62 -0
- data/.ruby-version +1 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +129 -0
- data/LICENSE +22 -0
- data/README.md +31 -0
- data/Rakefile +3 -0
- data/docs/design.md +30 -0
- data/lib/locksmith.rb +5 -0
- data/lib/locksmith/version.rb +3 -0
- data/locksmith.gemspec +23 -0
- data/spec/spec_helper.rb +12 -0
- metadata +85 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 368818870b575dcf79a3f1fee7d6473d6cddc293
|
4
|
+
data.tar.gz: 07582f115486d9caee4cedb86dee0479cf42cabc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d76701af274404cee99ac9279e6a7b7b845627d1379faae2c865bfb6f2530de04869dc58c2dac7efcca93e1c99c09c8be3a395081d7f5eb90b242057ad1094c0
|
7
|
+
data.tar.gz: ed669c005ca465c0363fff4f31ee3fd9cd8e7f96cc19fd1d7b84ab2eb094263fe5a5cc527e59fe5b84071ab1dbcad007a78e4fce49f51d72c673875865997567
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,62 @@
|
|
1
|
+
LineLength:
|
2
|
+
Description: 'Limit lines to 120 characters.'
|
3
|
+
Max: 120
|
4
|
+
|
5
|
+
MethodLength:
|
6
|
+
Description: 'Avoid methods longer than 25 lines of code.'
|
7
|
+
CountComments: false # count full line comments?
|
8
|
+
Max: 25
|
9
|
+
|
10
|
+
BlockNesting:
|
11
|
+
Description: 'Avoid more than `Max` levels of nesting.'
|
12
|
+
Max: 5
|
13
|
+
|
14
|
+
# Align the elements of a hash literal if they span more than one line.
|
15
|
+
AlignHash:
|
16
|
+
# Alignment of entries using hash rocket as separator. Valid values are:
|
17
|
+
#
|
18
|
+
# key - left alignment of keys
|
19
|
+
# 'a' => 2
|
20
|
+
# 'bb' => 3
|
21
|
+
# separator - alignment of hash rockets, keys are right aligned
|
22
|
+
# 'a' => 2
|
23
|
+
# 'bb' => 3
|
24
|
+
# table - left alignment of keys, hash rockets, and values
|
25
|
+
# 'a' => 2
|
26
|
+
# 'bb' => 3
|
27
|
+
EnforcedHashRocketStyle: table
|
28
|
+
# Alignment of entries using colon as separator. Valid values are:
|
29
|
+
#
|
30
|
+
# key - left alignment of keys
|
31
|
+
# a: 0
|
32
|
+
# bb: 1
|
33
|
+
# separator - alignment of colons, keys are right aligned
|
34
|
+
# a: 0
|
35
|
+
# bb: 1
|
36
|
+
# table - left alignment of keys and values
|
37
|
+
# a: 0
|
38
|
+
# bb: 1
|
39
|
+
EnforcedColonStyle: separator
|
40
|
+
|
41
|
+
IfWithSemicolon:
|
42
|
+
Enabled: false
|
43
|
+
|
44
|
+
Semicolon:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
AssignmentInCondition:
|
48
|
+
Enabled: false
|
49
|
+
|
50
|
+
Alias:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
NumericLiterals:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
# should be dynamic if it's being used for test
|
57
|
+
RescueModifier:
|
58
|
+
Enabled: false
|
59
|
+
|
60
|
+
# should be turned on as a separate task
|
61
|
+
Documentation:
|
62
|
+
Enabled: false
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.1
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
abstract_type (0.0.7)
|
5
|
+
adamantium (0.1.0)
|
6
|
+
ice_nine (~> 0.9)
|
7
|
+
thread_safe (~> 0.1.2)
|
8
|
+
anima (0.2.0)
|
9
|
+
abstract_type (~> 0.0.7)
|
10
|
+
adamantium (~> 0.1)
|
11
|
+
equalizer (~> 0.0.8)
|
12
|
+
ast (1.1.0)
|
13
|
+
atomic (1.1.15)
|
14
|
+
coderay (1.1.0)
|
15
|
+
concord (0.1.4)
|
16
|
+
adamantium (~> 0.1)
|
17
|
+
equalizer (~> 0.0.7)
|
18
|
+
coveralls (0.7.0)
|
19
|
+
multi_json (~> 1.3)
|
20
|
+
rest-client
|
21
|
+
simplecov (>= 0.7)
|
22
|
+
term-ansicolor
|
23
|
+
thor
|
24
|
+
crystalline (1.5.3)
|
25
|
+
coveralls
|
26
|
+
erubis
|
27
|
+
flay
|
28
|
+
flog
|
29
|
+
gli
|
30
|
+
mutant (~> 0.3.0.rc1)
|
31
|
+
pry
|
32
|
+
rake
|
33
|
+
reek
|
34
|
+
rspec (~> 2.14.0)
|
35
|
+
rubocop
|
36
|
+
tilt
|
37
|
+
descendants_tracker (0.0.3)
|
38
|
+
diff-lcs (1.2.5)
|
39
|
+
docile (1.1.3)
|
40
|
+
equalizer (0.0.9)
|
41
|
+
erubis (2.7.0)
|
42
|
+
flay (2.4.0)
|
43
|
+
ruby_parser (~> 3.0)
|
44
|
+
sexp_processor (~> 4.0)
|
45
|
+
flog (4.2.0)
|
46
|
+
ruby_parser (~> 3.1, > 3.1.0)
|
47
|
+
sexp_processor (~> 4.4)
|
48
|
+
gli (2.9.0)
|
49
|
+
ice_nine (0.9.0)
|
50
|
+
inflecto (0.0.2)
|
51
|
+
json (1.8.1)
|
52
|
+
method_source (0.8.2)
|
53
|
+
mime-types (2.1)
|
54
|
+
multi_json (1.9.0)
|
55
|
+
mutant (0.3.6)
|
56
|
+
abstract_type (~> 0.0.7)
|
57
|
+
adamantium (~> 0.1.0)
|
58
|
+
anima (~> 0.2.0)
|
59
|
+
concord (~> 0.1.4)
|
60
|
+
descendants_tracker (~> 0.0.1)
|
61
|
+
equalizer (~> 0.0.7)
|
62
|
+
ice_nine (~> 0.9.0)
|
63
|
+
inflecto (~> 0.0.2)
|
64
|
+
parser (~> 2.1.4)
|
65
|
+
procto (~> 0.0.2)
|
66
|
+
rspec (~> 2.14.1)
|
67
|
+
unparser (~> 0.1.8)
|
68
|
+
parser (2.1.7)
|
69
|
+
ast (~> 1.1)
|
70
|
+
slop (~> 3.4, >= 3.4.5)
|
71
|
+
powerpack (0.0.9)
|
72
|
+
procto (0.0.2)
|
73
|
+
pry (0.9.12.6)
|
74
|
+
coderay (~> 1.0)
|
75
|
+
method_source (~> 0.8)
|
76
|
+
slop (~> 3.4)
|
77
|
+
rainbow (2.0.0)
|
78
|
+
rake (10.1.1)
|
79
|
+
reek (1.3.6)
|
80
|
+
ruby2ruby (~> 2.0.7)
|
81
|
+
ruby_parser (~> 3.2)
|
82
|
+
sexp_processor
|
83
|
+
rest-client (1.6.7)
|
84
|
+
mime-types (>= 1.16)
|
85
|
+
rspec (2.14.1)
|
86
|
+
rspec-core (~> 2.14.0)
|
87
|
+
rspec-expectations (~> 2.14.0)
|
88
|
+
rspec-mocks (~> 2.14.0)
|
89
|
+
rspec-core (2.14.8)
|
90
|
+
rspec-expectations (2.14.5)
|
91
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
92
|
+
rspec-mocks (2.14.6)
|
93
|
+
rubocop (0.18.1)
|
94
|
+
json (>= 1.7.7, < 2)
|
95
|
+
parser (~> 2.1.3)
|
96
|
+
powerpack (~> 0.0.6)
|
97
|
+
rainbow (>= 1.99.1, < 3.0)
|
98
|
+
ruby2ruby (2.0.7)
|
99
|
+
ruby_parser (~> 3.1)
|
100
|
+
sexp_processor (~> 4.0)
|
101
|
+
ruby_parser (3.4.1)
|
102
|
+
sexp_processor (~> 4.1)
|
103
|
+
sexp_processor (4.4.1)
|
104
|
+
simplecov (0.8.2)
|
105
|
+
docile (~> 1.1.0)
|
106
|
+
multi_json
|
107
|
+
simplecov-html (~> 0.8.0)
|
108
|
+
simplecov-html (0.8.0)
|
109
|
+
slop (3.4.7)
|
110
|
+
term-ansicolor (1.3.0)
|
111
|
+
tins (~> 1.0)
|
112
|
+
thor (0.18.1)
|
113
|
+
thread_safe (0.1.3)
|
114
|
+
atomic
|
115
|
+
tilt (2.0.0)
|
116
|
+
tins (1.0.0)
|
117
|
+
unparser (0.1.9)
|
118
|
+
abstract_type (~> 0.0.7)
|
119
|
+
adamantium (~> 0.1)
|
120
|
+
concord (~> 0.1.4)
|
121
|
+
equalizer (~> 0.0.7)
|
122
|
+
parser (~> 2.1.0)
|
123
|
+
procto (~> 0.0.2)
|
124
|
+
|
125
|
+
PLATFORMS
|
126
|
+
ruby
|
127
|
+
|
128
|
+
DEPENDENCIES
|
129
|
+
crystalline
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2012 Joe Fredette
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# locksmith [![Gem Version](https://badge.fury.io/rb/locksmith.png)](http://badge.fury.io/rb/locksmith)[![Build Status](https://travis-ci.org/fredettej/locksmith.png?branch=master)](http://travis-ci.org/fredettej/locksmith)[![Code Climate](https://codeclimate.com/github/fredettej/locksmith.png)](https://codeclimate.com/github/fredettej/locksmith)[![Coverage Status](https://coveralls.io/repos/fredettej/locksmith/badge.png?branch=master)](https://coveralls.io/r/fredettej/locksmith)
|
2
|
+
|
3
|
+
Manages sharing your GPG keys between computers you control.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'locksmith'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install locksmith
|
18
|
+
|
19
|
+
## Contributing
|
20
|
+
|
21
|
+
1. Fork it
|
22
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
23
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
24
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
25
|
+
5. Create new Pull Request
|
26
|
+
|
27
|
+
# LICENSE
|
28
|
+
|
29
|
+
Copyright 2014, Joe Fredette
|
30
|
+
|
31
|
+
Released under the MIT open source license, see LICENSE for details
|
data/Rakefile
ADDED
data/docs/design.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Design
|
2
|
+
|
3
|
+
## Key sharing
|
4
|
+
|
5
|
+
I maintain a number of GPG keys for different purposes, from signing keys for
|
6
|
+
work and personal use, to encryption keys for communication, and so on.
|
7
|
+
|
8
|
+
Having several keys makes it easy to maintain different levels of security,
|
9
|
+
different expirations, differnet rotation strategies, and so on.
|
10
|
+
|
11
|
+
The hard part is this -- how can you conveniently, securely transfer keys
|
12
|
+
between multiple machines?
|
13
|
+
|
14
|
+
Ideally it would be something like Dropbox, all that would be required would be
|
15
|
+
to drop keys into one place and they'd automatically get moved around, no
|
16
|
+
problem.
|
17
|
+
|
18
|
+
The problem is that now your private keys are on a remote machine -- that sucks,
|
19
|
+
we don't want that, so instead we can use Bittorrent Sync.
|
20
|
+
|
21
|
+
Even then, we've only got one level of encryption, and though I'm sure BTSync is
|
22
|
+
pretty good, my level of paranoia is a few ticks higher. Instead, we can further
|
23
|
+
encrypt these keys with public keys for the target machines. Essentially, an
|
24
|
+
otherwise unpublished public key for each machine in the sharing ring. These
|
25
|
+
keys are transferred by you, and only you, by sneakernet, scp, whatever. I use
|
26
|
+
BTSync to sync the public keys. Locksmith runs on each machine as a daemon, when
|
27
|
+
it sees a new public key, it automatically imports it to the local keyring
|
28
|
+
(again, these keys are not shared), it then encrypts all the local keys listed
|
29
|
+
in the .localkeys file in the directory specified by the configuration. These
|
30
|
+
keys are put in a folder which is watched by the new machine.
|
data/lib/locksmith.rb
ADDED
data/locksmith.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'locksmith/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "gpg-locksmith"
|
8
|
+
spec.version = Locksmith::VERSION
|
9
|
+
spec.authors = ["Joe Fredette"]
|
10
|
+
spec.email = ["jfredett@gmail.com"]
|
11
|
+
spec.summary = %q{Manages sharing your GPG keys between computers you control.}
|
12
|
+
spec.description = %q{Manages sharing your GPG keys between computers you control.}
|
13
|
+
spec.homepage = ""
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.5"
|
22
|
+
spec.add_development_dependency "rake"
|
23
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'crystalline/spec'
|
2
|
+
|
3
|
+
#include helpers
|
4
|
+
Dir["./spec/helpers/*.rb"].each { |file| require file }
|
5
|
+
|
6
|
+
#include shared examples
|
7
|
+
Dir["./spec/shared/*_examples.rb"].each { |file| require file }
|
8
|
+
|
9
|
+
Coveralls.wear! if ENV['COVERALLS'] || ENV['CI']
|
10
|
+
|
11
|
+
Crystalline::Spec.install!
|
12
|
+
|
metadata
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gpg-locksmith
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joe Fredette
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-03-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.5'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Manages sharing your GPG keys between computers you control.
|
42
|
+
email:
|
43
|
+
- jfredett@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".rubocop.yml"
|
49
|
+
- ".ruby-version"
|
50
|
+
- Gemfile
|
51
|
+
- Gemfile.lock
|
52
|
+
- LICENSE
|
53
|
+
- README.md
|
54
|
+
- Rakefile
|
55
|
+
- docs/design.md
|
56
|
+
- lib/locksmith.rb
|
57
|
+
- lib/locksmith/version.rb
|
58
|
+
- locksmith.gemspec
|
59
|
+
- spec/spec_helper.rb
|
60
|
+
homepage: ''
|
61
|
+
licenses:
|
62
|
+
- MIT
|
63
|
+
metadata: {}
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
requirements: []
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 2.2.0
|
81
|
+
signing_key:
|
82
|
+
specification_version: 4
|
83
|
+
summary: Manages sharing your GPG keys between computers you control.
|
84
|
+
test_files:
|
85
|
+
- spec/spec_helper.rb
|