-/* Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
}
}
+\"secret-file\" {
+ switch(driver.ctx_) {
+ case isc::d2::D2ParserContext::TSIG_KEY:
+ case isc::d2::D2ParserContext::TSIG_KEYS:
+ return isc::d2::D2Parser::make_SECRET_FILE(driver.loc_);
+ default:
+ return isc::d2::D2Parser::make_STRING("secret-file", driver.loc_);
+ }
+}
+
\"control-socket\" {
switch(driver.ctx_) {
case isc::d2::D2ParserContext::DHCPDDNS:
-/* Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
ALGORITHM "algorithm"
DIGEST_BITS "digest-bits"
SECRET "secret"
+ SECRET_FILE "secret-file"
CONTROL_SOCKET "control-socket"
SOCKET_TYPE "socket-type"
| tsig_key_algorithm
| tsig_key_digest_bits
| tsig_key_secret
+ | tsig_key_secret_file
| user_context
| comment
| unknown_map_entry
tsig_key_secret: SECRET {
ctx.unique("secret", ctx.loc2pos(@1));
+ ctx.unique("secret-file", ctx.loc2pos(@1));
ctx.enter(ctx.NO_KEYWORD);
} COLON STRING {
if ($4 == "") {
ctx.leave();
};
+tsig_key_secret_file: SECRET_FILE {
+ ctx.unique("secret", ctx.loc2pos(@1));
+ ctx.unique("secret-file", ctx.loc2pos(@1));
+ ctx.enter(ctx.NO_KEYWORD);
+} COLON STRING {
+ if ($4 == "") {
+ error(@3, "TSIG key secret file name cannot be blank");
+ }
+ ElementPtr elem(new StringElement($4, ctx.loc2pos(@4)));
+ ctx.stack_.back()->set("secret-file", elem);
+ ctx.leave();
+};
+
// --- end of tsig-keys ---------------------------------