src/securityPolicy.c
security_policy_t policyForSignTxWitness(
        sign_tx_signingmode_t txSigningMode,
        const bip44_path_t* witnessPath,
        bool mintPresent,
        const bip44_path_t* poolOwnerPath
)
{
	switch (txSigningMode) {
	case SIGN_TX_SIGNINGMODE_ORDINARY_TX:
		return _ordinaryWitnessPolicy(witnessPath, mintPresent);

	case SIGN_TX_SIGNINGMODE_MULTISIG_TX:
		return _multisigWitnessPolicy(witnessPath, mintPresent);

	case SIGN_TX_SIGNINGMODE_PLUTUS_TX:
		return _plutusWitnessPolicy(witnessPath, mintPresent);

	case SIGN_TX_SIGNINGMODE_POOL_REGISTRATION_OWNER:
		return _poolRegistrationOwnerWitnessPolicy(witnessPath, poolOwnerPath);

	case SIGN_TX_SIGNINGMODE_POOL_REGISTRATION_OPERATOR:
		return _poolRegistrationOperatorWitnessPolicy(witnessPath);

	default:
		ASSERT(false);
	}

	DENY(); // should not be reached
}
// For each transaction witness
// Note: witnesses reveal public key of an address and Ledger *does not* check
// whether they correspond to previously declared inputs and certificates
For each transaction witness
Note: witnesses reveal public key of an address and Ledger *does not* check
whether they correspond to previously declared inputs and certificates
For each transaction witness Note : witnesses reveal public key of an address and Ledger * does not * check whether they correspond to previously declared inputs and certificates
security_policy_t policyForSignTxWitness(
        sign_tx_signingmode_t txSigningMode,
        const bip44_path_t* witnessPath,
        bool mintPresent,
        const bip44_path_t* poolOwnerPath
)
{
	switch (txSigningMode) {
	case SIGN_TX_SIGNINGMODE_ORDINARY_TX:
		return _ordinaryWitnessPolicy(witnessPath, mintPresent);
	case SIGN_TX_SIGNINGMODE_MULTISIG_TX:
		return _multisigWitnessPolicy(witnessPath, mintPresent);
	case SIGN_TX_SIGNINGMODE_PLUTUS_TX:
		return _plutusWitnessPolicy(witnessPath, mintPresent);
	case SIGN_TX_SIGNINGMODE_POOL_REGISTRATION_OWNER:
		return _poolRegistrationOwnerWitnessPolicy(witnessPath, poolOwnerPath);
	case SIGN_TX_SIGNINGMODE_POOL_REGISTRATION_OPERATOR:
		return _poolRegistrationOperatorWitnessPolicy(witnessPath);
	default:
		ASSERT(false);
	}
	DENY(); 
}
security_policy_t policyForSignTxWitness ( sign_tx_signingmode_t txSigningMode , const bip44_path_t * witnessPath , bool mintPresent , const bip44_path_t * poolOwnerPath ) { switch ( txSigningMode ) { case SIGN_TX_SIGNINGMODE_ORDINARY_TX : return _ordinaryWitnessPolicy ( witnessPath , mintPresent ) ; case SIGN_TX_SIGNINGMODE_MULTISIG_TX : return _multisigWitnessPolicy ( witnessPath , mintPresent ) ; case SIGN_TX_SIGNINGMODE_PLUTUS_TX : return _plutusWitnessPolicy ( witnessPath , mintPresent ) ; case SIGN_TX_SIGNINGMODE_POOL_REGISTRATION_OWNER : return _poolRegistrationOwnerWitnessPolicy ( witnessPath , poolOwnerPath ) ; case SIGN_TX_SIGNINGMODE_POOL_REGISTRATION_OPERATOR : return _poolRegistrationOperatorWitnessPolicy ( witnessPath ) ; default : ASSERT ( false ) ; } DENY ( ) ; }
For each transaction witness
Note: witnesses reveal public key of an address and Ledger *does not* check
whether they correspond to previously declared inputs and certificates
For each transaction witness Note : witnesses reveal public key of an address and Ledger * does not * check whether they correspond to previously declared inputs and certificates
// should not be reached