From a053b3ced90a7cf562e80fd2ec8c4bfdb6bfd154 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 10 Jun 2012 10:09:55 +0300 Subject: [PATCH] authenticate-oauth: port to RSA-1.2 Signed-off-by: Sergei Trofimovich --- authenticate-oauth/Web/Authenticate/OAuth.hs | 9 ++------- authenticate-oauth/authenticate-oauth.cabal | 3 ++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/authenticate-oauth/Web/Authenticate/OAuth.hs b/authenticate-oauth/Web/Authenticate/OAuth.hs index c31cfa0d..03c972d7 100644 --- a/authenticate-oauth/Web/Authenticate/OAuth.hs +++ b/authenticate-oauth/Web/Authenticate/OAuth.hs @@ -34,7 +34,8 @@ import Data.Digest.Pure.SHA import Data.ByteString.Base64 import Data.Time import Numeric -import Codec.Crypto.RSA (rsassa_pkcs1_v1_5_sign, ha_SHA1, PrivateKey(..)) +import Codec.Crypto.RSA (rsassa_pkcs1_v1_5_sign, ha_SHA1) +import Crypto.Types.PubKey.RSA (PrivateKey(..)) import Network.HTTP.Types (Header) import Blaze.ByteString.Builder (toByteString) import Control.Monad.IO.Class (MonadIO) @@ -108,13 +109,7 @@ data SignMethod = PLAINTEXT | HMACSHA1 | RSASHA1 PrivateKey deriving (Show, Eq, Ord, Read, Data, Typeable) - -deriving instance Typeable PrivateKey -deriving instance Data PrivateKey -deriving instance Read PrivateKey deriving instance Ord PrivateKey -deriving instance Eq PrivateKey - -- | Data type for redential. data Credential = Credential { unCredential :: [(BS.ByteString, BS.ByteString)] } deriving (Show, Eq, Ord, Read, Data, Typeable) diff --git a/authenticate-oauth/authenticate-oauth.cabal b/authenticate-oauth/authenticate-oauth.cabal index 8343ed5e..7f15fe53 100644 --- a/authenticate-oauth/authenticate-oauth.cabal +++ b/authenticate-oauth/authenticate-oauth.cabal @@ -18,7 +18,8 @@ library , http-conduit >= 1.4 && < 1.5 , transformers >= 0.1 && < 0.4 , bytestring >= 0.9 - , RSA >= 1.0 && < 1.1 + , crypto-pubkey-types >= 0.1 && < 0.2 + , RSA >= 1.2 && < 1.3 , time , data-default >= 0.3 && < 0.5 , base64-bytestring >= 0.1 && < 0.2