Update go-fed/httpsig to v1.1.0 (part 2)
							parent
							
								
									12f1207754
								
							
						
					
					
						commit
						5c9098bae7
					
				
							
								
								
									
										4
									
								
								actor.go
								
								
								
								
							
							
						
						
									
										4
									
								
								actor.go
								
								
								
								
							|  | @ -454,7 +454,7 @@ func (a *Actor) signedHTTPPost(content map[string]interface{}, to string) (err e | ||||||
| 		log.Info(err) | 		log.Info(err) | ||||||
| 		return | 		return | ||||||
| 	} | 	} | ||||||
| 	postSigner, _, _ := httpsig.NewSigner([]httpsig.Algorithm{httpsig.RSA_SHA256}, "SHA-256", []string{"(request-target)", "date", "host", "digest"}, httpsig.Signature) | 	postSigner, _, _ := httpsig.NewSigner([]httpsig.Algorithm{httpsig.RSA_SHA256}, "SHA-256", []string{"(request-target)", "date", "host", "digest"}, httpsig.Signature, 0) | ||||||
| 
 | 
 | ||||||
| 	byteCopy := make([]byte, len(b)) | 	byteCopy := make([]byte, len(b)) | ||||||
| 	copy(byteCopy, b) | 	copy(byteCopy, b) | ||||||
|  | @ -521,7 +521,7 @@ func (a *Actor) signedHTTPGet(address string) (string, error) { | ||||||
| 	req.Header.Add("Accept", "application/activity+json; profile=\"https://www.w3.org/ns/activitystreams\"") | 	req.Header.Add("Accept", "application/activity+json; profile=\"https://www.w3.org/ns/activitystreams\"") | ||||||
| 
 | 
 | ||||||
| 	// set up the http signer
 | 	// set up the http signer
 | ||||||
| 	signer, _, _ := httpsig.NewSigner([]httpsig.Algorithm{httpsig.RSA_SHA256}, "SHA-256", []string{"(request-target)", "date", "host", "digest"}, httpsig.Signature) | 	signer, _, _ := httpsig.NewSigner([]httpsig.Algorithm{httpsig.RSA_SHA256}, "SHA-256", []string{"(request-target)", "date", "host", "digest"}, httpsig.Signature, 0) | ||||||
| 	err = signer.SignRequest(a.privateKey, a.publicKeyID, req, nil) | 	err = signer.SignRequest(a.privateKey, a.publicKeyID, req, nil) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		log.Error("Can't sign the request") | 		log.Error("Can't sign the request") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue