char *def, char *value, int nid, int n_min,
int n_max, unsigned long chtype);
static int add_DN_object(X509_NAME *n, char *text, char *def, char *value,
- int nid,int n_min,int n_max, unsigned long chtype);
+ int nid,int n_min,int n_max, unsigned long chtype, int mval);
#ifndef OPENSSL_NO_RSA
static void MS_CALLBACK req_cb(int p,int n,void *arg);
#endif
int i;
char *p,*q;
char buf[100];
- int nid;
+ int nid, mval;
long n_min,n_max;
char *type,*def,*value;
CONF_VALUE *v;
if(*p) type = p;
break;
}
+ if (*type == '+')
+ {
+ mval = -1;
+ type++;
+ }
+ else
+ mval = 0;
/* If OBJ not recognised ignore it */
if ((nid=OBJ_txt2nid(type)) == NID_undef) goto start;
}
if (!add_DN_object(subj,v->value,def,value,nid,
- n_min,n_max, chtype))
+ n_min,n_max, chtype, mval))
return 0;
}
if (X509_NAME_entry_count(subj) == 0)
for (i = 0; i < sk_CONF_VALUE_num(dn_sk); i++)
{
+ int mval;
v=sk_CONF_VALUE_value(dn_sk,i);
p=q=NULL;
type=v->name;
if(*p) type = p;
break;
}
+#ifndef CHARSET_EBCDIC
+ if (*p == '+')
+#else
+ if (*p == os_toascii['+'])
+#endif
+ {
+ p++;
+ mval = -1;
+ }
+ else
+ mval = 0;
if (!X509_NAME_add_entry_by_txt(subj,type, chtype,
- (unsigned char *) v->value,-1,-1,0)) return 0;
+ (unsigned char *) v->value,-1,-1,mval)) return 0;
}
static int add_DN_object(X509_NAME *n, char *text, char *def, char *value,
- int nid, int n_min, int n_max, unsigned long chtype)
+ int nid, int n_min, int n_max, unsigned long chtype, int mval)
{
int i,ret=0;
MS_STATIC char buf[1024];
#endif
if(!req_check_len(i, n_min, n_max)) goto start;
if (!X509_NAME_add_entry_by_NID(n,nid, chtype,
- (unsigned char *) buf, -1,-1,0)) goto err;
+ (unsigned char *) buf, -1,-1,mval)) goto err;
ret=1;
err:
return(ret);