diff options
Diffstat (limited to 'captain/captain.f90')
-rw-r--r-- | captain/captain.f90 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/captain/captain.f90 b/captain/captain.f90 index 46287d9..4d7b17f 100644 --- a/captain/captain.f90 +++ b/captain/captain.f90 @@ -123,6 +123,31 @@ contains Print *, "Unverify: "//trim(option)//"X", verify_hash(trim(option)//"X", tmp) stop + ! This option shouldn't be public, and it just verifies passwords + else if(trim(option) == "--verify") then + + if(config_loaded) then + call initialize_db(database_filename) + i = i + 1 + call get_command_argument(i, username) + + i = i + 1 + call get_command_argument(i, password) + + if(validate_user_db(trim(username), trim(password))) then + Print *, "Password accepted!" + else + Print *, "REJECTED" + end if + + else + + Print *, "Please specify the configuration file first" + + end if + + stop + ! This option also shouldn't be public, and it verifies that ! uuids can be generated else if(trim(option) == "--uuid") then |