mail-gpg 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/History.txt +5 -0
- data/lib/mail/gpg.rb +4 -5
- data/lib/mail/gpg/verify_result_attribute.rb +1 -1
- data/lib/mail/gpg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5372354dbe32dbf5c05196f257b8172582e5ffcc
|
4
|
+
data.tar.gz: 983703ee19cac1078e36c37bfde1b13906fd0ffa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aeb9b25b2c04e4c0a71b1eea09631e399a82dbcef6b707b75a4053bca637e66dbdd1d3eabf88673c16a75b8ffd623fabdbdc1e9fe906c10b0ceee4debe452c75
|
7
|
+
data.tar.gz: 241a812c8341db86deae1bf48927e5a1c5e92491c505ab67706a9c3e83768c341207dc4d00dcc434d4fbff29252c6625ea5a55110a91a9d033bfb2a534701de6
|
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.3.1 2017-04-13
|
2
|
+
|
3
|
+
* fixes a bug with signature verification that only surfaced in environments
|
4
|
+
where ActiveSupport isn't loaded. Thanks @mashedcode for pointing this out.
|
5
|
+
|
1
6
|
== 0.3.0 2016-12-27
|
2
7
|
|
3
8
|
* [MIGHT BREAK THINGS] All mail headers will preserved now, if you want to
|
data/lib/mail/gpg.rb
CHANGED
@@ -116,12 +116,11 @@ module Mail
|
|
116
116
|
|
117
117
|
# decrypts PGP/MIME (RFC 3156, section 4) encrypted mail
|
118
118
|
def self.decrypt_pgp_mime(encrypted_mail, options)
|
119
|
-
|
120
|
-
|
121
|
-
raise EncodingError, "RFC 3136 mandates exactly two body parts, found '#{encrypted_mail.parts.length}'"
|
119
|
+
if encrypted_mail.parts.length < 2
|
120
|
+
raise EncodingError, "RFC 3156 mandates exactly two body parts, found '#{encrypted_mail.parts.length}'"
|
122
121
|
end
|
123
122
|
if !VersionPart.isVersionPart? encrypted_mail.parts[0]
|
124
|
-
raise EncodingError, "RFC
|
123
|
+
raise EncodingError, "RFC 3156 first part not a valid version part '#{encrypted_mail.parts[0]}'"
|
125
124
|
end
|
126
125
|
decrypted = DecryptedPart.new(encrypted_mail.parts[1], options)
|
127
126
|
Mail.new(decrypted.raw_source) do
|
@@ -151,7 +150,7 @@ module Mail
|
|
151
150
|
def self.signature_valid_pgp_mime?(signed_mail, options)
|
152
151
|
# MUST contain exactly two body parts
|
153
152
|
if signed_mail.parts.length != 2
|
154
|
-
raise EncodingError, "RFC
|
153
|
+
raise EncodingError, "RFC 3156 mandates exactly two body parts, found '#{signed_mail.parts.length}'"
|
155
154
|
end
|
156
155
|
result, verify_result = SignPart.verify_signature(signed_mail.parts[0], signed_mail.parts[1], options)
|
157
156
|
signed_mail.verify_result = verify_result
|
data/lib/mail/gpg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mail-gpg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Kraemer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mail
|