grpc 1.0.1.pre1-x64-mingw32 → 1.0.1-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/grpc_c.32.ruby +0 -0
- data/grpc_c.64.ruby +0 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +5 -8
- data/src/ruby/lib/grpc/2.0/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.1/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.2/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/2.3/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/grpc_c.so +0 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/generic/client_stub_spec.rb +51 -4
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f34b7e7958f85953b1934cd1e9f45014f0b10e7
|
4
|
+
data.tar.gz: 17a960bd48ebc923422fdaa21c0c95c8b8738293
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e55db28ac86a344fabf3ff912a28cb9c1be7037426c5546ffb47181dcb2b400ae08ee362973943d8fa0918e4df53f9479daf5e892567dd56ad23a9859bd4688c
|
7
|
+
data.tar.gz: 622936eb802bceeaebd0a02b91daa334290ed32142f389cc2f09284722584938350f25aedab72e107d5bef4846c79af2a9e52eb953f9e7ae2ab777efdf8c6d9a
|
data/grpc_c.32.ruby
CHANGED
Binary file
|
data/grpc_c.64.ruby
CHANGED
Binary file
|
@@ -86,19 +86,16 @@ static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args,
|
|
86
86
|
rb_funcall(exception_object, rb_intern("backtrace"), 0),
|
87
87
|
rb_intern("join"),
|
88
88
|
1, rb_str_new2("\n\tfrom "));
|
89
|
-
VALUE rb_exception_info = rb_funcall(exception_object, rb_intern("
|
90
|
-
const char *exception_classname = rb_obj_classname(exception_object);
|
89
|
+
VALUE rb_exception_info = rb_funcall(exception_object, rb_intern("inspect"), 0);
|
91
90
|
(void)args;
|
92
|
-
gpr_log(GPR_INFO, "Call credentials callback failed: %s
|
93
|
-
|
91
|
+
gpr_log(GPR_INFO, "Call credentials callback failed: %s\n%s",
|
92
|
+
StringValueCStr(rb_exception_info),
|
94
93
|
StringValueCStr(backtrace));
|
95
94
|
rb_hash_aset(result, rb_str_new2("metadata"), Qnil);
|
96
|
-
/* Currently only gives the exception class name. It should be possible get
|
97
|
-
more details */
|
98
95
|
rb_hash_aset(result, rb_str_new2("status"),
|
99
|
-
INT2NUM(
|
96
|
+
INT2NUM(GRPC_STATUS_UNAUTHENTICATED));
|
100
97
|
rb_hash_aset(result, rb_str_new2("details"),
|
101
|
-
|
98
|
+
rb_exception_info);
|
102
99
|
return result;
|
103
100
|
}
|
104
101
|
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/src/ruby/lib/grpc/grpc_c.so
CHANGED
Binary file
|
@@ -168,23 +168,61 @@ describe 'ClientStub' do
|
|
168
168
|
expect(&blk).to raise_error(GRPC::BadStatus)
|
169
169
|
th.join
|
170
170
|
end
|
171
|
+
|
172
|
+
it 'should receive UNAUTHENTICATED if call credentials plugin fails' do
|
173
|
+
server_port = create_secure_test_server
|
174
|
+
th = run_request_response(@sent_msg, @resp, @pass)
|
175
|
+
|
176
|
+
certs = load_test_certs
|
177
|
+
secure_channel_creds = GRPC::Core::ChannelCredentials.new(
|
178
|
+
certs[0], nil, nil)
|
179
|
+
secure_stub_opts = {
|
180
|
+
channel_args: {
|
181
|
+
GRPC::Core::Channel::SSL_TARGET => 'foo.test.google.fr'
|
182
|
+
}
|
183
|
+
}
|
184
|
+
stub = GRPC::ClientStub.new("localhost:#{server_port}",
|
185
|
+
secure_channel_creds, **secure_stub_opts)
|
186
|
+
|
187
|
+
error_message = 'Failing call credentials callback'
|
188
|
+
failing_auth = proc do
|
189
|
+
fail error_message
|
190
|
+
end
|
191
|
+
creds = GRPC::Core::CallCredentials.new(failing_auth)
|
192
|
+
|
193
|
+
error_occured = false
|
194
|
+
begin
|
195
|
+
get_response(stub, credentials: creds)
|
196
|
+
rescue GRPC::BadStatus => e
|
197
|
+
error_occured = true
|
198
|
+
expect(e.code).to eq(GRPC::Core::StatusCodes::UNAUTHENTICATED)
|
199
|
+
expect(e.details.include?(error_message)).to be true
|
200
|
+
end
|
201
|
+
expect(error_occured).to eq(true)
|
202
|
+
|
203
|
+
# Kill the server thread so tests can complete
|
204
|
+
th.kill
|
205
|
+
end
|
171
206
|
end
|
172
207
|
|
173
208
|
describe 'without a call operation' do
|
174
|
-
def get_response(stub)
|
209
|
+
def get_response(stub, credentials: nil)
|
210
|
+
puts credentials.inspect
|
175
211
|
stub.request_response(@method, @sent_msg, noop, noop,
|
176
|
-
metadata: { k1: 'v1', k2: 'v2' }
|
212
|
+
metadata: { k1: 'v1', k2: 'v2' },
|
213
|
+
credentials: credentials)
|
177
214
|
end
|
178
215
|
|
179
216
|
it_behaves_like 'request response'
|
180
217
|
end
|
181
218
|
|
182
219
|
describe 'via a call operation' do
|
183
|
-
def get_response(stub)
|
220
|
+
def get_response(stub, credentials: nil)
|
184
221
|
op = stub.request_response(@method, @sent_msg, noop, noop,
|
185
222
|
return_op: true,
|
186
223
|
metadata: { k1: 'v1', k2: 'v2' },
|
187
|
-
deadline: from_relative_time(2)
|
224
|
+
deadline: from_relative_time(2),
|
225
|
+
credentials: credentials)
|
188
226
|
expect(op).to be_a(GRPC::ActiveCall::Operation)
|
189
227
|
op.execute
|
190
228
|
end
|
@@ -441,6 +479,15 @@ describe 'ClientStub' do
|
|
441
479
|
end
|
442
480
|
end
|
443
481
|
|
482
|
+
def create_secure_test_server
|
483
|
+
certs = load_test_certs
|
484
|
+
secure_credentials = GRPC::Core::ServerCredentials.new(
|
485
|
+
nil, [{ private_key: certs[1], cert_chain: certs[2] }], false)
|
486
|
+
|
487
|
+
@server = GRPC::Core::Server.new(nil)
|
488
|
+
@server.add_http2_port('0.0.0.0:0', secure_credentials)
|
489
|
+
end
|
490
|
+
|
444
491
|
def create_test_server
|
445
492
|
@server = GRPC::Core::Server.new(nil)
|
446
493
|
@server.add_http2_port('0.0.0.0:0', :this_port_is_insecure)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grpc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.1
|
4
|
+
version: 1.0.1
|
5
5
|
platform: x64-mingw32
|
6
6
|
authors:
|
7
7
|
- gRPC Authors
|
8
8
|
autorequire:
|
9
9
|
bindir: src/ruby/bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -294,9 +294,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
294
294
|
version: 2.0.0
|
295
295
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
296
296
|
requirements:
|
297
|
-
- - "
|
297
|
+
- - ">="
|
298
298
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
299
|
+
version: '0'
|
300
300
|
requirements: []
|
301
301
|
rubyforge_project:
|
302
302
|
rubygems_version: 2.5.1
|