Overview
Comment: | hmac-pinentry: new POSIX-only package to retrieve HMAC key using pinentry protocol |
---|---|
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9b0bfa42ad9e548daf6af480a2b50030 |
User & Date: | nat on 2014-07-03 18:05:17 |
Other Links: | manifest | tags |
Context
2014-07-09
| ||
17:52 | Update LICENSE and add README check-in: 41ff0e3319 user: nat tags: trunk | |
2014-07-03
| ||
18:05 | hmac-pinentry: new POSIX-only package to retrieve HMAC key using pinentry protocol check-in: 9b0bfa42ad user: nat tags: trunk | |
2014-06-21
| ||
19:52 | s_expressions-encodings: replace assert-in-loop by asserting a slice comparison check-in: 6fad53c7fc user: nat tags: trunk | |
Changes
Modified tools/hmac-main.adb from [bb4eabd511] to [35a84dc5b3].
︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | + + + | -- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -- -- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -- -- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -- -- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -- ------------------------------------------------------------------------------ with Ada.Command_Line; with Ada.Exceptions; with Ada.Streams; with Ada.Strings.Unbounded; with Ada.Text_IO; with Ada.Text_IO.Text_Streams; with Natools.Getopt_Long; with Natools.S_Expressions; with Natools.S_Expressions.Encodings; with Natools.S_Expressions.File_Readers; with HMAC.Pinentry; procedure HMAC.Main is procedure Base64_Output (Digest : in Ada.Streams.Stream_Element_Array); -- Output the given binary Digest in base-64 procedure Lower_Hex_Output (Digest : in Ada.Streams.Stream_Element_Array); |
︙ | |||
41 42 43 44 45 46 47 48 49 50 51 52 53 54 | 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | + | package Options is type Id is (Base64_Output, Key_File, Lower_Hex_Output, Pinentry, Raw_Output, Upper_Hex_Output); end Options; package Getopt is new Natools.Getopt_Long (Options.Id); type Encode_Output is not null access procedure |
︙ | |||
88 89 90 91 92 93 94 95 96 97 98 99 100 101 | 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | + + + + + + + + + + + + + | (Natools.S_Expressions.To_String (Natools.S_Expressions.File_Readers.Reader (Argument).Read)); end if; Handler.Has_Key := True; when Options.Lower_Hex_Output => Handler.Output := Lower_Hex_Output'Access; when Options.Pinentry => begin Handler.Key := Ada.Strings.Unbounded.To_Unbounded_String (Pinentry.Get_Key (Argument)); Handler.Has_Key := True; exception when Ex : others => Ada.Text_IO.Put_Line (Ada.Text_IO.Current_Error, "Unable to get PIN from """ & Argument & '"'); Ada.Text_IO.Put_Line (Ada.Text_IO.Current_Error, "exception " & Ada.Exceptions.Exception_Name (Ex) & ": " & Ada.Exceptions.Exception_Message (Ex)); end; when Options.Raw_Output => Handler.Output := Raw_Output'Access; when Options.Upper_Hex_Output => Handler.Output := Upper_Hex_Output'Access; end case; end Option; |
︙ | |||
151 152 153 154 155 156 157 158 159 160 161 | 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | + + + + + - + + - + + + + + + + + + + | ("key-file", 'f', Getopt.Required_Argument, Options.Key_File); Opt_Config.Add_Option ("lower-hex", 'h', Getopt.No_Argument, Options.Lower_Hex_Output); Opt_Config.Add_Option ("raw", 'r', Getopt.No_Argument, Options.Raw_Output); Opt_Config.Add_Option ("upper-hex", 'H', Getopt.No_Argument, Options.Upper_Hex_Output); if Pinentry.Is_Available then Opt_Config.Add_Option ("pinentry", 'p', Getopt.Required_Argument, Options.Pinentry); end if; Opt_Config.Process (Handler); if not Handler.Has_Key then |
︙ |
Added tools/hmac-pinentry.adb version [9c3ed75468].
|
Added tools/hmac-pinentry.ads version [ed48822b66].
|
Added tools/hmac-pinentry__posix.adb version [c4720e5fcf].