- if (i) {
- if (i->type!=t_string) {
- cfgfatal(i->loc,"diffie-hellman","first argument must be a "
- "string\n");
- }
- p=i->data.string;
- if (mpz_init_set_str(&st->p,p,16)!=0) {
- cfgfatal(i->loc,"diffie-hellman","\"%s\" is not a hex number "
- "string\n",p);
- }
+ if (i && i->type==t_dict) {
+ dict=i->data.dict;
+ p=dict_read_string(dict,"p",True,"diffie-hellman",loc);
+ g=dict_read_string(dict,"g",True,"diffie-hellman",loc);
+ check=dict_read_bool(dict,"check",False,"diffie-hellman",loc,True);