- /*
- * If the attribute is unknown, we don't know its syntax; assume
- * it is an octet string and, if that fails to decode and will
- * fit, a string.
- */
- size_t valueLen = base64Decode(str, vp->vp_octets);
- if (valueLen < 0) {
- if (da == NULL && stringLen < MAX_STRING_LEN) {
- vp->type = PW_TYPE_STRING;
- vp->length = stringLen;
- memcpy(vp->vp_strvalue, str, stringLen + 1);
- } else
- goto fail;
- } else {
- vp->length = valueLen;
- vp->vp_octets[valueLen] = '\0';
- }