Certificate's public key data contains more of the encoding. PKCS #7 using public key from certificates calls proper decode.