79 if (repo_name == NULL) {
116 DusSetInt(&sql,
"requirebackup", require_backup, 1);
155 if (policy_name == NULL) {
205 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)
210 char* zone_name_td = NULL;
214 if (zone_name == NULL || policy_id == 0) {
221 if (strlen(zone_name_td) > 1 && zone_name_td[strlen(zone_name_td)-1] ==
'.') {
222 zone_name_td[strlen(zone_name_td)-1] =
'\0';
224 else if (strlen(zone_name_td) > 1) {
228 snprintf(in_clause,
KSM_SQL_SIZE,
"(\"%s\",\"%s\")", zone_name, zone_name_td);
265 if (fail_if_exists == 1) {
269 DusSetInt(&sql,
"policy_id", policy_id, 0);
360 int KsmImportKeyPair(
int policy_id,
const char* HSMKeyID,
int smID,
int size,
int alg,
int state,
const char* time,
int fixDate,
DB_ID*
id)
365 char* columns = NULL;
372 StrAppend(&columns,
"policy_id, HSMkey_id, securitymodule_id, size, algorithm");
543 StrAppend(&sql,
" and pre_backup is null");
545 StrAppend(&sql,
" where pre_backup is null");
569 StrAppend(&sql,
" and pre_backup is null");
571 StrAppend(&sql,
" where pre_backup is null");
606 StrAppend(&sql,
" and pre_backup is not null");
609 StrAppend(&sql,
" where pre_backup is not null");
634 StrAppend(&sql,
" and pre_backup is not null");
637 StrAppend(&sql,
" where pre_backup is null");
676 StrAppend(&sql,
" and pre_backup is not null");
679 StrAppend(&sql,
" where pre_backup is not null");
705 StrAppend(&sql,
" and pre_backup is not null");
707 StrAppend(&sql,
" where backup is null");
708 StrAppend(&sql,
" and pre_backup is not null");
746 if (cka_id == NULL) {