pubKey->keyType = rsaKey;
pubKey->keyType = lowRSAKey;
SECKEYLowPublicKey *pk11_GetPubKey(PK11Object *object,CK_KEY_TYPE key_type){    SECKEYLowPublicKey *pubKey;    PLArenaPool *arena;    CK_RV crv;    if (object->objclass != CKO_PUBLIC_KEY) {	return NULL;    }    /* If we already have a key, use it */    if (object->objectInfo) {	return (SECKEYLowPublicKey *)object->objectInfo;    }    /* allocate the structure */    arena = PORT_NewArena(DER_DEFAULT_CHUNKSIZE);    if (arena == NULL) return NULL;    pubKey = (SECKEYLowPublicKey *)			PORT_ArenaAlloc(arena,sizeof(SECKEYLowPublicKey));    if (pubKey == NULL) {    	PORT_FreeArena(arena,PR_FALSE);	return NULL;    }    /* fill in the structure */    pubKey->arena = arena;    switch (key_type) {    case CKK_RSA:	pubKey->keyType = rsaKey;	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.rsa.modulus,							object,CKA_MODULUS);    	if (crv != CKR_OK) break;    	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.rsa.publicExponent,						object,CKA_PUBLIC_EXPONENT);	break;    case CKK_DSA:	pubKey->keyType = dsaKey;	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dsa.params.prime,							object,CKA_PRIME);    	if (crv != CKR_OK) break;	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dsa.params.subPrime,							object,CKA_SUBPRIME);    	if (crv != CKR_OK) break;	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dsa.params.base,							object,CKA_BASE);    	if (crv != CKR_OK) break;    	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dsa.publicValue,							object,CKA_VALUE);	break;    case CKK_DH:	pubKey->keyType = dhKey;	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dh.prime,							object,CKA_PRIME);    	if (crv != CKR_OK) break;	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dh.base,							object,CKA_BASE);    	if (crv != CKR_OK) break;    	crv = pk11_Attribute2SSecItem(arena,&pubKey->u.dsa.publicValue,							object,CKA_VALUE);	break;    default:	crv = CKR_KEY_TYPE_INCONSISTENT;	break;    }    if (crv != CKR_OK) {    	PORT_FreeArena(arena,PR_FALSE);	return NULL;    }    object->objectInfo = pubKey;    object->infoFree = (PK11Free) SECKEY_LowDestroyPublicKey;    return pubKey;}