diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-25 19:14:49 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-25 19:14:49 +0000 |
commit | 04817ae6d3e1d898d6fbf09ad146850d26d2b404 (patch) | |
tree | 7e5482d13830cacf363d21a087b490588a960095 /lib/rubygems/security | |
parent | c107372597586e1ad0fea03c00a14bdd7205b5d8 (diff) | |
download | ruby-04817ae6d3e1d898d6fbf09ad146850d26d2b404.tar.gz |
* lib/rubygems: Update to RubyGems master 612f85a. Notable changes:
Fixed installation and activation of git: and path: gems via
Gem.use_gemdeps
Improved documentation coverage
* test/rubygems: ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/security')
-rw-r--r-- | lib/rubygems/security/trust_dir.rb | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/rubygems/security/trust_dir.rb b/lib/rubygems/security/trust_dir.rb index dd51308ee5..76ef89af7f 100644 --- a/lib/rubygems/security/trust_dir.rb +++ b/lib/rubygems/security/trust_dir.rb @@ -1,10 +1,26 @@ +## +# The TrustDir manages the trusted certificates for gem signature +# verification. + class Gem::Security::TrustDir + ## + # Default permissions for the trust directory and its contents + DEFAULT_PERMISSIONS = { :trust_dir => 0700, :trusted_cert => 0600, } + ## + # The directory where trusted certificates will be stored. + + attr_reader :dir + + ## + # Creates a new TrustDir using +dir+ where the directory and file + # permissions will be checked according to +permissions+ + def initialize dir, permissions = DEFAULT_PERMISSIONS @dir = dir @permissions = permissions @@ -12,8 +28,6 @@ class Gem::Security::TrustDir @digester = Gem::Security::DIGEST_ALGORITHM end - attr_reader :dir - ## # Returns the path to the trusted +certificate+ |