Commit 3d1f7cde authored by Sietse Ringers's avatar Sietse Ringers

test: refresh expired credentials in test storage

parent 36ab84c9
Pipeline #39549 passed with stages
in 3 minutes and 33 seconds
......@@ -72,7 +72,7 @@ func TestLogging(t *testing.T) {
// Test max parameter
logs, err = client.LoadNewestLogs(1)
require.NoError(t, err)
require.True(t, len(logs) == oldLogLength+1)
require.True(t, len(logs) == 1)
// Do signature session
request = getSigningRequest(attrid)
......
......@@ -3,14 +3,15 @@ package irmaclient
import (
"encoding/json"
"errors"
"github.com/privacybydesign/irmago/internal/fs"
"os"
"path/filepath"
"testing"
"github.com/privacybydesign/irmago/internal/fs"
"github.com/privacybydesign/gabi"
"github.com/privacybydesign/gabi/big"
"github.com/privacybydesign/irmago"
irma "github.com/privacybydesign/irmago"
"github.com/privacybydesign/irmago/internal/test"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
......@@ -45,8 +46,8 @@ func parseExistingStorage(t *testing.T) *Client {
func parseDisclosure(t *testing.T) (*Client, *irma.DisclosureRequest, *irma.Disclosure) {
client := parseStorage(t)
requestJson := `{"@context":"https://irma.app/ld/request/disclosure/v2","context":"AQ==","nonce":"M3LYmTr3CZDYZkMNK2uCCg==","protocolVersion":"2.5","disclose":[[["irma-demo.RU.studentCard.studentID"]]],"labels":{"0":null}}`
dislosureJson := `{"proofs":[{"c":"l1WDHGtsbEO+rVhVoGBDpzluiU5riCKtgMu6Mn4zxDg=","A":"XRyyZFL5xcvQDrCEoIchQdd1qyGpMIafNoak/8aSZisQ5U7JEa54Yu8nW4L9/4fXqLDK1SyX/CvFXrELbFBX1qf1lJ19jTViU9jIpSOw3D8w/DeY7Kg0evwVKUQrcrJnT3ss8J5gM5eRF1E1AuRHgKywWYvtxFvHQs2ODN2qsWY=","e_response":"m41dWZjTVYN6RqnojdHwgfixZwBJKW189b/ehnG3YTt0dMKDUnrLBYhGyKtmstnLzYTuJaBDX4r8","v_response":"DajHvzCDcmxXvd4sucgnrOkaOyFaF0EcOf23ySy56SAiFzWBW1BkcMQ8AwjwnVzYS5vpHnkUDkgqovOsl74RJQMSdnjzu0URAvGZm7/3pXgBjR5Q0154oMC3+n19pQrX68xgEOK7Am6jflfNufyINIVOAm7SfObsjKRDMQcuHOLgoj5XIHPJ3EBJcFJzizmaaGuGHKEJ0+b4Zi8JCBMaP9mdDhsUJAtm190hYxcMb2CtIIiJqGRk+JcNmusRuJYcT9OLx/Xklj+qm6/5C0+jRQPdYNycVzwKel+HDWZyYymCSpjbR5mUw1IpK1QvszN5NIJXVCeDrMMRZcySfOUA","a_responses":{"0":"xxlDTyJ1xq6TuMYgiyisNJ82tiJsnFdBinGP5ZQtw7rxXcLrO6k7nE88wPDuejzEnF7+LgIes32BMC+Qr/C/qh//x7SuMxDujoY=","2":"8HEFx5JJ24Z/D6MRtE6m7Pyk9T61S7lnxdTaych7wEK3ZO+4qyFYVZwx4NLtTp1MRfTiUq6KhNd7Is2cEBAdZYaL3XBnNRQMNvw=","3":"2BleNpicu21GFR1kYJ6kpFct6pyFSYz8hw5tBHtGz7O54KgHySwZ6lI/J4hp1b5l3RWq6gZzlz/PzOLKxk3E3YOwS7e4hsQ7BFo=","5":"977MbEQ95ieN/lVJSUS5Y80nY5KigNtrId2RW87CIsCZQ892rPljuZ0s/UG16b3oEYFEx+WZPxKvGiQN0dJiB8BK3P8qPZlGIu4="},"a_disclosed":{"1":"AgAJuwB+AALWy2qU9p3l52l9LU1rVT4M","4":"NDU2"}}],"indices":[[{"cred":0,"attr":4}]]}`
requestJson := `{"@context":"https://irma.app/ld/request/disclosure/v2","context":"AQ==","nonce":"zVQJMG6TKZwfcv5TExFVSQ==","protocolVersion":"2.5","disclose":[[["irma-demo.RU.studentCard.studentID"]]],"labels":{"0":null}}`
dislosureJson := `{"proofs":[{"c":"o21UPItMKWXmXNhBKsCBHDWjfRoy+uDdbDB1yhhpg3k=","A":"Bl68Ut2nu2nwhIweU9QGoNd6TkjUIRbQ6SDg22m8PzMEgca0KA4/Oy1gaJCUHM3FFJ0Gdj0+6/VpcF85JyuQZou93UXXwzN/Y7ohUw+YxVTQ7WcJmZ/VGDh3SME5KJ9aWjGmq61J2LQiiDSq+XrcWFfKPwad6BkDhV2reo4yo68=","e_response":"VD0pWdeDkd3V+R3734xyRcGeWMMTzpB0ZiJhKMzv37DmHN6RpRzTF/0HroAsMIMz8mBWxYPVRBiw","v_response":"3OWsmIDM7v0ByEXax2YZGp3BnJ5nkCLMcT6/ENU0EcpjrOz+rT+NayQSLgMshxAATpgkgAluFQ3owOoQEL8ZAkZTWUDW5j+qy7GDFd22ZOKEZLWf8Q1XRK3x6exV9CIMkcBQrv5W6EI9XB5OKKNB3Z/VTALY3UW8cQQ0DPHj83YBEL3LJQDxwaxvQeHx4nysJjsEoLJE1KPBynXlfxpk17O3HTg+NuX5gj7+ckiHrmXgthJHvqCTnNpEORtXDJTmKJUccUiyWuftA36cIXIxW4N6I88T4BYctwN+T9NY+hcjYESITtxB+r2elB98bzlWgHF8ohpOkkJGuNjTFjw=","a_responses":{"0":"eDQA3Lrh2WC3o/VP6KD/uaMSRy/em3gEfuqXD9tVT+yJFYb7GT91lle5dB6lg235pUSHzYIOET7FYOHwb4/YSAGQiix0IzqFkLo=","2":"kT3kfcIaPy3UBYPX78X10w/R1Cb5rHqoW5OUd06xqC1V9MqVw3zhtc/nBgWmvVwTgJrl2CyuBjjoF10RJz/FEjYZ0JAF57uUXW8=","3":"4oSBcyUT6mOBhk/Szk/5G5QrgaAADW6wSl91hGwTTNDTIUiK01GE11JozbwDeZsLPoFikzikwkPu9ZsOAtOtb/+IcadB6NP0KXA=","5":"OwUSSCBb9NOMOYYSGSYCrdFUNLKJ/b2YP5LlElFG5r4GPR71zTQsZ4QuJiMIt9iFPRP6PQUvMvjWA59UTQ9AlwKc9JcQzbScYBM="},"a_disclosed":{"1":"AwAKOQIBAALWy2qU9p3l52l9LU1rVT4M","4":"aGpt"}}],"indices":[[{"cred":0,"attr":4}]]}`
request := &irma.DisclosureRequest{}
require.NoError(t, json.Unmarshal([]byte(requestJson), request))
disclosure := &irma.Disclosure{}
......
[{"Ints":[49043497911096929087709751855583038580649425750938808456,6713199]},{"Ints":[49043497911096929607726931703203423024551950578089278988,23188031866369380,3224115,3421494,5269572]}]
\ No newline at end of file
[{"Ints":["AwAKOQIBAANPk8AhXLlPUlSw2hYiAvCI","6Mrm6OrmyuTcwtrL"]},{"Ints":["AwAKOQIBAALWy2qU9p3l52l9LU1rVT4M","pMLIxN7qyQ==","YmRn","aGpt","aGU="]}]
\ No newline at end of file
{"A":45222154268674273710241606712088428574327878157177201139384374721171826461412293659115700357192323970285281190820411677649364221414391111849580700591248745148446158534302920406192967484495995535298878524558192472720010597489395900822557876058305418130894199313225355725563905329921324127951328609858221865688,"e":259344723055062059907025491480697571938277889515152306249728583105665800713306759149981690559193987143012367913206299323899696942213235956742930189984109555429399234387572652290181,"v":37089426574404853314527538425590154464185669611257826737975997075833182365911745361173581237316274982025210017363868383021489436792111663380955676867084118464865738380944058955231525097633962671227066163548711934512602987866484024140781599202158747051737882065397224229528273128088731188352989738315756064211230068049165954427138829408447136906870620401460509477728657639517925540509852663699685295279125577115556094945251824705694439002539764689968101329433910130152847508956031277000706585794137651236318227128,"KeyshareP":85082025162837201194376665159280932833709502354228382426819253775157607330761605538885353580375270262824918717451102191200845300689661501037194721171086025783504808921909133839891286893734098605996576876074961701903214263017801474730299291177947936831353263293658665257545333300975086052644477159922153700211}
\ No newline at end of file
{"A":"SbgMyYglj5e3O6rD1OE1N056q2VSJXpF+sAMwd2RFubiAP9bOejlvvl8cY0QXKRAeY10UwWeB71RkNkLNgZvdw2xnQAOTsZIkoo9gI2lkviaO8TjuBVsnZf3aK7SNb+HxyE6LLZFxFzEhuLzGs0SBQQNXqLuojOFXO9SVQkEeYo=","e":"EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAfWpIyCaadRIDXSQT51wl","v":"DOPtugK674cgZiD4axaFmnNDwAExTNN3XeJqFjJG+MD+KU+loR9O7kgENpdQITYf4NdQggqbrcynvgAlXcyw9wX7iEuRPTs4xgdd6N7i602pOLQJyo0hrP3485kNp6SM9ybx0MVHm2qvqo5u121UmFLG8bXU+aP5PdjFBv5QU4ctix0kN3J9CkQZtw6Ep4JfuLrAI7PjmqLogh70klHdb4JxNWyvRGnoHi8cxIfxVmfsRd+XCLtsZwP6/dZDQl0uObjj4Put2qCuVIzsfmzeu26xY9G6","KeyshareP":null}
\ No newline at end of file
{"A":19361989720240022780364031292670736589482375295351376840389602869290921590081983014245433147598934021651062476173549660545604024910603570251193965749831813974082815089185920569764627738209782651392073734649038157462687171908062832755984081636063543276779686036825699213396941509489370406466435663161305944357,"e":259344723055062059907025491480697571938277889515152306249728583105665800713306759149981690559193987143012367913206299323899696942213235956742930225372495635518051503820864567017509,"v":44504154960997969936163816284867421689230969904501819714082539974281416125028394649804074185982730620713368510527561786489151242878408608924108769812084146129727784097430924126631729595258408129362124864052428072634924023503654055028585711391218571487914853282274713963805294744852479094032534022811676406774207262761522055883100899856663354161806256075693680140216792420850477388497107343316133929461954334492914769220324629269238945857169205525679465959160495511815055891870320672867787549146029373683233228360,"KeyshareP":null}
\ No newline at end of file
{"A":"Fey+YGwfFZGN+ySjElWNnmdSuRU5iO7jsf+NXgufqWU8vW6MUDnoLHA1CNif7+OSXXPi8GT/2N5Hct9arX23y1+9XeYHOvp0ABknUDG+2D9RdYpTJVePsw8bJxVKb1tk6VvXhK1LMaTr7IdQ8BcMOWrOtNmKty80C77+Jeyv+rhACnTojre4C6IO577KzFRzWnGO+ZrHFdTOMvulZ8710IzB+lPEgnr+rYf1L+P3N5D2JbzHtWQUmLqUxRRf3E4Bs8gdXMljeSVTZptZedoMcY/6mjxv84nyap8K4sPewPBYQF2bguItu3HWqmb9lA4oi2c5/pPVBU157EuafaPyjw==","e":"EAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHMGbdrY3qxDwFP2JA0MJ","v":"Cvo4Jz+GSESgy3Ozz+rPY+zIPFxVPIYDy50lJZv5Wjzw9YkPPNysRHgqzjcy1u6UQG020Ogutdw5+rijGqmHbvtIvRYI4zDv/zJNQQEkvFXHe+VR2hLW86xAyoEW9G7ND0lyzjuJ70ZOOV8JhjuDDMpTt/Ir1i1G0I/RvCckwTznyMHfzf3VfwdlTYZuT1VxN/pEqTk+F+EWREFvvgZPuM8BOHBjQcFhvHxk5B4NOd29Q9xb5UE7xr4OQNbIPmahSO6xiASE+GoA1VgakzG8JjL+CNoWixvUYyMm0C8TiskoWrctct7MMfM7odUAIa/6yx1hjLN6OgcIl6AF0kdtE/Ym1lVI1ZdB2dgN2oakFJiExRX4UkoZM4ZwvjaLwPvweUpv3Kz/of863wvdcLHPrFGGWvKGIIYe50Vle2x5uTVMVCFwQSr7vw/X6QPrZP3kk2INQhMlDQ7fx6UNBIb+KVg=","KeyshareP":"pwFgf8l5q/iFiqzLzeEukWjfg1hn3QsMl1yjuUFJvFfVn2xOf2I9sxK1WG1NcesToQJ5RqVHdt/D4A2gybfuUXfFEQ6jjHAu8g8b54EMh2yoKBkepWtDQXudlR7Mj4lPjNwwo11VuyGdu6Ym/B9ezbBkSzMvJN+Mi3k3sdm3PBf8oIQ8mIZiEkv7/kBo7dxAai6b2MjRlvn8MHSCxrQUMvW9D8y3PjwKSYjsdyxyvR3AOvwjbV+qikVz+kqX0BqvLfwBmrukchjpXu9Bhamj6TkgFfjPzoXYcAenH0UYyWaL0VPrOZOaKAPzZvvx1+k7FMK+T+HJwwgvueL3Mc4U6Q=="}
\ No newline at end of file
No preview for this file type
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment