aboutsummaryrefslogtreecommitdiffstats
path: root/common/comopt.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2021-07-29 09:25:06 +0000
committerWerner Koch <[email protected]>2021-07-29 09:33:24 +0000
commit73c03e02322880c740310207dd2151cfd843792e (patch)
tree54bdec2ee6c0aea400dd78ce21b2f926acedcf4a /common/comopt.c
parentscd: Small clean up for card access. (diff)
downloadgnupg-73c03e02322880c740310207dd2151cfd843792e.tar.gz
gnupg-73c03e02322880c740310207dd2151cfd843792e.zip
tools: Extend gpg-check-pattern.
* tools/gpg-check-pattern.c: Major rewrite. -- Signed-off-by: Werner Koch <[email protected]> Here is a simple pattern file: ==================== # Pattern to reject passwords which do not comply to # - at least 1 uppercase letter # - at least 1 lowercase letter # - at least one number # - at least one special character # and a few extra things to show the reject mode # Reject is the default mode, ignore case is the default #[reject] #[icase] # If the password starts with "foo" (case insensitive) it is rejected. /foo.*/ [case] # If the password starts with "bar" (case sensitive) it is rejected. /bar.*/ # Switch to accept mode: Only if all patterns up to the next "accept" # or "reject" tag or EOF match, the password is accepted. Otherwise # the password is rejected. [accept] /[A-Z]+/ /[a-z]+/ /[0-9]+/ /[^A-Za-z0-9]+/ ================= Someoneā„¢ please write regression tests.
Diffstat (limited to 'common/comopt.c')
0 files changed, 0 insertions, 0 deletions