x509 1.4.2 → 1.4.3
raw patch · 4 files changed
+35/−2 lines, 4 files
Files
- Data/X509.hs +3/−0
- Data/X509/CertificateChain.hs +1/−1
- Data/X509/PrivateKey.hs +28/−0
- x509.cabal +3/−1
Data/X509.hs view
@@ -16,7 +16,9 @@ , SignedCRL , Certificate(..) , PubKey(..)+ , PrivKey(..) , pubkeyToAlg+ , privkeyToAlg , module Data.X509.AlgorithmIdentifier , module Data.X509.Ext , module Data.X509.ExtensionRaw@@ -68,6 +70,7 @@ import Data.X509.DistinguishedName import Data.X509.Signed import Data.X509.PublicKey+import Data.X509.PrivateKey import Data.X509.AlgorithmIdentifier import qualified Crypto.Hash.MD5 as MD5
Data/X509/CertificateChain.hs view
@@ -19,7 +19,7 @@ -- | A chain of X.509 certificates in exact form. newtype CertificateChain = CertificateChain [SignedExact Certificate]- deriving (Eq)+ deriving (Show,Eq) -- | Represent a chain of X.509 certificates in bytestring form. newtype CertificateChainRaw = CertificateChainRaw [ByteString]
+ Data/X509/PrivateKey.hs view
@@ -0,0 +1,28 @@+-- |+-- Module : Data.X509.PublicKey+-- License : BSD-style+-- Maintainer : Vincent Hanquez <vincent@snarc.org>+-- Stability : experimental+-- Portability : unknown+--+-- Public key handling in X.509 infrastructure+--+module Data.X509.PrivateKey+ ( PrivKey(..)+ , privkeyToAlg+ ) where++import Data.X509.AlgorithmIdentifier+import qualified Crypto.Types.PubKey.RSA as RSA+import qualified Crypto.Types.PubKey.DSA as DSA++-- | Private key types known and used in X.509+data PrivKey =+ PrivKeyRSA RSA.PrivateKey -- ^ RSA private key+ | PrivKeyDSA DSA.PrivateKey -- ^ DSA private key+ deriving (Show,Eq)++-- | Convert a Public key to the Public Key Algorithm type+privkeyToAlg :: PrivKey -> PubKeyALG+privkeyToAlg (PrivKeyRSA _) = PubKeyALG_RSA+privkeyToAlg (PrivKeyDSA _) = PubKeyALG_DSA
x509.cabal view
@@ -1,5 +1,5 @@ Name: x509-Version: 1.4.2+Version: 1.4.3 Description: X509 reader and writer License: BSD3 License-file: LICENSE@@ -35,6 +35,7 @@ Data.X509.DistinguishedName Data.X509.Cert Data.X509.PublicKey+ Data.X509.PrivateKey Data.X509.Ext Data.X509.ExtensionRaw Data.X509.CRL@@ -62,3 +63,4 @@ source-repository head type: git location: git://github.com/vincenthz/hs-certificate+ subdir: x509