• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/openssl-0.9.8e/crypto/x509v3/

Lines Matching refs:gen

68 static int do_othername(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx);
69 static int do_dirname(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx);
91 GENERAL_NAME *gen;
93 gen = sk_GENERAL_NAME_value(gens, i);
94 ret = i2v_GENERAL_NAME(method, gen, ret);
101 GENERAL_NAME *gen, STACK_OF(CONF_VALUE) *ret)
106 switch (gen->type)
121 X509V3_add_value_uchar("email",gen->d.ia5->data, &ret);
125 X509V3_add_value_uchar("DNS",gen->d.ia5->data, &ret);
129 X509V3_add_value_uchar("URI",gen->d.ia5->data, &ret);
133 X509_NAME_oneline(gen->d.dirn, oline, 256);
138 p = gen->d.ip->data;
139 if(gen->d.ip->length == 4)
142 else if(gen->d.ip->length == 16)
164 i2t_ASN1_OBJECT(oline, 256, gen->d.rid);
171 int GENERAL_NAME_print(BIO *out, GENERAL_NAME *gen)
175 switch (gen->type)
191 BIO_printf(out, "email:%s",gen->d.ia5->data);
195 BIO_printf(out, "DNS:%s",gen->d.ia5->data);
199 BIO_printf(out, "URI:%s",gen->d.ia5->data);
204 X509_NAME_print_ex(out, gen->d.dirn, 0, XN_FLAG_ONELINE);
208 p = gen->d.ip->data;
209 if(gen->d.ip->length == 4)
212 else if(gen->d.ip->length == 16)
231 i2a_ASN1_OBJECT(out, gen->d.rid);
253 GENERAL_NAME *gen;
254 if(!(gen = v2i_GENERAL_NAME(method, ctx, cnf)))
256 sk_GENERAL_NAME_push(gens, gen);
270 GENERAL_NAME *gen;
287 gen = sk_GENERAL_NAME_value(ialt, i);
288 if(!sk_GENERAL_NAME_push(gens, gen)) {
321 GENERAL_NAME *gen;
322 if(!(gen = v2i_GENERAL_NAME(method, ctx, cnf)))
324 sk_GENERAL_NAME_push(gens, gen);
342 GENERAL_NAME *gen = NULL;
365 if(!email || !(gen = GENERAL_NAME_new())) {
369 gen->d.ia5 = email;
371 gen->type = GEN_EMAIL;
372 if(!sk_GENERAL_NAME_push(gens, gen)) {
376 gen = NULL;
383 GENERAL_NAME_free(gen);
392 GENERAL_NAME *gen;
402 if(!(gen = v2i_GENERAL_NAME(method, ctx, cnf))) goto err;
403 sk_GENERAL_NAME_push(gens, gen);
423 GENERAL_NAME *gen = NULL;
437 gen = out;
440 gen = GENERAL_NAME_new();
441 if(gen == NULL)
472 gen->d.rid = obj;
478 gen->d.ip = a2i_IPADDRESS_NC(value);
480 gen->d.ip = a2i_IPADDRESS(value);
481 if(gen->d.ip == NULL)
492 if (!do_dirname(gen, value, ctx))
500 if (!do_othername(gen, value, ctx))
516 if(!(gen->d.ia5 = M_ASN1_IA5STRING_new()) ||
517 !ASN1_STRING_set(gen->d.ia5, (unsigned char*)value,
525 gen->type = type;
527 return gen;
530 GENERAL_NAME_free(gen);
534 static int do_othername(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx)
540 if (!(gen->d.otherName = OTHERNAME_new()))
545 ASN1_TYPE_free(gen->d.otherName->value);
546 if (!(gen->d.otherName->value = ASN1_generate_v3(p + 1, ctx)))
552 gen->d.otherName->type_id = OBJ_txt2obj(objtmp, 0);
554 if (!gen->d.otherName->type_id)
559 static int do_dirname(GENERAL_NAME *gen, char *value, X509V3_CTX *ctx)
578 gen->d.dirn = nm;