ocheron / cryptostore

Serialization of cryptographic data types
Other
10 stars 9 forks source link

Test failures on s390x architecture #8

Closed swt2c closed 1 year ago

swt2c commented 1 year ago

When builiding cryptostore 0.2.2.0 on Debian unstable, we're seeing a number of test failures, but only on s390x architecture:

Test suite test-cryptostore: RUNNING...
cryptostore
  KeyWrap.AES
    AES128
      properties
        unwrap . wrap == id:           OK (0.12s)
          +++ OK, passed 100 tests.
        unwrapPad . wrapPad == id:     OK
          +++ OK, passed 100 tests.
      vectors
        1
          Wrap:                        OK
          Unwrap:                      OK
    AES192
      properties
        unwrap . wrap == id:           OK (0.11s)
          +++ OK, passed 100 tests.
        unwrapPad . wrapPad == id:     OK
          +++ OK, passed 100 tests.
      vectors
        1
          Wrap:                        OK
          Unwrap:                      OK
        2
          Wrap:                        OK
          Unwrap:                      OK
        Pad1
          Wrap:                        OK
          Unwrap:                      OK
        Pad2
          Wrap:                        OK
          Unwrap:                      OK
    AES256
      properties
        unwrap . wrap == id:           OK (0.13s)
          +++ OK, passed 100 tests.
        unwrapPad . wrapPad == id:     OK (0.01s)
          +++ OK, passed 100 tests.
      vectors
        1
          Wrap:                        OK
          Unwrap:                      OK
        2
          Wrap:                        OK
          Unwrap:                      OK
        3
          Wrap:                        OK
          Unwrap:                      OK
  KeyWrap.TripleDES
    3DES_EDE
      properties
        unwrap . wrap == id:           OK (0.43s)
          +++ OK, passed 10 tests.
      vectors
        1
          Wrap:                        OK (0.02s)
          Unwrap:                      OK (0.02s)
    3DES_EEE
      properties
        unwrap . wrap == id:           OK (0.43s)
          +++ OK, passed 10 tests.
    2DES_EDE
      properties
        unwrap . wrap == id:           OK (0.45s)
          +++ OK, passed 10 tests.
    2DES_EEE
      properties
        unwrap . wrap == id:           OK (0.42s)
          +++ OK, passed 10 tests.
  KeyWrap.RC2
    properties
      unwrap . wrap == id:             OK (0.02s)
        +++ OK, passed 100 tests.
    vectors
      1
        Wrap:                          FAIL
          tests/KeyWrap/RC2.hs:81:
          expected: Right "p\230\153\251W\SOH\247\131\&30\251q\232|\133\164 \189\201\154\240]\"\175Z\SO\&H\211_18\152l\186\175\180\178\141O5"
           but got: Right "J\235\238e\238\183\131/\219\164\129X\252\217m\164\162\147A\216\132D\US\228d\145\213\247\208C^\252\164\163\197\191-\227\158\240"
          Use -p '/KeyWrap.RC2.vectors.1.Wrap/' to rerun this test only.
        Unwrap:                        FAIL
          tests/KeyWrap/RC2.hs:82:
          expected: Right "\183\n%\251\201\216j\134\ENQ\f\224\215\DC1\234\212\217"
           but got: Left BadChecksum
          Use -p '/KeyWrap.RC2.vectors.1.Unwrap/' to rerun this test only.
      2
        Wrap:                          FAIL
          tests/KeyWrap/RC2.hs:81:
          expected: Right "\244\216\STX\FS\RS\164c\210\ETB\169\235i)\255\165w6\211\226\ETX\134\201\t\147\131[K\228\173\141\138\ESC\198;%\222+\247y\147"
           but got: Right "\CAN#\DC3\fk+\NAKF\225\SUB1!\173\129L\187T\247\r\164\176Y\250aG%u\249\201\199K\NAK\176\227-\184Ev\194\FS"
          Use -p '/KeyWrap.RC2.vectors.2.Wrap/' to rerun this test only.
        Unwrap:                        FAIL
          tests/KeyWrap/RC2.hs:82:
          expected: Right "\183\n%\251\201\216j\134\ENQ\f\224\215\DC1\234\212\217"
           but got: Left BadChecksum
          Use -p '/KeyWrap.RC2.vectors.2.Unwrap/' to rerun this test only.
  Cipher.RC2
    properties
      decrypt . encrypt == id:         OK
        +++ OK, passed 100 tests.
    vectors
      1
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "\235\183s\249\147'\142\255"
           but got: "\183\235\249s'\147\255\142"
          Use -p '/1.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"
           but got: "\133\SO\203z;v<\SI"
          Use -p '/1.Decrypt/' to rerun this test only.
      2
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "'\139'\228./\rI"
           but got: "\139'\228'/.I\r"
          Use -p '/2.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\255\255\255\255\255\255\255\255"
           but got: "\179UEL\134\DC1\235\216"
          Use -p '/2.Decrypt/' to rerun this test only.
      3
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "0d\158\223\155\231\210\194"
           but got: "W7x\DC3\133\STX\194)"
          Use -p '/3.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\DLE\NUL\NUL\NUL\NUL\NUL\NUL\SOH"
           but got: "\209\232\CANK.\190\180\EM"
          Use -p '/3.Decrypt/' to rerun this test only.
      4
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "a\168\162D\173\172\204\240"
           but got: "\168aD\162\172\173\240\204"
          Use -p '/4.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"
           but got: "b\158\247\244fa\171`"
          Use -p '/4.Decrypt/' to rerun this test only.
      5
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "l\207C\b\151L&\DEL"
           but got: "\207l\bCL\151\DEL&"
          Use -p '/5.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"
           but got: "V\RS}#\194\217PF"
          Use -p '/5.Decrypt/' to rerun this test only.
      6
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "\SUB\128}'+\190]\177"
           but got: "\128\SUB'}\190+\177]"
          Use -p '/6.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"
           but got: "7\146fw3\DEL\249\184"
          Use -p '/6.Decrypt/' to rerun this test only.
      7
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "\"iU*\176\248\\\166"
           but got: "i\"*U\248\176\166\\"
          Use -p '/7.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"
           but got: "\248\156*\166\DEL\171W\218"
          Use -p '/7.Decrypt/' to rerun this test only.
      8
        Encrypt:                       FAIL
          tests/Cipher/RC2.hs:105:
          expected: "[x\211\164=\255\241\241"
           but got: "x[\164\211\255=\241\241"
          Use -p '/vectors.8.Encrypt/' to rerun this test only.
        Decrypt:                       FAIL
          tests/Cipher/RC2.hs:106:
          expected: "\NUL\NUL\NUL\NUL\NUL\NUL\NUL\NUL"
           but got: "\233\218\167&pv\EOT\a"
          Use -p '/8.Decrypt/' to rerun this test only.
  CMS
    Data
      read:                            OK
      write:                           OK
    SignedData:                        OK
      verifying RSA
      verifying DSA
      verifying EC (named curve)
      verifying EC (explicit prime curve)
      verifying RSA-PSS
    SignedDataDetached:                OK
      verifying RSA
      verifying DSA
      verifying EC (named curve)
      verifying EC (explicit prime curve)
      verifying RSA-PSS
    EnvelopedData
      KTRI:                            FAIL
        testing 3DES_CBC with RSAES-PKCS1
        testing 3DES_CBC with RSAES-OAEP
        testing AES128_CBC with RSAES-PKCS1
        testing AES128_CBC with RSAES-OAEP
        testing AES192_CBC with RSAES-PKCS1
        testing AES192_CBC with RSAES-OAEP
        testing AES256_CBC with RSAES-PKCS1
        testing AES256_CBC with RSAES-OAEP
        testing CAST5_CBC (128 bits) with RSAES-PKCS1
        testing CAST5_CBC (128 bits) with RSAES-OAEP
        testing Camellia128_CBC with RSAES-PKCS1
        testing Camellia128_CBC with RSAES-OAEP
        testing RC2 (128 bits) with RSAES-PKCS1
          tests/Util.hs:31:
          expecting Right but got: Left DecryptionFailed

        Use -p '/KTRI/' to rerun this test only.
      KARI:                            FAIL (0.20s)
        testing 3DES_CBC with SHA1               (0.03s)
        testing 3DES_CBC with SHA224             (0.03s)
        testing 3DES_CBC with SHA256             (0.03s)
        testing 3DES_CBC with SHA384             (0.03s)
        testing 3DES_CBC with SHA512             (0.03s)
        testing AES128_CBC with SHA1
        testing AES128_CBC with SHA224
        testing AES128_CBC with SHA256
        testing AES128_CBC with SHA384
        testing AES128_CBC with SHA512
        testing AES192_CBC with SHA1
        testing AES192_CBC with SHA224
        testing AES192_CBC with SHA256
        testing AES192_CBC with SHA384
        testing AES192_CBC with SHA512
        testing AES256_CBC with SHA1
        testing AES256_CBC with SHA224
        testing AES256_CBC with SHA256
        testing AES256_CBC with SHA384
        testing AES256_CBC with SHA512
        testing CAST5_CBC (128 bits) with SHA1
        testing CAST5_CBC (128 bits) with SHA224
        testing CAST5_CBC (128 bits) with SHA256
        testing CAST5_CBC (128 bits) with SHA384
        testing CAST5_CBC (128 bits) with SHA512
        testing Camellia128_CBC with SHA1
        testing Camellia128_CBC with SHA224
        testing Camellia128_CBC with SHA256
        testing Camellia128_CBC with SHA384
        testing Camellia128_CBC with SHA512
        testing RC2 (128 bits) with SHA1
          tests/Util.hs:31:
          expecting Right but got: Left DecryptionFailed

        Use -p '/KARI/' to rerun this test only.
      KEKRI:                           FAIL
        testing 3DES_CBC
        testing AES128_CBC
        testing AES192_CBC
        testing AES256_CBC
        testing CAST5_CBC (128 bits)
        testing Camellia128_CBC
        testing RC2 (128 bits)
          tests/Util.hs:31:
          expecting Right but got: Left DecryptionFailed

        Use -p '/KEKRI/' to rerun this test only.
      PWRI:                            FAIL (0.01s)
        testing 3DES_CBC             (0.02s)
        testing AES128_CBC
        testing AES192_CBC
        testing AES256_CBC
        testing CAST5_CBC (128 bits)
        testing Camellia128_CBC
        testing RC2 (128 bits)
          tests/Util.hs:31:
          expecting Right but got: Left InvalidInput "keyUnwrap: invalid wrapped key"

        Use -p '/PWRI/' to rerun this test only.
    DigestedData:                      OK
      verifying MD5
      digesting MD5
      verifying SHA1
      digesting SHA1
      verifying SHA224
      digesting SHA224
      verifying SHA256
      digesting SHA256
      verifying SHA384
      digesting SHA384
      verifying SHA512
      digesting SHA512
    EncryptedData:                     FAIL (0.01s)
      decrypting DES_CBC
      encrypting DES_CBC
      decrypting 3DES_CBC
      encrypting 3DES_CBC
      decrypting AES128_CBC
      encrypting AES128_CBC
      decrypting AES192_CBC
      encrypting AES192_CBC
      decrypting AES256_CBC
      encrypting AES256_CBC
      decrypting CAST5_CBC (40 bits)
      encrypting CAST5_CBC (40 bits)
      decrypting CAST5_CBC (128 bits)
      encrypting CAST5_CBC (128 bits)
      decrypting Camellia128_CBC
      encrypting Camellia128_CBC
      decrypting RC2 (40 bits)
        tests/Util.hs:31:
        expecting Right but got: Left DecryptionFailed

      Use -p '/EncryptedData/' to rerun this test only.
    AuthEnvelopedData:                 OK (0.04s)
      testing vector 0         (0.02s)
      testing encoded vector 0 (0.02s)
      testing vector 1
      testing encoded vector 1
    properties
      marshalling:                     OK (23.40s)
        +++ OK, passed 100 tests:
        56% 0 .. 1 KB
        10% 3 .. 4 KB
         9% 1 .. 2 KB
         6% 2 .. 3 KB
         4% 7 .. 8 KB
         4% 9 .. 10 KB
         2% 11 .. 12 KB
         2% 5 .. 6 KB
         2% 6 .. 7 KB
         2% 8 .. 9 KB
         1% 13 .. 14 KB
         1% 17 .. 18 KB
         1% 4 .. 5 KB
      signing:                         OK (23.99s)
        +++ OK, passed 100 tests:
        11% Ed25519
        10% RSA SHA512
         8% DSA SHA224
         7% ECDSA SHA256
         7% Ed448
         7% RSA SHA1
         6% DSA SHA1
         6% DSA SHA256
         6% RSA MD5
         5% RSA SHA224
         4% ECDSA SHA1
         4% ECDSA SHA224
         4% RSA MD2
         4% RSAAnyHash
         3% ECDSA SHA384
         2% RSA SHA256
         1% ECDSA SHA512
         1% RSA SHA384
         1% RSAPSS (PSSParams {pssHashAlgorithm = MD2, pssMaskGenAlgorithm = MGF1 SHAKE256_512, pssSaltLength = 17})
         1% RSAPSS (PSSParams {pssHashAlgorithm = MD5, pssMaskGenAlgorithm = MGF1 MD5, pssSaltLength = 1})
         1% RSAPSS (PSSParams {pssHashAlgorithm = SHAKE256 Proxy, pssMaskGenAlgorithm = MGF1 MD4, pssSaltLength = 9})
         1% RSAPSS (PSSParams {pssHashAlgorithm = SHAKE256_512, pssMaskGenAlgorithm = MGF1 SHA256, pssSaltLength = 6})
      enveloping:                      OK (55.76s)
        +++ OK, passed 100 tests:
         9% Camellia128_CTR
         8% AES128_ECB
         8% Camellia128_CFB
         7% Camellia128_ECB
         6% AES192_CBC
         6% CAST5_CBC
         6% DES_ECB
         5% AES128_CBC
         5% AES128_CFB
         5% AES256_CBC
         5% DES_CBC
         5% DES_CFB
         5% DES_EDE3_CBC
         4% AES192_CFB
         4% AES192_ECB
         4% Camellia128_CBC
         3% AES256_ECB
         3% RC2_CBC
         2% AES256_CFB
      digesting:                       OK (24.84s)
        +++ OK, passed 100 tests:
        13% SHA512
        11% SHAKE256 Proxy
        10% SHA384
         9% SHAKE128 Proxy
         9% SHAKE256_512
         8% MD5
         8% SHA1
         8% SHA224
         8% SHAKE128_256
         7% MD2
         7% SHA256
         2% MD4
      encrypting:                      OK (22.12s)
        +++ OK, passed 100 tests:
         8% Camellia128_CFB
         7% AES192_CBC
         7% AES192_CFB
         7% DES_ECB
         7% RC2_CBC
         6% AES128_ECB
         6% AES256_CBC
         6% DES_CFB
         5% AES128_CBC
         5% AES128_CFB
         5% AES192_ECB
         5% AES256_ECB
         5% Camellia128_CBC
         5% Camellia128_ECB
         4% AES256_CFB
         4% Camellia128_CTR
         4% DES_CBC
         3% DES_EDE3_CBC
         1% CAST5_CBC
      authenticating:                  OK (40.36s)
        +++ OK, passed 100 tests:
        21% HMAC SHA384
        18% HMAC SHA512
        17% HMAC SHA256
        16% HMAC MD5
        14% HMAC SHA1
        14% HMAC SHA224
      enveloping with authentication:  OK (32.05s)
        +++ OK, passed 100 tests:
        14% AES128_CCM
        14% AUTH_ENC_256
        14% CHACHA20_POLY1305
        13% AES192_CCM
        12% AES256_GCM
        10% AES256_CCM
         9% AES128_GCM
         9% AES192_GCM
         5% AUTH_ENC_128
  X509
    RSA
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    DSA
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    EC (named curve)
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    X25519
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    X448
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    Ed25519
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    Ed448
      read public key:                 OK
      read certificate:                OK
      same key:                        OK
      write certificate:               OK
      write public key:                OK
    properties
      marshalling public keys:         OK (1.37s)
        +++ OK, passed 100 tests.
      marshalling certificates:        OK (1.26s)
        +++ OK, passed 100 tests.
      marshalling CRLs:                OK (0.03s)
        +++ OK, passed 100 tests.
  PKCS8
    RSA
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.58s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/RSA.EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.27s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/RSA.EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.12s)
    DSA
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.31s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/DSA.EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.14s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/DSA.EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.08s)
    EC (named curve)
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.16s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/EC (named curve).EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.07s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/EC (named curve).EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.08s)
    EC (explicit prime curve)
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.34s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/EC (explicit prime curve).EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.16s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/EC (explicit prime curve).EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.08s)
    X25519
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.07s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/X25519.EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.03s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/X25519.EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.12s)
    X448
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.11s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/X448.EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.04s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/X448.EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.08s)
    Ed25519
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.08s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/Ed25519.EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.03s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/Ed25519.EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.08s)
    Ed448
      PrivateKey
        read outer:                    OK
        read inner:                    OK
        same key:                      OK
        write outer:                   OK
        write inner:                   OK
      EncryptedPrivateKey
        PBES1
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.10s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/Ed448.EncryptedPrivateKey.PBES1.same keys/' to rerun this test only.
        PBKDF2
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   FAIL (0.04s)
            tests/PKCS8/Tests.hs:70:
            some keys differ
            Use -p '/Ed448.EncryptedPrivateKey.PBKDF2.same keys/' to rerun this test only.
        Scrypt
          read unencrypted:            OK
          read encrypted:              OK
          same keys:                   OK (0.12s)
    properties
      marshalling:                     OK (1.16s)
        +++ OK, passed 100 tests.
      marshalling with encryption:     OK (5.55s)
        +++ OK, passed 100 tests.
  PKCS12
    RSA:                               FAIL
      Reading PKCS #12 files
      Reading private key
      Reading certificate
        tests/Util.hs:31:
        expecting Right but got: Left DecryptionFailed

      Use -p '/PKCS12.RSA/' to rerun this test only.
    Ed25519:                           FAIL
      Reading PKCS #12 files
      Reading private key
      Reading certificate
        tests/Util.hs:31:
        expecting Right but got: Left DecryptionFailed

      Use -p '/PKCS12.Ed25519/' to rerun this test only.
    properties
      marshalling:                     OK (5.83s)
        +++ OK, passed 100 tests.
      marshalling with authentication: OK (3.40s)
        +++ OK, passed 100 tests.
      converting credentials:          OK (6.60s)
        +++ OK, passed 20 tests.
      converting named credentials:    OK (9.03s)
        +++ OK, passed 20 tests.

43 out of 226 tests failed (263.03s)
Test suite test-cryptostore: FAIL
Test suite logged to: dist-ghc/test/cryptostore-0.2.2.0-test-cryptostore.log
0 of 1 test suites (0 of 1 test cases) passed.

We're using ghc 9.0.2.

ocheron commented 1 year ago

Yes indeed I got the endianness wrong in RC2. I will verify more and cut a new release.

swt2c commented 1 year ago

:+1: Let me know if you'd like me to test any patches.

ocheron commented 1 year ago

Fixed in 8900135, further simplified in 7ed1471, and released as cryptostore-0.2.3.0. I could test myself through emulation so I'm pretty confident. Something I should have done earlier probably...

swt2c commented 1 year ago

Thanks, confirmed this built and tested fine on s390x.