single_loader: zephyr: Fix compilation with VALIDATE_PRIMARY_SLOT enabled

Fixes compilation when VALIDATE_PRIMARY_SLOT & SINGLE_APPlICATION_SLOT
are enabled.

Signed-off-by: Wouter Cappelle <wouter.cappelle@crodeon.com>
diff --git a/boot/zephyr/single_loader.c b/boot/zephyr/single_loader.c
index 24032e1..643977f 100644
--- a/boot/zephyr/single_loader.c
+++ b/boot/zephyr/single_loader.c
@@ -41,14 +41,14 @@
      * the pointer from compilation.
      */
     /* Validate hash */
-    if (hdr->ih_flags & IMAGE_F_ENCRYPTED)
+    if (IS_ENCRYPTED(hdr))
     {
         /* Clear the encrypted flag we didn't supply a key
          * This flag could be set if there was a decryption in place
          * was performed. We will try to validate the image, and if still
          * encrypted the validation will fail, and go in panic mode
          */
-        hdr->ih_flags &= ~IMAGE_F_ENCRYPTED;
+        hdr->ih_flags &= ~(ENCRYPTIONFLAGS);
     }
     FIH_CALL(bootutil_img_validate, fih_rc, NULL, 0, hdr, fa_p, tmpbuf,
              BOOT_TMPBUF_SZ, NULL, 0, NULL);