src/securityPolicy.c
security_policy_t policyForGetExtendedPublicKey(const bip44_path_t* pathSpec)
{
	switch (bip44_classifyPath(pathSpec)) {

	case PATH_ORDINARY_ACCOUNT:
		WARN_UNLESS(bip44_isPathReasonable(pathSpec));
		// show Byron paths
		PROMPT_UNLESS(bip44_hasShelleyPrefix(pathSpec));
		// do not bother the user with confirmation --- required by LedgerLive to improve UX
		ALLOW();
		break;

	case PATH_ORDINARY_SPENDING_KEY:
	case PATH_ORDINARY_STAKING_KEY:
	case PATH_MULTISIG_ACCOUNT:
	case PATH_MULTISIG_SPENDING_KEY:
	case PATH_MULTISIG_STAKING_KEY:
	case PATH_MINT_KEY:
	case PATH_POOL_COLD_KEY:
		WARN_UNLESS(bip44_isPathReasonable(pathSpec));
		// ask for permission
		PROMPT();
		break;

	default:
		DENY();
		break;
	}

	DENY(); // should not be reached
}
// Get extended public key and return it to the host
Get extended public key and return it to the host
Get extended public key and return it to the host
security_policy_t policyForGetExtendedPublicKey(const bip44_path_t* pathSpec)
{
	switch (bip44_classifyPath(pathSpec)) {
	case PATH_ORDINARY_ACCOUNT:
		WARN_UNLESS(bip44_isPathReasonable(pathSpec));
		PROMPT_UNLESS(bip44_hasShelleyPrefix(pathSpec));
		ALLOW();
		break;
	case PATH_ORDINARY_SPENDING_KEY:
	case PATH_ORDINARY_STAKING_KEY:
	case PATH_MULTISIG_ACCOUNT:
	case PATH_MULTISIG_SPENDING_KEY:
	case PATH_MULTISIG_STAKING_KEY:
	case PATH_MINT_KEY:
	case PATH_POOL_COLD_KEY:
		WARN_UNLESS(bip44_isPathReasonable(pathSpec));
		PROMPT();
		break;
	default:
		DENY();
		break;
	}
	DENY(); 
}
security_policy_t policyForGetExtendedPublicKey ( const bip44_path_t * pathSpec ) { switch ( bip44_classifyPath ( pathSpec ) ) { case PATH_ORDINARY_ACCOUNT : WARN_UNLESS ( bip44_isPathReasonable ( pathSpec ) ) ; PROMPT_UNLESS ( bip44_hasShelleyPrefix ( pathSpec ) ) ; ALLOW ( ) ; break ; case PATH_ORDINARY_SPENDING_KEY : case PATH_ORDINARY_STAKING_KEY : case PATH_MULTISIG_ACCOUNT : case PATH_MULTISIG_SPENDING_KEY : case PATH_MULTISIG_STAKING_KEY : case PATH_MINT_KEY : case PATH_POOL_COLD_KEY : WARN_UNLESS ( bip44_isPathReasonable ( pathSpec ) ) ; PROMPT ( ) ; break ; default : DENY ( ) ; break ; } DENY ( ) ; }
Get extended public key and return it to the host
Get extended public key and return it to the host
// show Byron paths // do not bother the user with confirmation --- required by LedgerLive to improve UX // ask for permission // should not be reached