Lines Matching +defs:val +defs:file
22 * This file contains the interface between the DST API and the crypto API.
23 * This is the only file that needs to be changed if the crypto system is
394 * If there is already a file with this name, an error is returned.
409 char file[PATH_MAX];
427 /* Now I can create the file I want to use */
428 dst_s_build_filename(file, key->dk_key_name, key->dk_id, key->dk_alg,
431 /* Do not overwrite an existing file */
432 if ((fp = dst_s_fopen(file, "w", 0600)) != NULL) {
436 file, len, nn, errno));
442 EREPORT(("dst_write_private_key(): Can not create file %s\n"
443 ,file));
456 * filename of the key file to be read.
482 * Open the file and read it's formatted contents up to key
522 EREPORT(("\"KEY\" doesn't appear in file: %s", name));
542 /* If we aren't at end-of-file, something is wrong. */
547 EREPORT(("Key too long in file: %s", name));
610 /* create public key file */
612 EREPORT(("DST_write_public_key: open of file:%s failed (errno=%d)\n",
705 u_int16_t val;
717 val = (u_int16_t)(key->dk_flags & 0xffff);
718 dst_s_put_int16(out_storage, val);
725 val = (u_int16_t)((key->dk_flags >> 16) & 0xffff);
726 dst_s_put_int16(&out_storage[loc], val);
808 * Function reads in private key from a file.
842 /* first check if we can find the key file */
844 EREPORT(("dst_s_read_private_key_file: Could not open file %s in directory %s\n",
849 /* now read the header info from the file */
852 EREPORT(("dst_s_read_private_key_file: error reading file %s (empty file)\n",
865 EREPORT(("dst_s_read_private_key_file(): Not a Key file/Decrypt failed %s\n", name));
868 /* read in file format */
1048 /*! \file */