end
##
- # List matching loaded connections. The provided closure is invoked
- # for each matching connection.
- def list_conns(match = nil, &block)
- call_with_event("list-conns", Message.new(match), "list-conn", &block)
+ # Get daemon version information
+ def version
+ call("version")
+ end
+
+ ##
+ # Get daemon statistics and information.
+ def stats
+ call("stats")
+ end
+
+ ##
+ # Reload strongswan.conf settings.
+ def reload_settings
+ call("reload-settings")
+ end
+
+ ##
+ # Initiate a connection. The provided closure is invoked for each log line.
+ def initiate(options, &block)
+ call_with_event("initiate", Message.new(options), "control-log", &block)
+ end
+
+ ##
+ # Terminate a connection. The provided closure is invoked for each log line.
+ def terminate(options, &block)
+ call_with_event("terminate", Message.new(options), "control-log", &block)
+ end
+
+ ##
+ # Initiate the rekeying of an SA.
+ def rekey(options)
+ call("rekey", Message.new(options))
+ end
+
+ ##
+ # Redirect an IKE_SA.
+ def redirect(options)
+ call("redirect", Message.new(options))
+ end
+
+ ##
+ # Install a shunt/route policy.
+ def install(policy)
+ call("install", Message.new(policy))
+ end
+
+ ##
+ # Uninstall a shunt/route policy.
+ def uninstall(policy)
+ call("uninstall", Message.new(policy))
end
##
&block)
end
+ ##
+ # List matching loaded connections. The provided closure is invoked
+ # for each matching connection.
+ def list_conns(match = nil, &block)
+ call_with_event("list-conns", Message.new(match), "list-conn", &block)
+ end
+
+ ##
+ # Get the names of connections managed by vici.
+ def get_conns()
+ call("get-conns")
+ end
+
##
# List matching loaded certificates. The provided closure is invoked
# for each matching certificate definition.
call_with_event("list-certs", Message.new(match), "list-cert", &block)
end
+ ##
+ # List matching loaded certification authorities. The provided closure is
+ # invoked for each matching certification authority definition.
+ def list_authorities(match = nil, &block)
+ call_with_event("list-authorities", Message.new(match), "list-authority",
+ &block)
+ end
+
+ ##
+ # Get the names of certification authorities managed by vici.
+ def get_authorities()
+ call("get-authorities")
+ end
+
##
# Load a connection into the daemon.
def load_conn(conn)
end
##
- # Get the names of connections managed by vici.
- def get_conns()
- call("get-conns")
+ # Load a certificate into the daemon.
+ def load_cert(cert)
+ call("load-cert", Message.new(cert))
end
##
- # Flush credential cache.
- def flush_certs(match = nil)
- call("flush-certs", Message.new(match))
+ # Load a private key into the daemon.
+ def load_key(key)
+ call("load-key", Message.new(key))
end
##
- # Clear all loaded credentials.
- def clear_creds()
- call("clear-creds")
+ # Unload a private key from the daemon.
+ def unload_key(key)
+ call("unload-key", Message.new(key))
end
##
- # Load a certificate into the daemon.
- def load_cert(cert)
- call("load-cert", Message.new(cert))
+ # Get the identifiers of private keys loaded via vici.
+ def get_keys()
+ call("get-keys")
end
##
- # Load a private key into the daemon.
- def load_key(key)
- call("load-key", Message.new(key))
+ # Load a private key located on a token into the daemon.
+ def load_token(token)
+ call("load-token", Message.new(token))
end
##
end
##
- # Load a virtual IP / attribute pool
- def load_pool(pool)
- call("load-pool", Message.new(pool))
+ # Unload a shared key from the daemon.
+ def unload_shared(shared)
+ call("unload-shared", Message.new(shared))
end
##
- # Unload a virtual IP / attribute pool
- def unload_pool(pool)
- call("unload-pool", Message.new(pool))
+ # Get the unique identifiers of shared keys loaded via vici.
+ def get_shared()
+ call("get-shared")
end
##
- # Get the currently loaded pools.
- def get_pools(options)
- call("get-pools", Message.new(options))
+ # Flush credential cache.
+ def flush_certs(match = nil)
+ call("flush-certs", Message.new(match))
end
##
- # Initiate a connection. The provided closure is invoked for each log line.
- def initiate(options, &block)
- call_with_event("initiate", Message.new(options), "control-log", &block)
+ # Clear all loaded credentials.
+ def clear_creds()
+ call("clear-creds")
end
##
- # Terminate a connection. The provided closure is invoked for each log line.
- def terminate(options, &block)
- call_with_event("terminate", Message.new(options), "control-log", &block)
+ # Load a certification authority into the daemon.
+ def load_authority(authority)
+ call("load-authority", Message.new(authority))
end
##
- # Redirect an IKE_SA.
- def redirect(options)
- call("redirect", Message.new(options))
+ # Unload a certification authority from the daemon.
+ def unload_authority(authority)
+ call("unload-authority", Message.new(authority))
end
##
- # Install a shunt/route policy.
- def install(policy)
- call("install", Message.new(policy))
+ # Load a virtual IP / attribute pool into the daemon.
+ def load_pool(pool)
+ call("load-pool", Message.new(pool))
end
##
- # Uninstall a shunt/route policy.
- def uninstall(policy)
- call("uninstall", Message.new(policy))
+ # Unload a virtual IP / attribute pool from the daemon.
+ def unload_pool(pool)
+ call("unload-pool", Message.new(pool))
end
##
- # Reload strongswan.conf settings.
- def reload_settings
- call("reload-settings")
+ # Get the currently loaded pools.
+ def get_pools(options)
+ call("get-pools", Message.new(options))
end
##
- # Get daemon statistics and information.
- def stats
- call("stats")
+ # Get currently loaded algorithms and their implementation.
+ def get_algorithms()
+ call("get-algorithms")
end
##
- # Get daemon version information
- def version
- call("version")
+ # Get global or connection-specific counters for IKE events.
+ def get_counters(options = nil)
+ call("get-counters", Message.new(options))
+ end
+
+ ##
+ # Reset global or connection-specific IKE event counters.
+ def reset_counters(options = nil)
+ call("reset-counters", Message.new(options))
end
##