- config (cons (cons type
- (if (memq type
- '(pubkey cipher digest compress))
- (mapcar #'string-to-number
- (delete "" (split-string
- (match-string 2)
- ";")))
- (match-string 2)))
- config))))
- config))
+ args (match-string 2))
+ (cond
+ ((eq type 'group)
+ (if (string-match "\\`\\([^:]+\\):" args)
+ (setq groups
+ (cons (cons (downcase (match-string 1 args))
+ (delete "" (split-string
+ (substring args
+ (match-end 0))
+ ";")))
+ groups))
+ (if epg-debug
+ (message "Invalid group configuration: %S" args))))
+ ((memq type '(pubkey cipher digest compress))
+ (if (string-match "\\`\\([0-9]+\\)\\(;[0-9]+\\)*" args)
+ (setq config
+ (cons (cons type
+ (mapcar #'string-to-number
+ (delete "" (split-string args ";"))))
+ config))
+ (if epg-debug
+ (message "Invalid %S algorithm configuration: %S"
+ type args))))
+ (t
+ (setq config (cons (cons type args) config))))))
+ (if groups
+ (cons (cons 'groups groups) config)
+ config)))