Hi Varun,
Not sure I can answer any of your questions, but here are a few thoughts/comments from reading a bit of your code. Please use them to guide you as you see fit.
1- I like how you choose to use Python's triple quotes to store signature. Is there any example you have received this idea from. It may be useful for future devs on the project to understand the rational for the choice there.
2- The signature passes pep8, flake8 and pylint default settings with no warnings, that is very good.
3- In Extract_Sign_Cert_Content there are a few code review ideas I had, would you like me to detail them?
Here are a couple of tests to consider:
1- effects of newline characters. Especially if signature is created on one platform and verified on another. I note that you are using readLine in the code, so there is the possibility there of issues.
2- test with input streams that are perhaps slow to respond, can input stream provide all code up to and including signature, appear finished, but then when run the rest of the (malicious) file after the signature runs fine. I note that you are using ready to determine end of input, but that may not do what you expect. What if the input is a StringReader for example?
Jonah