diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-12-31 20:11:10 -0900 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-12-31 20:11:10 -0900 |
| commit | 1919e5246eccb2c7b859a76059098cdb82fb88e8 (patch) | |
| tree | 8875a6e9e71ca52eb05f2af758a8a7d0a7afadc7 /src | |
| parent | 2bc61f535cbd250272388be7b8d42377fede0aab (diff) | |
| download | otputils-1919e5246eccb2c7b859a76059098cdb82fb88e8.tar.gz otputils-1919e5246eccb2c7b859a76059098cdb82fb88e8.tar.bz2 otputils-1919e5246eccb2c7b859a76059098cdb82fb88e8.tar.xz otputils-1919e5246eccb2c7b859a76059098cdb82fb88e8.zip | |
otputil: removing generate widget
Diffstat (limited to 'src')
| -rw-r--r-- | src/otputil.c | 8 | ||||
| -rw-r--r-- | src/otputil.h | 5 | ||||
| -rw-r--r-- | src/widget-generate.c | 87 |
3 files changed, 0 insertions, 100 deletions
diff --git a/src/otputil.c b/src/otputil.c index 1668b88..2c56362 100644 --- a/src/otputil.c +++ b/src/otputil.c | |||
| @@ -135,14 +135,6 @@ otputil_widget_version( | |||
| 135 | #pragma mark otputil_widget_map[] | 135 | #pragma mark otputil_widget_map[] |
| 136 | static otputil_widget_t otputil_widget_map[] = | 136 | static otputil_widget_t otputil_widget_map[] = |
| 137 | { | 137 | { |
| 138 | { .name = "generate", | ||
| 139 | .desc = "generate TOTP secret", | ||
| 140 | .usage = NULL, | ||
| 141 | .short_opt = NULL, | ||
| 142 | .aliases = (const char * const[]) { "keygen", NULL }, | ||
| 143 | .func_exec = &otputil_widget_generate, | ||
| 144 | .func_usage = NULL, | ||
| 145 | }, | ||
| 146 | { .name = "help", | 138 | { .name = "help", |
| 147 | .desc = "display help", | 139 | .desc = "display help", |
| 148 | .usage = NULL, | 140 | .usage = NULL, |
diff --git a/src/otputil.h b/src/otputil.h index 862ac98..03abcae 100644 --- a/src/otputil.h +++ b/src/otputil.h | |||
| @@ -119,11 +119,6 @@ otputil_arguments( | |||
| 119 | #pragma mark widgets prototypes | 119 | #pragma mark widgets prototypes |
| 120 | 120 | ||
| 121 | extern int | 121 | extern int |
| 122 | otputil_widget_generate( | ||
| 123 | otputil_config_t * cnf ); | ||
| 124 | |||
| 125 | |||
| 126 | extern int | ||
| 127 | otputil_widget_hotp( | 122 | otputil_widget_hotp( |
| 128 | otputil_config_t * cnf ); | 123 | otputil_config_t * cnf ); |
| 129 | 124 | ||
diff --git a/src/widget-generate.c b/src/widget-generate.c deleted file mode 100644 index 1b6d36a..0000000 --- a/src/widget-generate.c +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * OTP Utilities | ||
| 3 | * Copyright (C) 2022 David M. Syzdek <david@syzdek.net>. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions are | ||
| 7 | * met: | ||
| 8 | * | ||
| 9 | * * Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * * Redistributions in binary form must reproduce the above copyright | ||
| 12 | * notice, this list of conditions and the following disclaimer in the | ||
| 13 | * documentation and/or other materials provided with the distribution. | ||
| 14 | * * Neither the name of David M. Syzdek nor the | ||
| 15 | * names of its contributors may be used to endorse or promote products | ||
| 16 | * derived from this software without specific prior written permission. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
| 19 | * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | ||
| 20 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 21 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAVID M SYZDEK BE LIABLE FOR | ||
| 22 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 23 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| 24 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 25 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 26 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 27 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 28 | * SUCH DAMAGE. | ||
| 29 | */ | ||
| 30 | /* | ||
| 31 | * @file src/widget-generate.c | ||
| 32 | */ | ||
| 33 | #define _SRC_WIDGET_GENERATE_C 1 | ||
| 34 | |||
| 35 | /////////////// | ||
| 36 | // // | ||
| 37 | // Headers // | ||
| 38 | // // | ||
| 39 | /////////////// | ||
| 40 | #pragma mark - Headers | ||
| 41 | |||
| 42 | #ifdef HAVE_CONFIG_H | ||
| 43 | #include <config.h> | ||
| 44 | #endif | ||
| 45 | |||
| 46 | #include <errno.h> | ||
| 47 | #include <assert.h> | ||
| 48 | #include <stdarg.h> | ||
| 49 | #include <string.h> | ||
| 50 | #include <strings.h> | ||
| 51 | #include <stdlib.h> | ||
| 52 | #include <getopt.h> | ||
| 53 | #include <stdio.h> | ||
| 54 | |||
| 55 | #include "otputil.h" | ||
| 56 | |||
| 57 | |||
| 58 | ///////////////// | ||
| 59 | // // | ||
| 60 | // Functions // | ||
| 61 | // // | ||
| 62 | ///////////////// | ||
| 63 | #pragma mark - Functions | ||
| 64 | |||
| 65 | |||
| 66 | //---------------// | ||
| 67 | // main function // | ||
| 68 | //---------------// | ||
| 69 | #pragma mark main function | ||
| 70 | |||
| 71 | int | ||
| 72 | otputil_widget_generate( | ||
| 73 | otputil_config_t * cnf ) | ||
| 74 | { | ||
| 75 | int rc; | ||
| 76 | |||
| 77 | assert(cnf != NULL); | ||
| 78 | |||
| 79 | // initial processing of cli arguments | ||
| 80 | if ((rc = otputil_arguments(cnf, cnf->argc, cnf->argv)) != 0) | ||
| 81 | return((rc == -1) ? 0 : 1); | ||
| 82 | |||
| 83 | return(0); | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | /* end of source file */ | ||
