+ gss_key_value_element_desc *elements;
+ uint32_t count;
+ size_t size;
+ const char *p;
+ char *value;
+ char *key;
+
+ p = strchr(w, ':');
+ if (!p) {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, parms->server,
+ "%s [%s]", "Invalid syntax for GSSCredStore option", w);
+ return NULL;
+ }
+
+ key = apr_pstrndup(parms->pool, w, (p-w));
+ value = apr_pstrdup(parms->pool, p + 1);
+ if (!key || !value) {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, parms->server,
+ "%s", "OOM handling GSSCredStore option");
+ return NULL;
+ }
+
+ size = sizeof(gss_key_value_element_desc) * cfg->cred_store.count + 1;
+ elements = apr_palloc(parms->pool, size);
+ if (!elements) {
+ ap_log_error(APLOG_MARK, APLOG_ERR|APLOG_NOERRNO, 0, parms->server,
+ "%s", "OOM handling GSSCredStore option");
+ return NULL;
+ }
+
+ for (count = 0; count < cfg->cred_store.count; count++) {
+ elements[count] = cfg->cred_store.elements[count];
+ }
+ elements[count].key = key;
+ elements[count].value = value;
+
+ cfg->cred_store.elements = elements;
+ cfg->cred_store.count = count;
+