update example
This commit is contained in:
@@ -33,7 +33,7 @@ func main() {
|
|||||||
buf, err := ioutil.ReadAll(os.Stdin)
|
buf, err := ioutil.ReadAll(os.Stdin)
|
||||||
|
|
||||||
if *doSign {
|
if *doSign {
|
||||||
signedBuf, err := xmldsig.Sign(key, buf)
|
signedBuf, err := xmldsig.Sign(key, buf, xmldsig.Options{})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Printf("%s\n", err)
|
fmt.Printf("%s\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@@ -42,7 +42,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if *doVerify {
|
if *doVerify {
|
||||||
err := xmldsig.Verify(key, buf)
|
err := xmldsig.Verify(key, buf, xmldsig.Options{})
|
||||||
if err == xmldsig.ErrVerificationFailed {
|
if err == xmldsig.ErrVerificationFailed {
|
||||||
fmt.Println("signature is not correct")
|
fmt.Println("signature is not correct")
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user