Lines Matching refs:db

38 static int get_index(CA_DB *db, char *id, char type)  in get_index()  argument
45 for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { in get_index()
46 pp = sk_OPENSSL_PSTRING_value(db->db->data, i); in get_index()
52 for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { in get_index()
53 pp = sk_OPENSSL_PSTRING_value(db->db->data, i); in get_index()
64 static void print_entry(CA_DB *db, int indx, int verbose, char *s) in print_entry() argument
68 char **pp = sk_OPENSSL_PSTRING_value(db->db->data, indx); in print_entry()
76 static void print_index(CA_DB *db, int indexindex, int verbose) in print_index() argument
78 print_entry(db, indexindex, verbose, "g N entry"); in print_index()
81 static void print_user(CA_DB *db, int userindex, int verbose) in print_user() argument
84 char **pp = sk_OPENSSL_PSTRING_value(db->db->data, userindex); in print_user()
87 print_entry(db, userindex, verbose, "User entry"); in print_user()
88 print_entry(db, get_index(db, pp[DB_srpgN], 'I'), verbose, in print_user()
95 static int update_index(CA_DB *db, char **row) in update_index() argument
105 if (!TXT_DB_insert(db->db, irow)) { in update_index()
107 BIO_printf(bio_err, "TXT_DB error number %ld\n", db->db->error); in update_index()
235 CA_DB *db = NULL; in srp_main() local
381 db = load_index(srpvfile, NULL); in srp_main()
382 if (db == NULL) { in srp_main()
388 for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { in srp_main()
389 pp = sk_OPENSSL_PSTRING_value(db->db->data, i); in srp_main()
396 print_index(db, i, verbose > 1); in srp_main()
404 gNrow = sk_OPENSSL_PSTRING_value(db->db->data, gNindex); in srp_main()
405 print_entry(db, gNindex, verbose > 1, "Default g and N"); in srp_main()
423 if ((userindex = get_index(db, user, 'U')) >= 0) in srp_main()
424 print_user(db, userindex, (verbose > 0) || mode == OPT_LIST); in srp_main()
430 for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) in srp_main()
431 print_user(db, i, 1); in srp_main()
441 sk_OPENSSL_PSTRING_value(db->db->data, userindex); in srp_main()
476 || !update_index(db, row)) { in srp_main()
496 sk_OPENSSL_PSTRING_value(db->db->data, userindex); in srp_main()
514 get_index(db, row[DB_srpgN], DB_SRP_INDEX)) >= 0) in srp_main()
516 sk_OPENSSL_PSTRING_value(db->db->data, in srp_main()
572 char **xpp = sk_OPENSSL_PSTRING_value(db->db->data, userindex); in srp_main()
591 for (i = 0; i < sk_OPENSSL_PSTRING_num(db->db->data); i++) { in srp_main()
592 pp = sk_OPENSSL_PSTRING_value(db->db->data, i); in srp_main()
596 print_user(db, i, verbose); in srp_main()
602 if (!save_index(srpvfile, "new", db)) in srp_main()
628 free_index(db); in srp_main()