From a631c4003a589228572e10a0bfcd261f6d385c78 Mon Sep 17 00:00:00 2001 From: Steven Bazyl Date: Wed, 2 Jan 2013 12:59:43 -0800 Subject: [PATCH] Read keyfile in binary mode --- lib/google/api_client/auth/key_utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/google/api_client/auth/key_utils.rb b/lib/google/api_client/auth/key_utils.rb index c70de50ccc..0c4a5271c3 100644 --- a/lib/google/api_client/auth/key_utils.rb +++ b/lib/google/api_client/auth/key_utils.rb @@ -79,7 +79,7 @@ module Google def self.load_key(keyfile, passphrase, &block) begin begin - content = File.read(keyfile) + content = File.open(keyfile, 'rb') { |io| io.read } rescue content = keyfile end -- 2.30.2