From 9cdd07fdf429f8ecb2c0fa5c79b2698be38e4e2d Mon Sep 17 00:00:00 2001 From: Amitai Burstein Date: Fri, 3 Nov 2023 10:20:46 +0000 Subject: [PATCH] Fix crypto rsa import (#28) * Fix import for RSA modules * More fixes --- Application/Helper/Controller.hs | 6 +++--- Application/Helper/View.hs | 4 ++-- Config/Config.hs | 2 +- Web/Controller/ImageStyle.hs | 4 ++-- Web/View/ParagraphQuotes/Show.hs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Application/Helper/Controller.hs b/Application/Helper/Controller.hs index 807f7e7..fe005ca 100644 --- a/Application/Helper/Controller.hs +++ b/Application/Helper/Controller.hs @@ -4,10 +4,10 @@ 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 Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA.PKCS15 +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 16f7b19..408133c 100644 --- a/Application/Helper/View.hs +++ b/Application/Helper/View.hs @@ -1,8 +1,8 @@ module Application.Helper.View where import IHP.ViewPrelude -import Crypto.PubKey.RSA.PKCS15 as RSA -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA +import "cryptonite" 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..33152f3 100644 --- a/Web/Controller/ImageStyle.hs +++ b/Web/Controller/ImageStyle.hs @@ -6,8 +6,8 @@ import System.Directory (doesFileExist) import qualified Data.Text as Text -- Imports for the signed token. -import Crypto.PubKey.RSA.PKCS15 as RSA -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA +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 ccd2744..e3ad0c8 100644 --- a/Web/View/ParagraphQuotes/Show.hs +++ b/Web/View/ParagraphQuotes/Show.hs @@ -3,8 +3,8 @@ import Web.View.Prelude import Web.Element.Types import Web.Element.ElementWrap import Web.Element.InnerElementLayout -import Crypto.PubKey.RSA.PKCS15 as RSA -import Crypto.Hash.Algorithms as Hash.Algorithms +import "cryptonite" Crypto.PubKey.RSA.PKCS15 as RSA +import "cryptonite" Crypto.Hash.Algorithms as Hash.Algorithms import qualified Config import IHP.ControllerSupport import Data.ByteString.Base64 as Base64