Home | History | Annotate | Download | only in asn1

Lines Matching refs:to

22  *    may be used to endorse or promote products derived from this software
26 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
44 heim_general_string *to)
46 *to = strdup(*from);
47 if(*to == NULL)
53 der_copy_integer (const int *from, int *to)
55 *to = *from;
60 der_copy_integer64 (const int64_t *from, int64_t *to)
62 *to = *from;
67 der_copy_unsigned (const unsigned *from, unsigned *to)
69 *to = *from;
74 der_copy_unsigned64 (const uint64_t *from, uint64_t *to)
76 *to = *from;
81 der_copy_generalized_time (const time_t *from, time_t *to)
83 *to = *from;
88 der_copy_utctime (const time_t *from, time_t *to)
90 *to = *from;
95 der_copy_utf8string (const heim_utf8_string *from, heim_utf8_string *to)
97 return der_copy_general_string(from, to);
102 heim_printable_string *to)
104 to->length = from->length;
105 to->data = malloc(to->length + 1);
106 if(to->data == NULL)
108 memcpy(to->data, from->data, to->length);
109 ((char *)to->data)[to->length] = '\0';
115 heim_ia5_string *to)
117 return der_copy_printable_string(from, to);
121 der_copy_bmp_string (const heim_bmp_string *from, heim_bmp_string *to)
123 to->length = from->length;
124 to->data = malloc(to->length * sizeof(to->data[0]));
125 if(to->length != 0 && to->data == NULL)
127 memcpy(to->data, from->data, to->length * sizeof(to->data[0]));
133 heim_universal_string *to)
135 to->length = from->length;
136 to->data = malloc(to->length * sizeof(to->data[0]));
137 if(to->length != 0 && to->data == NULL)
139 memcpy(to->data, from->data, to->length * sizeof(to->data[0]));
145 heim_visible_string *to)
147 return der_copy_general_string(from, to);
151 der_copy_octet_string (const heim_octet_string *from, heim_octet_string *to)
153 to->length = from->length;
155 to->data = NULL;
158 to->data = malloc(to->length);
159 if (to->length != 0 && to->data == NULL)
161 memcpy(to->data, from->data, to->length);
166 der_copy_heim_integer (const heim_integer *from, heim_integer *to)
168 to->length = from->length;
169 to->data = malloc(to->length);
170 if(to->length != 0 && to->data == NULL)
172 memcpy(to->data, from->data, to->length);
173 to->negative = from->negative;
178 der_copy_oid (const heim_oid *from, heim_oid *to)
180 to->length = from->length;
181 to->components = malloc(to->length * sizeof(*to->components));
182 if (to->length != 0 && to->components == NULL)
184 memcpy(to->components, from->components,
185 to->length * sizeof(*to->components));
190 der_copy_bit_string (const heim_bit_string *from, heim_bit_string *to)
195 to->length = from->length;
196 to->data = malloc(len);
197 if(len != 0 && to->data == NULL)
199 memcpy(to->data, from->data, len);