~juju-qa/ubuntu/xenial/juju/2.0-rc2

« back to all changes in this revision

Viewing changes to src/golang.org/x/crypto/openpgp/write_test.go

  • Committer: Nicholas Skaggs
  • Date: 2016-09-30 14:39:30 UTC
  • mfrom: (1.8.1)
  • Revision ID: nicholas.skaggs@canonical.com-20160930143930-vwwhrefh6ftckccy
import upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
        testDetachedSignature(t, kring, out, signedInput, "check", testKey3KeyId)
51
51
}
52
52
 
 
53
func TestSignDetachedP256(t *testing.T) {
 
54
        kring, _ := ReadKeyRing(readerFromHex(p256TestKeyPrivateHex))
 
55
        kring[0].PrivateKey.Decrypt([]byte("passphrase"))
 
56
 
 
57
        out := bytes.NewBuffer(nil)
 
58
        message := bytes.NewBufferString(signedInput)
 
59
        err := DetachSign(out, kring[0], message, nil)
 
60
        if err != nil {
 
61
                t.Error(err)
 
62
        }
 
63
 
 
64
        testDetachedSignature(t, kring, out, signedInput, "check", testKeyP256KeyId)
 
65
}
 
66
 
53
67
func TestNewEntity(t *testing.T) {
54
68
        if testing.Short() {
55
69
                return