Lines Matching defs:blob

441 /* Here is the file format. There are two parts in blob.value, the secret and
443 * can be found in blob.length. The description is stored after the secret in
444 * plaintext, and its size is specified in blob.info. The total size of the two
446 * the second is the blob's type, and the third byte is flags. Fields other
447 * than blob.info, blob.length, and blob.value are modified by encryptBlob()
464 struct __attribute__((packed)) blob {
506 Blob(blob b) {
573 ALOGV("writing blob %s", filename);
576 ALOGD("couldn't insert encrypted blob while not unlocked");
624 ALOGW("blob not fully written %zu != %zu", writtenBytes, fileLength);
629 ALOGW("could not rename blob to %s: %s", filename, strerror(errno));
636 ALOGV("reading blob %s", filename);
694 struct blob mBlob;
797 // we read the raw blob to just to get the salt to generate
799 blob rawBlob;
1093 * it must be read it again since the blob is encrypted each time
1394 bool upgradeBlob(const char* filename, Blob* blob, const uint8_t oldVersion,
1403 blob->setType(type);
1405 importBlobAsKey(blob, filename, uid);
1415 blob->setEncrypted(true);
1421 * If we've updated, set the key blob to the right version
1426 blob->setVersion(version);
1433 * Takes a blob that is an PEM-encoded RSA key as a byte array and
1435 * Then it overwrites the original blob with the new blob
1438 ResponseCode importBlobAsKey(Blob* blob, const char* filename, uid_t uid) {
1439 // We won't even write to the blob directly with this BIO, so const_cast is okay.
1440 Unique_BIO b(BIO_new_mem_buf(const_cast<uint8_t*>(blob->getValue()), blob->getLength()));
1467 blob->isEncrypted() ? KEYSTORE_FLAG_ENCRYPTED : KEYSTORE_FLAG_NONE);
1472 return get(filename, blob, TYPE_KEY_PAIR, uid);
1563 ALOGW("couldn't rename blob: %s: %s", file->d_name, strerror(errno));