79 if (repo_name == NULL) {
116 DusSetInt(&sql,
"requirebackup", require_backup, 1);
157 if (policy_name == NULL) {
220 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)
225 char* zone_name_td = NULL;
229 if (zone_name == NULL || policy_id == 0) {
236 if (strlen(zone_name_td) > 1 && zone_name_td[strlen(zone_name_td)-1] ==
'.') {
237 zone_name_td[strlen(zone_name_td)-1] =
'\0';
239 else if (strlen(zone_name_td) > 1) {
243 snprintf(in_clause,
KSM_SQL_SIZE,
"(\"%s\",\"%s\")", zone_name, zone_name_td);
282 if (fail_if_exists == 1) {
286 DusSetInt(&sql,
"policy_id", policy_id, 0);
346 int KsmImportKeyPair(
int policy_id,
const char* HSMKeyID,
int smID,
int size,
int alg,
int state,
const char* time,
int fixDate,
DB_ID*
id)
351 char* columns = NULL;
358 StrAppend(&columns,
"policy_id, HSMkey_id, securitymodule_id, size, algorithm");
529 StrAppend(&sql,
" and pre_backup is null");
531 StrAppend(&sql,
" where pre_backup is null");
555 StrAppend(&sql,
" and pre_backup is null");
557 StrAppend(&sql,
" where pre_backup is null");
592 StrAppend(&sql,
" and pre_backup is not null");
595 StrAppend(&sql,
" where pre_backup is not null");
620 StrAppend(&sql,
" and pre_backup is not null");
623 StrAppend(&sql,
" where pre_backup is null");
662 StrAppend(&sql,
" and pre_backup is not null");
665 StrAppend(&sql,
" where pre_backup is not null");
691 StrAppend(&sql,
" and pre_backup is not null");
693 StrAppend(&sql,
" where backup is null");
694 StrAppend(&sql,
" and pre_backup is not null");
732 if (cka_id == NULL) {