Skip to content

Commit

Permalink
Switched payloads, added day field to rev
Browse files Browse the repository at this point in the history
  • Loading branch information
ist17002 committed Apr 25, 2022
1 parent c098856 commit dcb417e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CTng/testData/fakeCA/fakeCA.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type CAConfig struct {
}

type Revocation struct {
SRH []byte
day int
delta_CRV []byte
Timestamp string
}
Expand Down Expand Up @@ -83,21 +83,21 @@ func generateCRVs(CA CAConfig, miss int) gossip.Gossip_object {
inter = append(inter, hash_dCRV...)

REV := Revocation{
SRH: sign,
day: CA.Day,
delta_CRV: delta_crv,
Timestamp: gossip.GetCurrentTimestamp(),
}

payload, _ := json.Marshal(REV)
signature, _ := crypto.RSASign([]byte(payload), &CA.Private, crypto.CTngID(CA.Signer))
signature, _ := crypto.RSASign([]byte(sign), &CA.Private, crypto.CTngID(CA.Signer))

gossipREV := gossip.Gossip_object{
Application: "CTng",
Type: gossip.REVOCATION,
Signer: CA.Signer,
Signature: [2]string{signature.String(), ""},
Timestamp: REV.Timestamp,
Payload: [2]string{string(payload), ""},
Payload: [2]string{string(sign), string(payload)},
}
return gossipREV
}
Expand Down

0 comments on commit dcb417e

Please sign in to comment.