methodTsmCustomTLSInternalServer.LoadRootCertsFromFile
function LoadRootCertsFromFile(AFileName: TFileName): Integer;
Loads a single DER/CER/CRT certificate, or a PKCS#7 (.p7b/.p7c) bundle, into RootCerts - the trust anchors used to validate the peer's certificate chain. An application populates this with the CA certificates it is willing to trust; it applies to both client-side (validating a server cert) and server-side (validating a client cert, when mTLS is enabled). Loads trust anchors into RootCerts and RETURNS HOW MANY WERE ADDED, so a caller can tell "loaded nothing" from "loaded something" - this used to be a procedure that silently did nothing when it did not recognise the file, and a server could come up trusting nobody with no error anywhere. Existing callers that ignore the result still compile. The format is detected from the CONTENT, not the extension: a PEM file is read whatever it is called (.pem, but also the very common PEM-in-a-.crt), and a multi-certificate PEM bundle loads EVERY certificate in it. .p7b/.p7c still go through the PKCS#7 importer; anything else is read as a single DER cert.