channels/smartcard: harden packing