I want to have a cert store based on sqlite that keeps keys, certificates and CSRs and offers a file-system interface to it.
These are the objectives: - Have the system read-only(for now) with several folders => keys, certificates, csr. Inside every folder I should have pem, der, etc. Every folder(pem, der, etc) should list the entities - but every read of the files would return a different format.
I want to use fuse. I have all the pieces of the puzzle but I am stuck at this. In the sqlite backend all my keys, csrs, certificates will be in der format. I want to do a conversion on-the-fly from the opening of the file until the closing of it.
So, I don't want to convert the file or the bundle at the time of fuse_operations.getattr to get the size. So I thought that I could do something like feed 0 to the stat structure and when reading return how many bytes I read, but I was wrong.
Can someone offer some pointers on this ? Can I have a file with 0 size on getattr that could be read at the real size ?
Aucun commentaire:
Enregistrer un commentaire