diff options
Diffstat (limited to 'usr/src/lib/pkcs11/pkcs11_softtoken/common/softObjectUtil.c')
-rw-r--r-- | usr/src/lib/pkcs11/pkcs11_softtoken/common/softObjectUtil.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softObjectUtil.c b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softObjectUtil.c index aacc01a5a7..9794565299 100644 --- a/usr/src/lib/pkcs11/pkcs11_softtoken/common/softObjectUtil.c +++ b/usr/src/lib/pkcs11/pkcs11_softtoken/common/softObjectUtil.c @@ -18,9 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <pthread.h> @@ -1493,3 +1493,14 @@ cleanup: delete_all_objs_in_list(added_objs_list); return (rv); } + +CK_RV +dup_bigint_attr(biginteger_t *bi, CK_BYTE *buf, CK_ULONG buflen) +{ + bi->big_value_len = buflen; + if ((bi->big_value = malloc(buflen)) == NULL) { + return (CKR_HOST_MEMORY); + } + (void) memcpy(bi->big_value, buf, buflen); + return (CKR_OK); +} |