It seems the whole process is stateful, where "first run" generates a key pair and the key will be used in "following runs". In general, Teaclave cannot handle statefule tasks since FaaS is stateless in nature.
However, specifically in your case, an alternative solution is like this: 1. Prepare a function which outputs a key for signing, and this "key file" will be an encrypted output. 2. Make your Python application accepting an additional input arg, the "key file" generated in step 1. This "key file" can be provided by another party (rather than the user, e.g. service provider), and the Python application sign PDF file with the corresponding key. If you really want to make it a single function, you can always ask the function to take another input to choose if it's going to generate a key or sign a PDF. Hope I understand your requirements correctly and hope this can help. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-teaclave/issues/554#issuecomment-931358162