diff options
Diffstat (limited to 'kiki.hs')
-rw-r--r-- | kiki.hs | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -804,8 +804,7 @@ documentAutoSignFlag bExport bImport bSecret = | |||
804 | ," 'tor' subkey corresponding to the address HOSTNAME.onion." | 804 | ," 'tor' subkey corresponding to the address HOSTNAME.onion." |
805 | ,""] | 805 | ,""] |
806 | documentKeyPairsOption :: Bool -> Bool -> Bool -> [String] | 806 | documentKeyPairsOption :: Bool -> Bool -> Bool -> [String] |
807 | documentKeyPairsOption bExport bImport False = [] | 807 | documentKeyPairsOption bExport bImport bSecret = |
808 | documentKeyPairsOption bExport bImport bSecret@True = | ||
809 | [" --keypairs [KEYSPEC ...]" | 808 | [" --keypairs [KEYSPEC ...]" |
810 | ," A keypair is a secret key coupled with it's corresponding public" | 809 | ," A keypair is a secret key coupled with it's corresponding public" |
811 | ," key, both of which are ordinarily stored in a single file in PEM" | 810 | ," key, both of which are ordinarily stored in a single file in PEM" |
@@ -1041,7 +1040,7 @@ buildStreamInfo rtyp ftyp = StreamInfo { typ = ftyp | |||
1041 | -- bImport: --import and --import-if-authentic | 1040 | -- bImport: --import and --import-if-authentic |
1042 | sync :: Bool -> Bool -> Bool -> String -> [String] -> IO () | 1041 | sync :: Bool -> Bool -> Bool -> String -> [String] -> IO () |
1043 | sync bExport bImport bSecret cmdarg args_raw = do | 1042 | sync bExport bImport bSecret cmdarg args_raw = do |
1044 | let (sargs,margs) = processArgs sargspec polyVariadicArgs "--keyrings" args_raw | 1043 | let (sargs,margs) = processArgs sargspec polyVariadicArgs "--keypairs" args_raw |
1045 | sargspec = [ ("--show-wk",0) | 1044 | sargspec = [ ("--show-wk",0) |
1046 | , ("--autosign",0) | 1045 | , ("--autosign",0) |
1047 | {-, ("--show-all",0) | 1046 | {-, ("--show-all",0) |
@@ -1054,9 +1053,10 @@ sync bExport bImport bSecret cmdarg args_raw = do | |||
1054 | ++ do guard bImport | 1053 | ++ do guard bImport |
1055 | [ ("--import",0), ("--import-if-authentic",0) ] | 1054 | [ ("--import",0), ("--import-if-authentic",0) ] |
1056 | polyVariadicArgs = ["--keyrings" | 1055 | polyVariadicArgs = ["--keyrings" |
1057 | ,"--hosts" ] | 1056 | ,"--hosts" |
1057 | ,"--keypairs"] | ||
1058 | ++ do guard bSecret | 1058 | ++ do guard bSecret |
1059 | [ "--keypairs", "--wallets" ] | 1059 | [ "--wallets" ] |
1060 | -- putStrLn $ "margs = " ++ show (Map.assocs margs) | 1060 | -- putStrLn $ "margs = " ++ show (Map.assocs margs) |
1061 | unkeysRef <- newIORef Map.empty | 1061 | unkeysRef <- newIORef Map.empty |
1062 | pwRef <- newIORef Nothing | 1062 | pwRef <- newIORef Nothing |
@@ -1087,7 +1087,7 @@ sync bExport bImport bSecret cmdarg args_raw = do | |||
1087 | , typ = if "dns-" `isPrefixOf` usage | 1087 | , typ = if "dns-" `isPrefixOf` usage |
1088 | then DNSPresentation | 1088 | then DNSPresentation |
1089 | else PEMFile | 1089 | else PEMFile |
1090 | , access = Sec | 1090 | , access = if bSecret then Sec else Pub |
1091 | , initializer = cmd' | 1091 | , initializer = cmd' |
1092 | , transforms = [] | 1092 | , transforms = [] |
1093 | } ) | 1093 | } ) |
@@ -1121,7 +1121,7 @@ sync bExport bImport bSecret cmdarg args_raw = do | |||
1121 | KeyRingFile ) | 1121 | KeyRingFile ) |
1122 | ] | 1122 | ] |
1123 | ++ rings | 1123 | ++ rings |
1124 | ++ if bSecret then pems else [] | 1124 | ++ pems |
1125 | ++ if bSecret then walts else [] | 1125 | ++ if bSecret then walts else [] |
1126 | ++ hosts | 1126 | ++ hosts |
1127 | , opPassphrases = do pfile <- maybeToList passfd | 1127 | , opPassphrases = do pfile <- maybeToList passfd |