From a18b763a43e8ff474678eeea6393541541d0c844 Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Fri, 3 Nov 2023 12:13:34 +0200 Subject: [PATCH 1/2] Fix import for RSA modules --- Application/Helper/Controller.hs | 4 ++-- Application/Helper/View.hs | 2 +- Config/Config.hs | 2 +- Web/Controller/ImageStyle.hs | 2 +- Web/View/ParagraphQuotes/Show.hs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Application/Helper/Controller.hs b/Application/Helper/Controller.hs index 807f7e7..eae94dd 100644 --- a/Application/Helper/Controller.hs +++ b/Application/Helper/Controller.hs @@ -4,9 +4,9 @@ import IHP.ControllerPrelude import Generated.Types import Web.Types import Config -import Crypto.PubKey.RSA as RSA +import "cryptonite" Crypto.PubKey.RSA as RSA import Data.ByteString.Base64 as Base64 -import Crypto.PubKey.RSA.PKCS15 as RSA.PKCS15 +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA.PKCS15 import Crypto.Hash.Algorithms as Hash.Algorithms diff --git a/Application/Helper/View.hs b/Application/Helper/View.hs index 16f7b19..bef0297 100644 --- a/Application/Helper/View.hs +++ b/Application/Helper/View.hs @@ -1,7 +1,7 @@ module Application.Helper.View where import IHP.ViewPrelude -import Crypto.PubKey.RSA.PKCS15 as RSA +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA import Crypto.Hash.Algorithms as Hash.Algorithms import Data.ByteString.Base64 as Base64 import Application.Helper.Controller diff --git a/Config/Config.hs b/Config/Config.hs index 538cb5f..b1e51f9 100644 --- a/Config/Config.hs +++ b/Config/Config.hs @@ -5,7 +5,7 @@ import IHP.Environment import IHP.FileStorage.Config import IHP.FrameworkConfig ( ConfigBuilder, option ) import Web.View.CustomCSSFramework -import Crypto.PubKey.RSA as RSA +import "cryptonite" Crypto.PubKey.RSA as RSA import Control.Exception (catch) import qualified Data.ByteString as BS import Web.JWT diff --git a/Web/Controller/ImageStyle.hs b/Web/Controller/ImageStyle.hs index e8fc83d..ca5ed8e 100644 --- a/Web/Controller/ImageStyle.hs +++ b/Web/Controller/ImageStyle.hs @@ -6,7 +6,7 @@ import System.Directory (doesFileExist) import qualified Data.Text as Text -- Imports for the signed token. -import Crypto.PubKey.RSA.PKCS15 as RSA +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA import Crypto.Hash.Algorithms as Hash.Algorithms import Config import Data.ByteString.Base64 as Base64 diff --git a/Web/View/ParagraphQuotes/Show.hs b/Web/View/ParagraphQuotes/Show.hs index ccd2744..ac21aef 100644 --- a/Web/View/ParagraphQuotes/Show.hs +++ b/Web/View/ParagraphQuotes/Show.hs @@ -3,7 +3,7 @@ import Web.View.Prelude import Web.Element.Types import Web.Element.ElementWrap import Web.Element.InnerElementLayout -import Crypto.PubKey.RSA.PKCS15 as RSA +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA import Crypto.Hash.Algorithms as Hash.Algorithms import qualified Config import IHP.ControllerSupport From d419af5406dabd766ba9ec927b23b8716faaca1c Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Fri, 3 Nov 2023 12:14:14 +0200 Subject: [PATCH 2/2] More fixes --- Application/Helper/Controller.hs | 2 +- Application/Helper/View.hs | 2 +- Web/Controller/ImageStyle.hs | 2 +- Web/View/ParagraphQuotes/Show.hs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Application/Helper/Controller.hs b/Application/Helper/Controller.hs index eae94dd..fe005ca 100644 --- a/Application/Helper/Controller.hs +++ b/Application/Helper/Controller.hs @@ -7,7 +7,7 @@ import Config import "cryptonite" Crypto.PubKey.RSA as RSA import Data.ByteString.Base64 as Base64 import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA.PKCS15 -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.Hash.Algorithms as Hash.Algorithms -- Here you can add functions which are available in all your controllers diff --git a/Application/Helper/View.hs b/Application/Helper/View.hs index bef0297..408133c 100644 --- a/Application/Helper/View.hs +++ b/Application/Helper/View.hs @@ -2,7 +2,7 @@ module Application.Helper.View where import IHP.ViewPrelude import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.Hash.Algorithms as Hash.Algorithms import Data.ByteString.Base64 as Base64 import Application.Helper.Controller diff --git a/Web/Controller/ImageStyle.hs b/Web/Controller/ImageStyle.hs index ca5ed8e..33152f3 100644 --- a/Web/Controller/ImageStyle.hs +++ b/Web/Controller/ImageStyle.hs @@ -7,7 +7,7 @@ import qualified Data.Text as Text -- Imports for the signed token. import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.Hash.Algorithms as Hash.Algorithms import Config import Data.ByteString.Base64 as Base64 diff --git a/Web/View/ParagraphQuotes/Show.hs b/Web/View/ParagraphQuotes/Show.hs index ac21aef..e3ad0c8 100644 --- a/Web/View/ParagraphQuotes/Show.hs +++ b/Web/View/ParagraphQuotes/Show.hs @@ -4,7 +4,7 @@ import Web.Element.Types import Web.Element.ElementWrap import Web.Element.InnerElementLayout import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.Hash.Algorithms as Hash.Algorithms import qualified Config import IHP.ControllerSupport import Data.ByteString.Base64 as Base64