Lines Matching refs:filename

23 VbPrivateKey* PrivateKeyReadPem(const char* filename, uint64_t algorithm) {  in PrivateKeyReadPem()  argument
35 f = fopen(filename, "r"); in PrivateKeyReadPem()
37 VBDEBUG(("%s(): Couldn't open key file: %s\n", __FUNCTION__, filename)); in PrivateKeyReadPem()
44 filename)); in PrivateKeyReadPem()
72 int PrivateKeyWrite(const char* filename, const VbPrivateKey* key) { in PrivateKeyWrite() argument
83 f = fopen(filename, "wb"); in PrivateKeyWrite()
85 VbExError("Unable to open file %s\n", filename); in PrivateKeyWrite()
91 VbExError("Unable to write to file %s\n", filename); in PrivateKeyWrite()
94 unlink(filename); /* Delete any partial file */ in PrivateKeyWrite()
98 VbExError("Unable to write to file %s\n", filename); in PrivateKeyWrite()
100 unlink(filename); /* Delete any partial file */ in PrivateKeyWrite()
109 VbPrivateKey* PrivateKeyRead(const char* filename) { in PrivateKeyRead() argument
115 buffer = ReadFile(filename, &filelen); in PrivateKeyRead()
117 VbExError("unable to read from file %s\n", filename); in PrivateKeyRead()
160 VbPublicKey* PublicKeyReadKeyb(const char* filename, uint64_t algorithm, in PublicKeyReadKeyb() argument
177 key_data = ReadFile(filename, &key_size); in PublicKeyReadKeyb()
229 VbPublicKey* PublicKeyRead(const char* filename) { in PublicKeyRead() argument
233 key = (VbPublicKey*)ReadFile(filename, &file_size); in PublicKeyRead()
245 int PublicKeyWrite(const char* filename, const VbPublicKey* key) { in PublicKeyWrite() argument
259 rv = WriteFile(filename, kcopy, kcopy->key_offset + kcopy->key_size); in PublicKeyWrite()