1GPG-CHECK-PATTERN(1) GNU Privacy Guard 2.3 GPG-CHECK-PATTERN(1)
2
3
4
6 gpg-check-pattern - Check a passphrase on stdin against the patternfile
7
9 gpg-check-pattern [options] patternfile
10
11
13 gpg-check-pattern checks a passphrase given on stdin against a speci‐
14 fied pattern file.
15
16 The pattern file is line based with comment lines beginning on the
17 first position with a #. Empty lines and lines with only white spaces
18 are ignored. The actual pattern lines may either be verbatim string
19 pattern and match as they are (trailing spaces are ignored) or extended
20 regular expressions indicated by a / or !/ in the first column and ter‐
21 minated by another / or end of line. If a regular expression starts
22 with !/ the match result is reversed. By default all comparisons are
23 case insensitive.
24
25 Tag lines may be used to further control the operation of this tool.
26 The currently defined tags are:
27
28
29 [icase]
30 Switch to case insensitive comparison for all further patterns.
31 This is the default.
32
33
34 [case] Switch to case sensitive comparison for all further patterns.
35
36
37 [reject]
38 Switch to reject mode. This is the default mode.
39
40
41 [accept]
42 Switch to accept mode.
43
44 In the future more tags may be introduced and thus it is advisable not
45 to start a plain pattern string with an open bracket. The tags must be
46 given verbatim on the line with no spaces to the left or any non white
47 space characters to the right.
48
49 In reject mode the program exits on the first match with an exit code
50 of 1 (failure). If at the end of the pattern list the reject mode is
51 still active the program exits with code 0 (success).
52
53 In accept mode blocks of patterns are used. A block starts at the next
54 pattern after an "accept" tag and ends with the last pattern before the
55 next "accept" or "reject" tag or at the end of the pattern list. If
56 all patterns in a block match the program exits with an exit code of 0
57 (success). If any pattern in a block do not match the next pattern
58 block is evaluated. If at the end of the pattern list the accept mode
59 is still active the program exits with code 1 (failure).
60
61
62
64 --verbose
65 Enable extra informational output.
66
67
68 --check
69 Run only a syntax check on the patternfile.
70
71
72 --null Input is expected to be null delimited.
73
74
76 gpg-agent(1),
77
78 The full documentation for this tool is maintained as a Texinfo manual.
79 If GnuPG and the info program are properly installed at your site, the
80 command
81
82 info gnupg
83
84 should give you access to the complete manual including a menu struc‐
85 ture and an index.
86
87
88
89GnuPG 2.3.8 2022-10-07 GPG-CHECK-PATTERN(1)