@@ -15,7 +15,7 @@ import (
1515 //"a10/utilities"
1616)
1717
18- const nonceSize int = 8
18+ const nonceSize int = 64
1919
2020func Registration () structures.Protocol {
2121 intents := []string {"ratsd/chares" }
@@ -70,9 +70,8 @@ func requestFromRATSD(e structures.Element, ep structures.Endpoint, p structures
7070 // create None for RATSD call
7171 nce := make ([]byte , nonceSize )
7272 _ , _ = rand .Read (nce )
73- ips ["nonce" ] = base64 .StdEncoding .EncodeToString (nce )
73+ ips ["nonce" ] = base64 .URLEncoding .EncodeToString (nce )
7474 ips ["nonce" ] = strings .TrimRight (ips ["nonce" ].(string ), "=" )
75- ips ["nonce" ] = "TUlEQk5IMjhpaW9pc2pQeXh4eHh4eHh4eHh4eHh4eHhNSURCTkgyOGlpb2lzalB5eHh4eHh4eHh4eHh4eHh4eA"
7675 fmt .Printf ("Nonce is %v\n " , ips ["nonce" ])
7776
7877 // merge ips with policy parameters. The policy parameters take precidence
@@ -90,7 +89,7 @@ func requestFromRATSD(e structures.Element, ep structures.Endpoint, p structures
9089 url := ep .Endpoint + "/" + p .Function
9190 req , err := http .NewRequest ("POST" , url , bytes .NewBuffer (postbody ))
9291 req .Header .Set ("Content-Type" , "application/vnd.veraison.chares+json" )
93- // req.Header.Set("Accept", "application/eat+jwt ; eat_profile=tag:github.com,2024:veraison/ratsd")
92+ req .Header .Set ("Accept" , "application/eat-ucs+json ; eat_profile=\" tag:github.com,2024:veraison/ratsd\" " )
9493
9594 client := & http.Client {}
9695 resp , err := client .Do (req )
0 commit comments