- where = PDKIM_HDR_VALUE;
- goto NEXT_CHAR;
- }
- }
-
- if (where == PDKIM_HDR_VALUE)
- {
- if (!cur_val)
- cur_val = pdkim_strnew(NULL);
-
- if (c == ';' || c == '\0')
- {
- if (cur_tag->len > 0)
- {
- pdkim_strtrim(cur_val);
- DEBUG(D_acl) debug_printf(" %s=%s\n", cur_tag->str, cur_val->str);
-
- switch (cur_tag->str[0])
- {
- case 'v':
- /* This tag isn't evaluated because:
- - We only support version DKIM1.
- - Which is the default for this value (set below)
- - Other versions are currently not specified. */
- break;
- case 'h':
- pub->hashes = strdup(cur_val->str); break;
- case 'g':
- pub->granularity = strdup(cur_val->str); break;
- case 'n':
- pub->notes = pdkim_decode_qp(cur_val->str); break;
- case 'p':
- pdkim_decode_base64(US cur_val->str, &pub->key);
- break;
- case 'k':
- pub->hashes = strdup(cur_val->str); break;
- case 's':
- pub->srvtype = strdup(cur_val->str); break;
- case 't':
- if (strchr(cur_val->str, 'y') != NULL) pub->testing = 1;
- if (strchr(cur_val->str, 's') != NULL) pub->no_subdomaining = 1;
- break;
- default:
- DEBUG(D_acl) debug_printf(" Unknown tag encountered\n");
- break;
- }
- }
- pdkim_strclear(cur_tag);
- pdkim_strclear(cur_val);
- where = PDKIM_HDR_LIMBO;
+ case 'v': pub->version = val; break;
+ case 'h': pub->hashes = val; break;
+ case 'k': break;
+ case 'g': pub->granularity = val; break;
+ case 'n': pub->notes = pdkim_decode_qp(val); break;
+ case 'p': pdkim_decode_base64(val, &pub->key); break;
+ case 's': pub->srvtype = val; break;
+ case 't': if (Ustrchr(val, 'y')) pub->testing = 1;
+ if (Ustrchr(val, 's')) pub->no_subdomaining = 1;
+ break;
+ default: DEBUG(D_acl) debug_printf(" Unknown tag encountered\n"); break;