Lines Matching refs:serialfile
1528 BIGNUM *load_serial(const char *serialfile, int *exists, int create, in IMPLEMENT_LHASH_HASH_FN()
1540 in = BIO_new_file(serialfile, "r"); in IMPLEMENT_LHASH_HASH_FN()
1545 perror(serialfile); in IMPLEMENT_LHASH_HASH_FN()
1554 serialfile); in IMPLEMENT_LHASH_HASH_FN()
1561 serialfile); in IMPLEMENT_LHASH_HASH_FN()
1583 int save_serial(const char *serialfile, const char *suffix, in save_serial() argument
1593 j = strlen(serialfile); in save_serial()
1595 j = strlen(serialfile) + strlen(suffix) + 1; in save_serial()
1602 OPENSSL_strlcpy(buf[0], serialfile, BSIZE); in save_serial()
1605 BIO_snprintf(buf[0], sizeof(buf[0]), "%s.%s", serialfile, suffix); in save_serial()
1607 BIO_snprintf(buf[0], sizeof(buf[0]), "%s-%s", serialfile, suffix); in save_serial()
1634 int rotate_serial(const char *serialfile, const char *new_suffix, in rotate_serial() argument
1640 i = strlen(serialfile) + strlen(old_suffix); in rotate_serial()
1641 j = strlen(serialfile) + strlen(new_suffix); in rotate_serial()
1649 BIO_snprintf(buf[0], sizeof(buf[0]), "%s.%s", serialfile, new_suffix); in rotate_serial()
1650 BIO_snprintf(buf[1], sizeof(buf[1]), "%s.%s", serialfile, old_suffix); in rotate_serial()
1652 BIO_snprintf(buf[0], sizeof(buf[0]), "%s-%s", serialfile, new_suffix); in rotate_serial()
1653 BIO_snprintf(buf[1], sizeof(buf[1]), "%s-%s", serialfile, old_suffix); in rotate_serial()
1655 if (rename(serialfile, buf[1]) < 0 && errno != ENOENT in rotate_serial()
1661 "Unable to rename %s to %s\n", serialfile, buf[1]); in rotate_serial()
1665 if (rename(buf[0], serialfile) < 0) { in rotate_serial()
1667 "Unable to rename %s to %s\n", buf[0], serialfile); in rotate_serial()
1669 rename(buf[1], serialfile); in rotate_serial()