Skip to content

Commit b8ab4b2

Browse files
author
Katyal
committed
Revert "Add back in the verification of the certs by open SSL library"
This reverts commit 9d13f1b. cr https://code.amazon.com/reviews/CR-2114105
1 parent ed33cf3 commit b8ab4b2

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

lib/instance_agent/plugins/codedeploy/deployment_specification.rb

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,8 @@ def self.parse(envelope)
106106
case envelope.format
107107
when "PKCS7/JSON"
108108
pkcs7 = OpenSSL::PKCS7.new(envelope.payload)
109-
110-
# The PKCS7_NOCHAIN flag tells OpenSSL to ignore any PKCS7 CA chain that might be attached
111-
# to the message directly and use the certificates from provided one only for validating the.
112-
# signer's certificate.
113-
#
114-
# However, it will allow use the PKCS7 signer certificate provided to validate the signature.
115-
#
116-
# http://www.openssl.org/docs/crypto/PKCS7_verify.html#VERIFY_PROCESS
117-
#
118-
# The ruby wrapper returns true if OpenSSL returns 1
119-
raise "Validation of PKCS7 signed message failed" unless pkcs7.verify([], @cert_store, nil, OpenSSL::PKCS7::NOCHAIN)
109+
pkcs7.verify([], @cert_store, nil, OpenSSL::PKCS7::NOVERIFY)
110+
# NOTE: the pkcs7.data field is only populated AFTER pkcs7.verify() is called!
120111
parse_deployment_spec_data(pkcs7.data)
121112
when "TEXT/JSON"
122113
raise "Unsupported DeploymentSpecification format: #{envelope.format}" unless AWS::CodeDeploy::Local::Deployer.running_as_developer_utility?

0 commit comments

Comments
 (0)