This key input plugin defers to the key type to generate a key value to save. The primary purpose is to allow the automatic generation of encryption keys.

CommentFileSizeAuthor
#3 2804149-3.patch4.78 KBrlhawk
generate-key-1.patch2.12 KBtynor

Comments

tynor created an issue. See original summary.

rlhawk’s picture

  1. +++ b/plugins/key_input/generate.inc
    @@ -0,0 +1,69 @@
    +    '#disabled' => TRUE,
    

    It's great to disable the field, but we should still reject any submission of a key value if it has already been generated.

  2. +++ b/plugins/key_input/generate.inc
    @@ -0,0 +1,69 @@
    +  $key_type = $config['key_type'];
    

    This line can be removed.

  3. +++ b/plugins/key_input/generate.inc
    @@ -0,0 +1,69 @@
    +  $f_gen = ctools_plugin_get_function($key_type, 'generate key value');
    

    I'd prefer to use a clearer variable name, like $generate_function.

rlhawk’s picture

StatusFileSize
new4.78 KB

Here's a new patch that adds a more robust version of the new key input plugin.

tynor’s picture

Status: Needs review » Reviewed & tested by the community

Alright, looks good to me. Thank you Rick!

  • rlhawk committed 7954f67 on 7.x-3.x
    Issue #2804149 by tynor, rlhawk: Add Generate Key Input Plugin
    
rlhawk’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.