Specific copy functions.

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1446 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
1997-03-17 10:33:21 +00:00
parent a2e4be1f01
commit 6c523c651c

18
lib/asn1/der_copy.c Normal file
View File

@@ -0,0 +1,18 @@
#include "asn1_locl.h"
RCSID("$Id$");
void
copy_general_string (char **from, char **to)
{
*to = malloc(strlen(*from) + 1);
strcpy(*to, *from);
}
void
copy_octet_string (krb5_data *from, krb5_data *to)
{
to->len = from->len;
to->data = malloc(to->len);
memcpy(to->data, from->data, to->len);
}