copyk->staticflags = privk->staticflags;
SECKEY_CopyPrivateKey(SECKEYPrivateKey *privk){    SECKEYPrivateKey *copyk;    PRArenaPool *arena;        if (privk == NULL) {	return NULL;    }        arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);    if (arena == NULL) {	PORT_SetError (SEC_ERROR_NO_MEMORY);	return NULL;    }    copyk = (SECKEYPrivateKey *) PORT_ArenaZAlloc (arena, sizeof (SECKEYPrivateKey));    if (copyk) {	copyk->arena = arena;	copyk->keyType = privk->keyType;	/* copy the PKCS #11 parameters */	copyk->pkcs11Slot = PK11_ReferenceSlot(privk->pkcs11Slot);	/* if the key we're referencing was a temparary key we have just	 * created, that we want to go away when we're through, we need	 * to make a copy of it */	if (privk->pkcs11IsTemp) {	    copyk->pkcs11ID = 			PK11_CopyKey(privk->pkcs11Slot,privk->pkcs11ID);	    if (copyk->pkcs11ID == CK_INVALID_HANDLE) goto fail;	} else {	    copyk->pkcs11ID = privk->pkcs11ID;	}	copyk->pkcs11IsTemp = privk->pkcs11IsTemp;	copyk->wincx = privk->wincx;	return copyk;    } else {	PORT_SetError (SEC_ERROR_NO_MEMORY);    }fail:    PORT_FreeArena (arena, PR_FALSE);    return NULL;}