]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1662] Checkpoint before regen
authorFrancis Dupont <fdupont@isc.org>
Tue, 9 Feb 2021 17:32:16 +0000 (18:32 +0100)
committerFrancis Dupont <fdupont@isc.org>
Wed, 17 Feb 2021 11:53:10 +0000 (12:53 +0100)
src/bin/agent/agent_lexer.ll
src/bin/agent/agent_parser.yy

index fec84bee53b9d5e92f37c1f2f3377252e85adde0..57ec1232f8eea6415667d9188f7b321a8dd3578f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2017-2021 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
@@ -290,6 +290,42 @@ ControlCharacterFill            [^"\\]|\\["\\/bfnrtu]
     }
 }
 
+\"trust-anchor\" {
+    switch(driver.ctx_) {
+    case ParserContext::AGENT:
+        return AgentParser::make_TRUST_ANCHOR(driver.loc_);
+    default:
+        return AgentParser::make_STRING("trust-anchor", driver.loc_);
+    }
+}
+
+\"cert-file\" {
+    switch(driver.ctx_) {
+    case ParserContext::AGENT:
+        return AgentParser::make_CERT_FILE(driver.loc_);
+    default:
+        return AgentParser::make_STRING("cert-file", driver.loc_);
+    }
+}
+
+\"key-file\" {
+    switch(driver.ctx_) {
+    case ParserContext::AGENT:
+        return AgentParser::make_KEY_FILE(driver.loc_);
+    default:
+        return AgentParser::make_STRING("key-file", driver.loc_);
+    }
+}
+
+\"cert-required\" {
+    switch(driver.ctx_) {
+    case ParserContext::AGENT:
+        return AgentParser::make_CERT_REQUIRED(driver.loc_);
+    default:
+        return AgentParser::make_STRING("cert-required", driver.loc_);
+    }
+}
+
 \"control-sockets\" {
     switch(driver.ctx_) {
     case ParserContext::AGENT:
index fad645befcf4688426b44dc15bc15dd15eafd63f..4c7182149b8e6b605a0e236b85badbcfb781415f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2017-2020 Internet Systems Consortium, Inc. ("ISC")
+/* Copyright (C) 2017-2021 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
@@ -63,6 +63,11 @@ using namespace std;
   USER "user"
   PASSWORD "password"
 
+  TRUST_ANCHOR "trust-anchor"
+  CERT_FILE "cert-file"
+  KEY_FILE "key-file"
+  CERT_REQUIRED "cert-required"
+
   CONTROL_SOCKETS "control-sockets"
   DHCP4_SERVER "dhcp4"
   DHCP6_SERVER "dhcp6"
@@ -264,6 +269,10 @@ global_params: global_param
 // Dhcp6.
 global_param: http_host
             | http_port
+            | trust_anchor
+            | cert_file
+            | key_file
+            | cert_required
             | authentication
             | control_sockets
             | hooks_libraries
@@ -288,6 +297,39 @@ http_port: HTTP_PORT COLON INTEGER {
     ctx.stack_.back()->set("http-port", prf);
 };
 
+trust_anchor: TRUST_ANCHOR {
+    ctx.unique("trust-anchor", ctx.loc2pos(@1));
+    ctx.enter(ctx.NO_KEYWORDS);
+} COLON STRING {
+    ElementPtr ca(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("trust-anchor", ca);
+    ctx.leave();
+};
+
+cert_file: CERT_FILE {
+    ctx.unique("cert-file", ctx.loc2pos(@1));
+    ctx.enter(ctx.NO_KEYWORDS);
+} COLON STRING {
+    ElementPtr cert(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("cert-file", cert);
+    ctx.leave();
+};
+
+key_file: KEY_FILE {
+    ctx.unique("key-file", ctx.loc2pos(@1));
+    ctx.enter(ctx.NO_KEYWORDS);
+} COLON STRING {
+    ElementPtr key(new StringElement($4, ctx.loc2pos(@4)));
+    ctx.stack_.back()->set("key-file", key);
+    ctx.leave();
+};
+
+cert_required: CERT_REQUIRED COLON BOOLEAN {
+    ctx.unique("cert-required", ctx.loc2pos(@1));
+    ElementPtr req(new BoolElement($3, ctx.loc2pos(@3)));
+    ctx.stack_.back()->set("cert-required", req);
+};
+
 user_context: USER_CONTEXT {
     ctx.enter(ctx.NO_KEYWORDS);
 } COLON map_value {