diff options
author | tb <> | 2018-08-28 17:45:50 +0000 |
---|---|---|
committer | tb <> | 2018-08-28 17:45:50 +0000 |
commit | e1f2fb765cc89ee82e3edde4253c3d6c450a4f61 (patch) | |
tree | f43d1b383b692304b29b47706d825bafe24fbc9a /src | |
parent | 560257196f5404f7e5eef927cee959ed3dc4023b (diff) | |
download | openbsd-e1f2fb765cc89ee82e3edde4253c3d6c450a4f61.tar.gz openbsd-e1f2fb765cc89ee82e3edde4253c3d6c450a4f61.tar.bz2 openbsd-e1f2fb765cc89ee82e3edde4253c3d6c450a4f61.zip |
zap trailing whitespace
Diffstat (limited to 'src')
-rw-r--r-- | src/regress/lib/libcrypto/wycheproof/wycheproof.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/regress/lib/libcrypto/wycheproof/wycheproof.go b/src/regress/lib/libcrypto/wycheproof/wycheproof.go index 546cc9ab24..0cb0ddf65f 100644 --- a/src/regress/lib/libcrypto/wycheproof/wycheproof.go +++ b/src/regress/lib/libcrypto/wycheproof/wycheproof.go | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: wycheproof.go,v 1.28 2018/08/27 21:27:39 tb Exp $ */ | 1 | /* $OpenBSD: wycheproof.go,v 1.29 2018/08/28 17:45:50 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2018 Joel Sing <jsing@openbsd.org> |
4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> | 4 | * Copyright (c) 2018 Theo Buehler <tb@openbsd.org> |
@@ -119,10 +119,10 @@ type wycheproofTestChaCha20Poly1305 struct { | |||
119 | type wycheproofDSAKey struct { | 119 | type wycheproofDSAKey struct { |
120 | G string `json:"g"` | 120 | G string `json:"g"` |
121 | KeySize int `json:"keySize"` | 121 | KeySize int `json:"keySize"` |
122 | P string `json:"p"` | 122 | P string `json:"p"` |
123 | Q string `json:"q"` | 123 | Q string `json:"q"` |
124 | Type string `json:"type"` | 124 | Type string `json:"type"` |
125 | Y string `json:"y"` | 125 | Y string `json:"y"` |
126 | } | 126 | } |
127 | 127 | ||
128 | type wycheproofTestDSA struct { | 128 | type wycheproofTestDSA struct { |
@@ -339,7 +339,7 @@ func runAesCbcPkcs5Test(ctx *C.EVP_CIPHER_CTX, wt *wycheproofTestAesCbcPkcs5) bo | |||
339 | } | 339 | } |
340 | 340 | ||
341 | keyLen, ivLen, ctLen, msgLen := len(key), len(iv), len(ct), len(msg) | 341 | keyLen, ivLen, ctLen, msgLen := len(key), len(iv), len(ct), len(msg) |
342 | 342 | ||
343 | if (keyLen == 0) { | 343 | if (keyLen == 0) { |
344 | key = append(key, 0) | 344 | key = append(key, 0) |
345 | } | 345 | } |
@@ -404,7 +404,7 @@ func checkAesCcm(ctx *C.EVP_CIPHER_CTX, doEncrypt int, key []byte, keyLen int, i | |||
404 | action = "decrypting" | 404 | action = "decrypting" |
405 | setTag = unsafe.Pointer(&tag[0]) | 405 | setTag = unsafe.Pointer(&tag[0]) |
406 | } | 406 | } |
407 | 407 | ||
408 | ret := C.EVP_CipherInit_ex(ctx, nil, nil, nil, nil, C.int(doEncrypt)) | 408 | ret := C.EVP_CipherInit_ex(ctx, nil, nil, nil, nil, C.int(doEncrypt)) |
409 | if ret != 1 { | 409 | if ret != 1 { |
410 | log.Fatalf("[%v] cipher init failed", action) | 410 | log.Fatalf("[%v] cipher init failed", action) |
@@ -495,7 +495,7 @@ func runAesCcmTest(ctx *C.EVP_CIPHER_CTX, wt *wycheproofTestAesCcm) bool { | |||
495 | if err != nil { | 495 | if err != nil { |
496 | log.Fatalf("Failed to decode msg %q: %v", wt.Msg, err) | 496 | log.Fatalf("Failed to decode msg %q: %v", wt.Msg, err) |
497 | } | 497 | } |
498 | 498 | ||
499 | ct, err := hex.DecodeString(wt.CT) | 499 | ct, err := hex.DecodeString(wt.CT) |
500 | if err != nil { | 500 | if err != nil { |
501 | log.Fatalf("Failed to decode CT %q: %v", wt.CT, err) | 501 | log.Fatalf("Failed to decode CT %q: %v", wt.CT, err) |
@@ -586,7 +586,7 @@ func checkChaCha20Poly1305Open(ctx *C.EVP_AEAD_CTX, iv []byte, ivLen int, aad [] | |||
586 | fmt.Printf("FAIL: Test case %d (%q) - open length mismatch: got %d, want %d\n", wt.TCID, wt.Comment, openedMsgLen, msgLen) | 586 | fmt.Printf("FAIL: Test case %d (%q) - open length mismatch: got %d, want %d\n", wt.TCID, wt.Comment, openedMsgLen, msgLen) |
587 | return false | 587 | return false |
588 | } | 588 | } |
589 | 589 | ||
590 | openedMsg := opened[0:openedMsgLen] | 590 | openedMsg := opened[0:openedMsgLen] |
591 | if (msgLen == 0) { | 591 | if (msgLen == 0) { |
592 | msg = nil | 592 | msg = nil |