Lines Matching refs:blob

79  * Serialises the authentication (private) key to a blob, encrypting it with
80 * passphrase. The identification of the blob (lowest 64 bits of n) will
85 key_private_rsa1_to_blob(Key *key, Buffer *blob, const char *passphrase,
161 buffer_append(blob, buffer_ptr(&encrypted), buffer_len(&encrypted));
169 key_private_pem_to_blob(Key *key, Buffer *blob, const char *_passphrase,
211 buffer_append(blob, bptr, blen);
217 /* Save a key blob to a file */
239 /* Serialise "key" to buffer "blob" */
241 key_private_to_blob(Key *key, Buffer *blob, const char *passphrase,
246 return key_private_rsa1_to_blob(key, blob, passphrase, comment);
250 return key_private_pem_to_blob(key, blob, passphrase, comment);
279 key_parse_public_rsa1(Buffer *blob, char **commentp)
285 if (buffer_len(blob) < sizeof(authfile_id_string)) {
294 if (memcmp(buffer_ptr(blob), authfile_id_string,
300 buffer_append(&copy, buffer_ptr(blob), buffer_len(blob));
322 key_load_file(int fd, const char *filename, Buffer *blob)
343 buffer_clear(blob);
351 buffer_clear(blob);
355 buffer_append(blob, buf, len);
356 if (buffer_len(blob) > MAX_KEY_FILE_SIZE) {
357 buffer_clear(blob);
364 st.st_size != buffer_len(blob)) {
368 buffer_clear(blob);
418 key_parse_private_rsa1(Buffer *blob, const char *passphrase, char **commentp)
429 if (buffer_len(blob) < sizeof(authfile_id_string)) {
438 if (memcmp(buffer_ptr(blob), authfile_id_string,
444 buffer_append(&copy, buffer_ptr(blob), buffer_len(blob));
519 key_parse_private_pem(Buffer *blob, int type, const char *passphrase,
527 if ((bio = BIO_new_mem_buf(buffer_ptr(blob),
528 buffer_len(blob))) == NULL) {
641 key_parse_private_type(Buffer *blob, int type, const char *passphrase,
646 return key_parse_private_rsa1(blob, passphrase, commentp);
651 return key_parse_private_pem(blob, type, passphrase, commentp);