Skip to content

Commit

Permalink
FABJ-347 NPE for auto clientcerts
Browse files Browse the repository at this point in the history
Change-Id: I94dce40d574137725539f8ee4f16dde3d0fdaff6
Signed-off-by: rickr <cr22rc@gmail.com>
  • Loading branch information
cr22rc committed Aug 14, 2018
1 parent 3c23a7e commit 4e20ae3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/main/java/org/hyperledger/fabric/sdk/Peer.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,10 @@ long getReconnectCount() {
return reconnectCount;
}

void setTLSCertificateKeyPair(TLSCertificateKeyPair tlsCertificateKeyPair) {
synchronized void setTLSCertificateKeyPair(TLSCertificateKeyPair tlsCertificateKeyPair) {
if (properties == null) {
properties = new Properties();
}
properties.put("clientKeyBytes", tlsCertificateKeyPair.getKeyPemBytes());
properties.put("clientCertBytes", tlsCertificateKeyPair.getCertPEMBytes());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ class PeerEventServiceClient {
private final PeerOptions peerOptions;
private final boolean filterBlock;
private byte[] clientTLSCertificateDigest;
Properties properties = new Properties();
StreamObserver<Envelope> nso = null;
StreamObserver<DeliverResponse> so = null;
private Channel.ChannelEventQue channelEventQue;
Expand Down Expand Up @@ -91,7 +90,6 @@ class PeerEventServiceClient {
peerEventRegistrationWaitTimeMilliSecs = PEER_EVENT_REGISTRATION_WAIT_TIME;

} else {
this.properties = properties;

String peerEventRegistrationWaitTime = properties.getProperty("peerEventRegistrationWaitTime", Long.toString(PEER_EVENT_REGISTRATION_WAIT_TIME));

Expand Down Expand Up @@ -360,8 +358,6 @@ void peerVent(TransactionContext transactionContext) throws TransactionException
start.setNewest(Ab.SeekNewest.getDefaultInstance());
}

// properties.

envelope = createSeekInfoEnvelope(transactionContext,
start.build(),
Ab.SeekPosition.newBuilder()
Expand Down

0 comments on commit 4e20ae3

Please sign in to comment.