fetch from keystore, unmarshalling to object if possible
(self, name)
| 859 | return self.key.encrypt(*args, **kwargs) |
| 860 | |
| 861 | def fetch(self, name): |
| 862 | """ |
| 863 | fetch from keystore, unmarshalling to object if possible |
| 864 | """ |
| 865 | key = self.cache.fetch("master_keys", name) |
| 866 | |
| 867 | if not key: |
| 868 | return |
| 869 | |
| 870 | if name.endswith(".pem"): |
| 871 | return PrivateKey.from_str(key) |
| 872 | elif name.endswith(".pub"): |
| 873 | return PublicKey.from_str(key) |
| 874 | else: |
| 875 | return key |
| 876 | |
| 877 | |
| 878 | def _auth_singleton_key(opts): |
no test coverage detected