add ENUMERATED and OBJECT IDENTIFIER
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10741 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1997 Kungliga Tekniska H<>gskolan
|
||||
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
@@ -55,3 +55,14 @@ copy_octet_string (const octet_string *from, octet_string *to)
|
||||
memcpy(to->data, from->data, to->length);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
copy_oid (const oid *from, oid *to)
|
||||
{
|
||||
to->length = from->length;
|
||||
to->components = malloc(to->length * sizeof(*to->components));
|
||||
if (to->length != 0 && to->components == NULL)
|
||||
return ENOMEM;
|
||||
memcpy(to->components, from->components, to->length);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user