Skip to content

Commit

Permalink
Keep blockModeCloser alive during PKCS#11 calls
Browse files Browse the repository at this point in the history
re #6
  • Loading branch information
Richard Kettlewell authored and Richard Kettlewell committed Oct 2, 2018
1 parent 3aa65ab commit 15b0155
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions blockmode.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ func (bmc *blockModeCloser) CryptBlocks(dst, src []byte) {
panic("nontrivial result from *Final operation")
}
copy(dst[:len(result)], result)
runtime.KeepAlive(bmc)
}

func (bmc *blockModeCloser) Close() {
Expand Down

0 comments on commit 15b0155

Please sign in to comment.