77 if (repo_name == NULL) {
114 DusSetInt(&sql,
"requirebackup", require_backup, 1);
155 if (policy_name == NULL) {
218 int KsmImportZone(
const char* zone_name,
int policy_id,
int fail_if_exists,
int *new_zone,
const char* signconf,
const char* input,
const char* output,
const char* input_type,
const char* output_type)
223 char* zone_name_td = NULL;
227 if (zone_name == NULL || policy_id == 0) {
234 if (strlen(zone_name_td) > 1 && zone_name_td[strlen(zone_name_td)-1] ==
'.') {
235 zone_name_td[strlen(zone_name_td)-1] =
'\0';
237 else if (strlen(zone_name_td) > 1) {
241 snprintf(in_clause,
KSM_SQL_SIZE,
"(\"%s\",\"%s\")", zone_name, zone_name_td);
280 if (fail_if_exists == 1) {
284 DusSetInt(&sql,
"policy_id", policy_id, 0);
344 int KsmImportKeyPair(
int policy_id,
const char* HSMKeyID,
int smID,
int size,
int alg,
int state,
const char* time,
int fixDate,
DB_ID*
id)
349 char* columns = NULL;
356 StrAppend(&columns,
"policy_id, HSMkey_id, securitymodule_id, size, algorithm");
527 StrAppend(&sql,
" and pre_backup is null");
529 StrAppend(&sql,
" where pre_backup is null");
553 StrAppend(&sql,
" and pre_backup is null");
555 StrAppend(&sql,
" where pre_backup is null");
590 StrAppend(&sql,
" and pre_backup is not null");
593 StrAppend(&sql,
" where pre_backup is not null");
618 StrAppend(&sql,
" and pre_backup is not null");
621 StrAppend(&sql,
" where pre_backup is null");
660 StrAppend(&sql,
" and pre_backup is not null");
663 StrAppend(&sql,
" where pre_backup is not null");
689 StrAppend(&sql,
" and pre_backup is not null");
691 StrAppend(&sql,
" where backup is null");
692 StrAppend(&sql,
" and pre_backup is not null");
730 if (cka_id == NULL) {