From 0219b1be47b5220e0efcd45fd769d80ff4d1ec52 Mon Sep 17 00:00:00 2001 From: Hiro Asari Date: Tue, 26 Nov 2019 15:35:03 -0500 Subject: [PATCH] Use OAEP padding when encrypting secrets --- lib/travis/client/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/travis/client/repository.rb b/lib/travis/client/repository.rb index 99441f0c..34527c6a 100644 --- a/lib/travis/client/repository.rb +++ b/lib/travis/client/repository.rb @@ -13,7 +13,7 @@ def initialize(data, fingerprint) end def encrypt(value) - encrypted = to_rsa.public_encrypt(value) + encrypted = to_rsa.public_encrypt(value, OpenSSL::PKey::RSA::PKCS1_OAEP_PADDING) Base64.encode64(encrypted).gsub(/\s+/, "") end