Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 7ebfe13

Browse files
authored
Merge pull request #3610 from input-output-hk/KtorZ/CO-388/cardano-sl-x509-as-library
[CO-388] Pull out cardano-x509-certificates internals as a library
2 parents 3f04479 + 8f20d8e commit 7ebfe13

File tree

12 files changed

+506
-268
lines changed

12 files changed

+506
-268
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
- The API provides an endpoint to retrieve basic statistics on the UTxO distribution of a wallet
2525
(`/api/v1/wallets/{walletId}/statistics`). (CO-325)
2626

27+
- cardano-sl exposes a new package `x509` with tooling for defining a PKI infrastructure from
28+
pure Haskell. This is basically an export of the internals of the tool `cardano-sl-x509-generate` (CO-387)
29+
2730

2831
### Fixes
2932

pkgs/default.nix

Lines changed: 66 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17207,12 +17207,9 @@ license = stdenv.lib.licenses.mit;
1720717207
, aeson-options
1720817208
, ansi-terminal
1720917209
, ansi-wl-pprint
17210-
, asn1-encoding
17211-
, asn1-types
1721217210
, async
1721317211
, base
1721417212
, base58-bytestring
17215-
, base64-bytestring
1721617213
, bytestring
1721717214
, canonical-json
1721817215
, cardano-report-server
@@ -17231,24 +17228,21 @@ license = stdenv.lib.licenses.mit;
1723117228
, cardano-sl-util
1723217229
, cardano-sl-util-test
1723317230
, cardano-sl-wallet
17231+
, cardano-sl-x509
1723417232
, containers
1723517233
, cpphs
1723617234
, cryptonite
1723717235
, data-default
17238-
, data-default-class
1723917236
, directory
1724017237
, filepath
1724117238
, formatting
1724217239
, Glob
1724317240
, hedgehog
17244-
, hourglass
1724517241
, hspec
17246-
, ip
1724717242
, lens
1724817243
, lifted-async
1724917244
, mtl
1725017245
, neat-interpolation
17251-
, network-transport
1725217246
, network-transport-tcp
1725317247
, optparse-applicative
1725417248
, optparse-generic
@@ -17272,9 +17266,6 @@ license = stdenv.lib.licenses.mit;
1727217266
, unix
1727317267
, unix-compat
1727417268
, unordered-containers
17275-
, x509
17276-
, x509-store
17277-
, x509-validation
1727817269
, yaml
1727917270
}:
1728017271
mkDerivation {
@@ -17330,12 +17321,9 @@ acid-state-exts
1733017321
aeson
1733117322
aeson-options
1733217323
ansi-wl-pprint
17333-
asn1-encoding
17334-
asn1-types
1733517324
async
1733617325
base
1733717326
base58-bytestring
17338-
base64-bytestring
1733917327
bytestring
1734017328
canonical-json
1734117329
cardano-report-server
@@ -17352,21 +17340,18 @@ cardano-sl-infra
1735217340
cardano-sl-networking
1735317341
cardano-sl-util
1735417342
cardano-sl-wallet
17343+
cardano-sl-x509
1735517344
containers
1735617345
cryptonite
1735717346
data-default
17358-
data-default-class
1735917347
directory
1736017348
filepath
1736117349
formatting
1736217350
Glob
17363-
hourglass
17364-
ip
1736517351
lens
1736617352
lifted-async
1736717353
mtl
1736817354
neat-interpolation
17369-
network-transport
1737017355
network-transport-tcp
1737117356
optparse-applicative
1737217357
optparse-generic
@@ -17384,9 +17369,6 @@ universum
1738417369
unix
1738517370
unix-compat
1738617371
unordered-containers
17387-
x509
17388-
x509-store
17389-
x509-validation
1739017372
yaml
1739117373
];
1739217374
executableToolDepends = [
@@ -18201,6 +18183,70 @@ doHaddock = false;
1820118183
description = "Cardano SL - wallet (Arbitrary instances)";
1820218184
license = stdenv.lib.licenses.mit;
1820318185

18186+
}) {};
18187+
"cardano-sl-x509" = callPackage
18188+
({
18189+
mkDerivation
18190+
, aeson
18191+
, asn1-encoding
18192+
, asn1-types
18193+
, base
18194+
, base64-bytestring
18195+
, bytestring
18196+
, cryptonite
18197+
, data-default-class
18198+
, filepath
18199+
, hourglass
18200+
, ip
18201+
, network-transport
18202+
, optparse-applicative
18203+
, stdenv
18204+
, text
18205+
, universum
18206+
, unordered-containers
18207+
, x509
18208+
, x509-store
18209+
, x509-validation
18210+
, yaml
18211+
}:
18212+
mkDerivation {
18213+
18214+
pname = "cardano-sl-x509";
18215+
version = "1.0.0";
18216+
src = ./../x509;
18217+
configureFlags = [
18218+
"--ghc-option=-fwarn-redundant-constraints"
18219+
"--ghc-option=-Wall"
18220+
"--ghc-option=-Wcompat"
18221+
"--ghc-option=-Werror"
18222+
];
18223+
libraryHaskellDepends = [
18224+
aeson
18225+
asn1-encoding
18226+
asn1-types
18227+
base
18228+
base64-bytestring
18229+
bytestring
18230+
cryptonite
18231+
data-default-class
18232+
filepath
18233+
hourglass
18234+
ip
18235+
network-transport
18236+
optparse-applicative
18237+
text
18238+
universum
18239+
unordered-containers
18240+
x509
18241+
x509-store
18242+
x509-validation
18243+
yaml
18244+
];
18245+
doHaddock = false;
18246+
homepage = "https://github.com/input-output-hk/cardano-sl/x509/README.md";
18247+
description = "Tool-suite for generating x509 certificates specialized for RSA with SHA-256";
18248+
license = stdenv.lib.licenses.mit;
18249+
1820418250
}) {};
1820518251
"carray" = callPackage
1820618252
({

stack.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ packages:
3939
- node-ipc
4040
- faucet
4141
- acid-state-exts
42+
- x509
4243

4344
# IOHK projects:
4445

@@ -321,3 +322,4 @@ ghc-options:
321322
cardano-sl-wallet: -Wall -Werror -Wcompat -fwarn-redundant-constraints
322323
cardano-sl-wallet-new: -Wall -Werror -Wcompat -fwarn-redundant-constraints
323324
cardano-sl-node-ipc: -Wall -Werror -Wcompat -fwarn-redundant-constraints
325+
cardano-sl-x509: -Wall -Werror -Wcompat -fwarn-redundant-constraints

tools/cardano-sl-tools.cabal

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -465,29 +465,12 @@ executable cardano-blockchain-analyser
465465
executable cardano-x509-certificates
466466
hs-source-dirs: src/gencerts
467467
main-is: Main.hs
468-
other-modules: Data.X509.Extra
469-
, Configuration
470468

471469
build-depends: base >=4.7 && <5
472-
, aeson
473-
, asn1-encoding
474-
, asn1-types
475-
, base64-bytestring
476-
, bytestring
477-
, cryptonite
478-
, data-default-class
470+
, cardano-sl-x509
479471
, filepath
480-
, hourglass
481-
, ip
482-
, network-transport
483472
, optparse-applicative
484-
, text
485473
, universum
486-
, unordered-containers
487-
, x509
488-
, x509-store
489-
, x509-validation
490-
, yaml
491474

492475
default-extensions: DeriveGeneric
493476
NoImplicitPrelude

0 commit comments

Comments
 (0)