case dhKey:
case lowDHKey:
SECKEY_LowConvertToPublicKey(SECKEYLowPrivateKey *privk){    SECKEYLowPublicKey *pubk;    PLArenaPool *arena;    arena = PORT_NewArena (DER_DEFAULT_CHUNKSIZE);    if (arena == NULL) {        PORT_SetError (SEC_ERROR_NO_MEMORY);        return NULL;    }    switch(privk->keyType) {      case rsaKey:      case nullKey:	pubk = (SECKEYLowPublicKey *)PORT_ArenaZAlloc(arena,						sizeof (SECKEYLowPublicKey));	if (pubk != NULL) {	    SECStatus rv;	    pubk->arena = arena;	    pubk->keyType = privk->keyType;	    if (privk->keyType == nullKey) return pubk;	    rv = SECITEM_CopyItem(arena, &pubk->u.rsa.modulus,				  &privk->u.rsa.modulus);	    if (rv == SECSuccess) {		rv = SECITEM_CopyItem (arena, &pubk->u.rsa.publicExponent,				       &privk->u.rsa.publicExponent);		if (rv == SECSuccess)		    return pubk;	    }	    SECKEY_LowDestroyPublicKey (pubk);	} else {	    PORT_SetError (SEC_ERROR_NO_MEMORY);	}	break;      case dsaKey:	pubk = (SECKEYLowPublicKey *)PORT_ArenaZAlloc(arena,						    sizeof(SECKEYLowPublicKey));	if (pubk != NULL) {	    SECStatus rv;	    pubk->arena = arena;	    pubk->keyType = privk->keyType;	    rv = SECITEM_CopyItem(arena, &pubk->u.dsa.publicValue,				  &privk->u.dsa.publicValue);	    if (rv != SECSuccess) break;	    rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.prime,				  &privk->u.dsa.params.prime);	    if (rv != SECSuccess) break;	    rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.subPrime,				  &privk->u.dsa.params.subPrime);	    if (rv != SECSuccess) break;	    rv = SECITEM_CopyItem(arena, &pubk->u.dsa.params.base,				  &privk->u.dsa.params.base);	    if (rv == SECSuccess) return pubk;	}	break;      case dhKey:	pubk = (SECKEYLowPublicKey *)PORT_ArenaZAlloc(arena,						    sizeof(SECKEYLowPublicKey));	if (pubk != NULL) {	    SECStatus rv;	    pubk->arena = arena;	    pubk->keyType = privk->keyType;	    rv = SECITEM_CopyItem(arena, &pubk->u.dh.publicValue,				  &privk->u.dh.publicValue);	    if (rv != SECSuccess) break;	    rv = SECITEM_CopyItem(arena, &pubk->u.dh.prime,				  &privk->u.dh.prime);	    if (rv != SECSuccess) break;	    rv = SECITEM_CopyItem(arena, &pubk->u.dh.base,				  &privk->u.dh.base);	    if (rv == SECSuccess) return pubk;	}	break;	/* No Fortezza in Low Key implementations (Fortezza keys aren't	 * stored in our data base */    default:	break;    }    PORT_FreeArena (arena, PR_FALSE);    return NULL;}