Deleted Added
full compact
v3_genn.c (302408) v3_genn.c (325337)
1/* v3_genn.c */
2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
4 * 1999.
5 */
6/* ====================================================================
7 * Copyright (c) 1999-2008 The OpenSSL Project. All rights reserved.
8 *

--- 217 unchanged lines hidden (view full) ---

226
227int GENERAL_NAME_set0_othername(GENERAL_NAME *gen,
228 ASN1_OBJECT *oid, ASN1_TYPE *value)
229{
230 OTHERNAME *oth;
231 oth = OTHERNAME_new();
232 if (!oth)
233 return 0;
1/* v3_genn.c */
2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
4 * 1999.
5 */
6/* ====================================================================
7 * Copyright (c) 1999-2008 The OpenSSL Project. All rights reserved.
8 *

--- 217 unchanged lines hidden (view full) ---

226
227int GENERAL_NAME_set0_othername(GENERAL_NAME *gen,
228 ASN1_OBJECT *oid, ASN1_TYPE *value)
229{
230 OTHERNAME *oth;
231 oth = OTHERNAME_new();
232 if (!oth)
233 return 0;
234 ASN1_TYPE_free(oth->value);
234 oth->type_id = oid;
235 oth->value = value;
236 GENERAL_NAME_set0_value(gen, GEN_OTHERNAME, oth);
237 return 1;
238}
239
240int GENERAL_NAME_get0_otherName(GENERAL_NAME *gen,
241 ASN1_OBJECT **poid, ASN1_TYPE **pvalue)
242{
243 if (gen->type != GEN_OTHERNAME)
244 return 0;
245 if (poid)
246 *poid = gen->d.otherName->type_id;
247 if (pvalue)
248 *pvalue = gen->d.otherName->value;
249 return 1;
250}
235 oth->type_id = oid;
236 oth->value = value;
237 GENERAL_NAME_set0_value(gen, GEN_OTHERNAME, oth);
238 return 1;
239}
240
241int GENERAL_NAME_get0_otherName(GENERAL_NAME *gen,
242 ASN1_OBJECT **poid, ASN1_TYPE **pvalue)
243{
244 if (gen->type != GEN_OTHERNAME)
245 return 0;
246 if (poid)
247 *poid = gen->d.otherName->type_id;
248 if (pvalue)
249 *pvalue = gen->d.otherName->value;
250 return 1;
251}