()
| 123 | } |
| 124 | |
| 125 | func (sr *SignRequest) secretRingPath() string { |
| 126 | if sr.SecretKeyringPath != "" { |
| 127 | return sr.SecretKeyringPath |
| 128 | } |
| 129 | return osutil.SecretRingFile() |
| 130 | } |
| 131 | |
| 132 | func (sr *SignRequest) Sign(ctx context.Context) (signedJSON string, err error) { |
| 133 | trimmedJSON := strings.TrimRightFunc(sr.UnsignedJSON, unicode.IsSpace) |