66 static int copy_email(
X509V3_CTX *ctx, GENERAL_NAMES *gens,
int move_p);
67 static int copy_issuer(
X509V3_CTX *ctx, GENERAL_NAMES *gens);
75 (X509V3_EXT_I2V)i2v_GENERAL_NAMES,
82 (X509V3_EXT_I2V)i2v_GENERAL_NAMES,
89 (X509V3_EXT_I2V)i2v_GENERAL_NAMES,
90 NULL, NULL, NULL, NULL},
100 ret = i2v_GENERAL_NAME(method, gen, ret);
110 char oline[256], htmp[5];
147 "%d.%d.%d.%d", p[0], p[1], p[2], p[3]);
151 for (i = 0; i < 8; i++)
154 "%X", p[0] << 8 | p[1]);
193 BIO_printf(out,
"EdiPartyName:<unsupported>");
217 p[0], p[1], p[2], p[3]);
221 for (i = 0; i < 8; i++)
246 GENERAL_NAMES *gens = NULL;
256 !strcmp(cnf->
value,
"copy")) {
257 if(!copy_issuer(ctx, gens))
goto err;
273 static int copy_issuer(
X509V3_CTX *ctx, GENERAL_NAMES *gens)
311 GENERAL_NAMES *gens = NULL;
321 !strcmp(cnf->
value,
"copy")) {
322 if(!copy_email(ctx, gens, 0))
goto err;
324 !strcmp(cnf->
value,
"move")) {
325 if(!copy_email(ctx, gens, 1))
goto err;
343 static int copy_email(
X509V3_CTX *ctx, GENERAL_NAMES *gens,
int move_p)
369 X509_NAME_ENTRY_free(ne);
372 if(!email || !(gen = GENERAL_NAME_new())) {
390 GENERAL_NAME_free(gen);
400 GENERAL_NAMES *gens = NULL;
426 int gen_type,
char *value,
int is_nc)
441 gen = GENERAL_NAME_new();
475 if(gen->
d.
ip == NULL)
484 if (!do_dirname(gen, value, ctx))
492 if (!do_othername(gen, value, ctx))
514 gen->
type = gen_type;
520 GENERAL_NAME_free(gen);
553 else if(!
name_cmp(name,
"otherName"))
568 char *objtmp = NULL, *
p;
570 if (!(p = strchr(value,
';')))
582 strncpy(objtmp, value, objlen);
596 if (!(nm = X509_NAME_new()))
598 sk = X509V3_get_section(ctx, value);