Home | History | Annotate | Download | only in keystore

Lines Matching defs:Blob

254 /* Here is the file format. There are two parts in blob.value, the secret and
256 * can be found in blob.length. The description is stored after the secret in
257 * plaintext, and its size is specified in blob.info. The total size of the two
259 * the second is the blob's type, and the third byte is reserved. Fields other
260 * than blob.info, blob.length, and blob.value are modified by encryptBlob()
277 struct __attribute__((packed)) blob {
298 class Blob {
300 Blob(uint8_t* value, int32_t valueLength, uint8_t* info, uint8_t infoLength, BlobType type) {
311 Blob(blob b) {
315 Blob() {}
437 struct blob mBlob;
492 Blob masterKeyBlob(mMasterKey, sizeof(mMasterKey), mSalt, sizeof(mSalt), TYPE_MASTER_KEY);
502 // we read the raw blob to just to get the salt to generate
503 // the AES key, then we create the Blob to use with decryptBlob
504 blob rawBlob;
520 Blob masterKeyBlob(rawBlob);
592 ResponseCode get(const char* filename, Blob* keyBlob, const BlobType type) {
611 ResponseCode put(const char* filename, Blob* keyBlob) {
666 Blob keyBlob(data, dataLength, NULL, 0, TYPE_KEY_PAIR);
775 void upgrade(const char* filename, Blob* blob, const uint8_t oldVersion, const BlobType type) {
783 blob->setType(type);
785 importBlobAsKey(blob, filename);
792 * If we've updated, set the key blob to the right version
797 blob->setVersion(version);
798 this->put(filename, blob);
803 * Takes a blob that is an PEM-encoded RSA key as a byte array and
805 * Then it overwrites the original blob with the new blob
808 ResponseCode importBlobAsKey(Blob* blob, const char* filename) {
809 // We won't even write to the blob directly with this BIO, so const_cast is okay.
810 Unique_BIO b(BIO_new_mem_buf(const_cast<uint8_t*>(blob->getValue()), blob->getLength()));
842 return get(filename, blob, TYPE_KEY_PAIR);
895 static ResponseCode get_key_for_name(KeyStore* keyStore, Blob* keyBlob, const Value* keyName,
942 Blob keyBlob;
956 Blob keyBlob(val->value, val->length, NULL, 0, TYPE_GENERIC);
963 Blob keyBlob;
1088 Blob keyBlob(data, dataLength, NULL, 0, TYPE_KEY_PAIR);
1115 Blob keyBlob;
1153 Blob keyBlob;
1183 Blob keyBlob;
1223 Blob keyBlob;