From 83db3da8cb477c3bc7d75254d8bb6b88b8defd36 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Thu, 4 Apr 2024 11:05:15 +0800 Subject: [PATCH] fix(protocol): fix a SGX bug in pemCertChainLib (#16639) Co-authored-by: smtmfft --- .../contracts/automata-attestation/lib/PEMCertChainLib.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol b/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol index c6af0c73a83..68b33e8c776 100644 --- a/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol +++ b/packages/protocol/contracts/automata-attestation/lib/PEMCertChainLib.sol @@ -132,7 +132,7 @@ contract PEMCertChainLib is IPEMCertChainLib { bytes1 notBeforeTag = der[notBeforePtr.ixs()]; bytes1 notAfterTag = der[notAfterPtr.ixs()]; if ( - (notBeforeTag != 0x17 && notBeforeTag == 0x18) + (notBeforeTag != 0x17 && notBeforeTag != 0x18) || (notAfterTag != 0x17 && notAfterTag != 0x18) ) { return (false, cert);