1
- /* Copyright (C) 2017-2023 Internet Systems Consortium, Inc. ("ISC")
1
+ /* Copyright (C) 2017-2024 Internet Systems Consortium, Inc. ("ISC")
2
2
3
3
This Source Code Form is subject to the terms of the Mozilla Public
4
4
License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -75,6 +75,7 @@ using namespace std;
75
75
ALGORITHM " algorithm"
76
76
DIGEST_BITS " digest-bits"
77
77
SECRET " secret"
78
+ SECRET_FILE " secret-file"
78
79
79
80
CONTROL_SOCKET " control-socket"
80
81
SOCKET_TYPE " socket-type"
@@ -669,6 +670,7 @@ tsig_key_param: tsig_key_name
669
670
| tsig_key_algorithm
670
671
| tsig_key_digest_bits
671
672
| tsig_key_secret
673
+ | tsig_key_secret_file
672
674
| user_context
673
675
| comment
674
676
| unknown_map_entry
@@ -710,6 +712,7 @@ tsig_key_digest_bits: DIGEST_BITS COLON INTEGER {
710
712
711
713
tsig_key_secret: SECRET {
712
714
ctx.unique(" secret" , ctx.loc2pos(@1 ));
715
+ ctx.unique(" secret-file" , ctx.loc2pos(@1 ));
713
716
ctx.enter(ctx.NO_KEYWORD);
714
717
} COLON STRING {
715
718
if ($4 == " " ) {
@@ -720,6 +723,19 @@ tsig_key_secret: SECRET {
720
723
ctx.leave();
721
724
};
722
725
726
+ tsig_key_secret_file: SECRET_FILE {
727
+ ctx.unique(" secret" , ctx.loc2pos(@1 ));
728
+ ctx.unique(" secret-file" , ctx.loc2pos(@1 ));
729
+ ctx.enter(ctx.NO_KEYWORD);
730
+ } COLON STRING {
731
+ if ($4 == " " ) {
732
+ error (@3 , " TSIG key secret file name cannot be blank" );
733
+ }
734
+ ElementPtr elem (new StringElement($4 , ctx.loc2pos(@4 )));
735
+ ctx.stack_.back()->set (" secret-file" , elem);
736
+ ctx.leave();
737
+ };
738
+
723
739
724
740
// --- end of tsig-keys ---------------------------------
725
741
0 commit comments