Skip to content

tls: replace getX509ExtensionValue#12934

Merged
lizan merged 3 commits intoenvoyproxy:masterfrom
zuercher:zuercher-fix-x509-ext-value
Sep 10, 2020
Merged

tls: replace getX509ExtensionValue#12934
lizan merged 3 commits intoenvoyproxy:masterfrom
zuercher:zuercher-fix-x509-ext-value

Conversation

@zuercher
Copy link
Member

@zuercher zuercher commented Sep 1, 2020

The existing access for X509 extension values is unused in Envoy, but
will be used in the near future for detection of certificates with the
OCSP must-staple extension (see #12685). The existing implementation,
however, assumes that all extension values can be safely decoded with
ASN1_get_object, which is incorrect. Here we replace getX509ExtensionValue
with a corrected implementation that produces different output (that is,
the entire value octet string versus a partially decoded value). We
remove (unused) access to extensions from Envoy::Ssl::Connection and
rename the utility method to insure that downstream projects do not
unintentionally consume the altered return value.

Risk Level: low, not used in Envoy
Testing: moved existing unit tests
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher zuercher@gmail.com

The existing access for X509 extension values is unused in Envoy, but
will be used in the near future for detection of certificates with the
OCSP must-staple extension (see envoyproxy#12685). The existing implementation,
however, assumes that all extension values can be safely decoded with
ASN1_get_object, which is incorrect. Here we replace that function
with a correct implementation that produces different output (that is,
the entire value octet string versus a partially decoded value). We
remove (unused) access to extension from Envoy::Ssl::Connection and
rename the utility method to insure that downstream projects do not
unintentionally consume the altered return values.

Risk Level: low, not used in Envoy
Testing: moved existing unit tests
Docs Changes: n/a
Release Notes: n/a

Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
davidben
davidben previously approved these changes Sep 2, 2020
Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
davidben
davidben previously approved these changes Sep 2, 2020
Signed-off-by: Stephan Zuercher <zuercher@gmail.com>
@zuercher
Copy link
Member Author

friendly ping @lizan

@lizan lizan merged commit b7c5186 into envoyproxy:master Sep 10, 2020
@zuercher zuercher deleted the zuercher-fix-x509-ext-value branch March 3, 2021 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants