In case any mortgagor, redemptioner, or judgment debtor, shall object to the payment of any such insurance premium, taxes, or prior liens on account of the incorrectness or invalidity thereof, he may file with the sheriff an indemnity bond, in an amount and with sureties to be approved by the sheriff, and thereupon the sheriff must permit redemption to be made without the payment of such insurance premiums, taxes, or prior liens so excepted to, and the purchaser may determine the correctness or validity thereof and collect the same by an action directly upon such bond, which action must be brought within one year next following such redemption.
SDCL 44-8-19