openssl_rsa_pss_verify 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44a4ccb80102f8635f7415c06505fca8ad83b591
4
- data.tar.gz: 5aba0e280d096a9fbd0ba5f511d6130edfc28fda
3
+ metadata.gz: af0176c1dba9f84f2f57ea4eb05049f8fc6bf02b
4
+ data.tar.gz: 95b797966ec7f45481703f74d957fd4663be3c5d
5
5
  SHA512:
6
- metadata.gz: fa7786066d4219f1b8cbc64ccb12acbfb3936787fe487c618a87e6e1c9c29f513daa30c8180f1ce5b31f65f3d42e76b9d2b4883756d6bd30e9d89712de208da2
7
- data.tar.gz: adc236ec981e9db81403978646c26dc47acfdd3a71a7c7956717b4a6e6293737d142ba6ae961ceb53f074f83c49adfd0c1b9cd67c9e5a0dddb613188a946fab1
6
+ metadata.gz: efe83c77ad8ee6469ebce3b77ab1ec5a461b8469c69109cc46ef360f45934b5da9aed9dc92516f641027641c9d147ab043c3ae91470aa70acfdd10ebacc3646b
7
+ data.tar.gz: fe05719b3f4ffca9cf1e5249d084de42a4151533aad10e95a83130afcb2a3cfa138ec8edab1e443856e5ed88ff1579bb71cba901dfea3c55c69778637ca044dc
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- openssl_rsa_pss_verify (0.1.2)
4
+ openssl_rsa_pss_verify (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -18,6 +18,7 @@ static VALUE rb_cRSAError;
18
18
 
19
19
  enum ORPV_errors {
20
20
  OK,
21
+ EXTERNAL,
21
22
  KEY_OVERFLOW,
22
23
  NOMEM,
23
24
  PUBKEY_PARSE,
@@ -46,6 +47,11 @@ VALUE ORPV__verify_pss_sha1(VALUE self, VALUE vPubKey, VALUE vSig, VALUE vHashDa
46
47
  int verify_rval = -1, salt_len;
47
48
  char ossl_err_str[120] = "[no internal OpenSSL error was flagged]";
48
49
 
50
+ if (ERR_peek_error()) {
51
+ err = EXTERNAL;
52
+ goto Cleanup;
53
+ }
54
+
49
55
  vPubKey = StringValue(vPubKey);
50
56
  vSig = StringValue(vSig);
51
57
  vHashData = StringValue(vHashData);
@@ -138,6 +144,10 @@ Cleanup:
138
144
  }
139
145
  break;
140
146
 
147
+ case EXTERNAL:
148
+ BIND_ERR_STR(ossl_err_str);
149
+ rb_raise(rb_eRuntimeError, "OpenSSL was in an error state prior to invoking this verification.\n%s", ossl_err_str);
150
+ break;
141
151
  case KEY_OVERFLOW:
142
152
  rb_raise(rb_cRSAError, "Your public key is too big. How is that even possible?");
143
153
  break;
@@ -1,3 +1,3 @@
1
1
  module OpenSSL_RSA_PSS_Verify
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openssl_rsa_pss_verify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jon Distad
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-26 00:00:00.000000000 Z
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec