Lines Matching refs:enc
133 ASN1_ENCODING *enc; in asn1_enc_init() local
134 enc = asn1_get_enc_ptr(pval, it); in asn1_enc_init()
135 if (enc) { in asn1_enc_init()
136 enc->enc = NULL; in asn1_enc_init()
137 enc->len = 0; in asn1_enc_init()
138 enc->alias_only = 0; in asn1_enc_init()
139 enc->alias_only_on_next_parse = 0; in asn1_enc_init()
140 enc->modified = 1; in asn1_enc_init()
145 ASN1_ENCODING *enc; in asn1_enc_free() local
146 enc = asn1_get_enc_ptr(pval, it); in asn1_enc_free()
147 if (enc) { in asn1_enc_free()
148 if (enc->enc && !enc->alias_only) { in asn1_enc_free()
149 OPENSSL_free(enc->enc); in asn1_enc_free()
151 enc->enc = NULL; in asn1_enc_free()
152 enc->len = 0; in asn1_enc_free()
153 enc->alias_only = 0; in asn1_enc_free()
154 enc->alias_only_on_next_parse = 0; in asn1_enc_free()
155 enc->modified = 1; in asn1_enc_free()
161 ASN1_ENCODING *enc; in asn1_enc_save() local
162 enc = asn1_get_enc_ptr(pval, it); in asn1_enc_save()
163 if (!enc) { in asn1_enc_save()
167 if (!enc->alias_only) { in asn1_enc_save()
168 OPENSSL_free(enc->enc); in asn1_enc_save()
171 enc->alias_only = enc->alias_only_on_next_parse; in asn1_enc_save()
172 enc->alias_only_on_next_parse = 0; in asn1_enc_save()
174 if (enc->alias_only) { in asn1_enc_save()
175 enc->enc = (uint8_t *) in; in asn1_enc_save()
177 enc->enc = OPENSSL_malloc(inlen); in asn1_enc_save()
178 if (!enc->enc) { in asn1_enc_save()
181 OPENSSL_memcpy(enc->enc, in, inlen); in asn1_enc_save()
184 enc->len = inlen; in asn1_enc_save()
185 enc->modified = 0; in asn1_enc_save()
192 ASN1_ENCODING *enc; in asn1_enc_restore() local
193 enc = asn1_get_enc_ptr(pval, it); in asn1_enc_restore()
194 if (!enc || enc->modified) { in asn1_enc_restore()
198 OPENSSL_memcpy(*out, enc->enc, enc->len); in asn1_enc_restore()
199 *out += enc->len; in asn1_enc_restore()
202 *len = enc->len; in asn1_enc_restore()