Skip to content

Commit

Permalink
OpenSslSession#initPeerCerts creates too long almost empty arrays.
Browse files Browse the repository at this point in the history
Motivation:

netty#5945 (comment)

Modifications:

Added volatile for correct initialization of actual certificates: netty#5945 (comment)

Result:

Concurrency issue fixed
  • Loading branch information
ichaki5748 committed Oct 31, 2016
1 parent b2379e6 commit 7964d89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

final class OpenSslJavaxX509Certificate extends X509Certificate {
private final byte[] bytes;
private X509Certificate wrapped;
private volatile X509Certificate wrapped;

public OpenSslJavaxX509Certificate(byte[] bytes) {
this.bytes = bytes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
final class OpenSslX509Certificate extends X509Certificate {

private final byte[] bytes;
private X509Certificate wrapped;
private volatile X509Certificate wrapped;

public OpenSslX509Certificate(byte[] bytes) {
this.bytes = bytes;
Expand Down

0 comments on commit 7964d89

Please sign in to comment.