A MIME message can have multiple signers and information about them is available in
SignedContentInfo.SignerInfos collection. Each signer has an associated certificate chain which should contain the root certificate.
For example, to get root certificate of the first signer, use the following code:
Certificate rootCertificate = _mimeMimeMessage.SignedContentInfo.SignerInfos.CertificateChain.RootCertificate
Please note that
CertificateChain might be
null if the certificates were not embedded in the message and not present in local certificate stores. Also, the chain might be incomplete, which would result in
null. I have not included checks for these conditions in the sample code above for simplicity.