/** * Sets the remote public key. * * @param remotePublicKey the new remote public key * @throws GeneralSecurityException the general security exception */ public void setRemotePublicKey(PublicKey remotePublicKey) throws GeneralSecurityException { this.remotePublicKey = remotePublicKey; if (LOG.isTraceEnabled()) { LOG.trace("RemotePublicKey {}", this.remotePublicKey != null ? bytesToHex(this.remotePublicKey.getEncoded()) : "empty"); } }
/** * Instantiates a new message encoder decoder. * * @param privateKey the private key * @param publicKey the public key * @param remotePublicKey the remote public key */ public MessageEncoderDecoder( PrivateKey privateKey, PublicKey publicKey, PublicKey remotePublicKey) { super(); this.privateKey = privateKey; this.publicKey = publicKey; this.remotePublicKey = remotePublicKey; if (LOG.isTraceEnabled()) { LOG.trace("Creating MessageEncoderDecoder with\nPublicKey {};\nRemotePublicKey {}", this.publicKey != null ? bytesToHex(this.publicKey.getEncoded()) : "empty", this.remotePublicKey != null ? bytesToHex(this.remotePublicKey.getEncoded()) : "empty"); } }
/** * Sets the remote public key. * * @param remotePublicKey the new remote public key * @throws GeneralSecurityException the general security exception */ public void setRemotePublicKey(byte[] remotePublicKey) throws GeneralSecurityException { this.remotePublicKey = KeyUtil.getPublic(remotePublicKey); if (LOG.isTraceEnabled()) { LOG.trace("RemotePublicKey {}", this.remotePublicKey != null ? bytesToHex(this.remotePublicKey.getEncoded()) : "empty"); } }
if (sign) { LOG.trace("Signature size: {}", signature.length); LOG.trace(MessageEncoderDecoder.bytesToHex(signature)); LOG.trace(MessageEncoderDecoder.bytesToHex(requestKeyEncoded)); LOG.trace("RequestBodyEncoded size: {}", requestBodyEncoded.length); LOG.trace(MessageEncoderDecoder.bytesToHex(requestBodyEncoded));
private void logHashMismatch(GetDeltaRequest request, EndpointProfileDto profile, String endpointId) { if (profile.getConfigurationHash() != null && LOG.isWarnEnabled()) { String serverHash = ""; String clientHash = ""; if (profile.getConfigurationHash() != null) { serverHash = MessageEncoderDecoder.bytesToHex(profile.getConfigurationHash()); } if (request.getConfigurationHash() != null) { clientHash = MessageEncoderDecoder.bytesToHex(request.getConfigurationHash().getData()); } LOG.warn("[{}] Configuration hash mismatch! server {}, client {}", endpointId, serverHash, clientHash); } }
+ data.getHttpDataType().name() + " Signature set. size: " + requestSignature.length); LOG.trace(MessageEncoderDecoder.bytesToHex(requestSignature)); + data.getHttpDataType().name() + " requestKey set. size: " + requestKey.length); LOG.trace(MessageEncoderDecoder.bytesToHex(requestKey)); + data.getHttpDataType().name() + " requestData set. size: " + requestData.length); LOG.trace(MessageEncoderDecoder.bytesToHex(requestData));
if (LOG.isTraceEnabled()) { LOG.trace("[{}] persisted profile hash is {}", context.getEndpointKey(), MessageEncoderDecoder.bytesToHex(profile.getProfileHash())); LOG.trace("[{}] client profile hash is {}", context.getEndpointKey(), MessageEncoderDecoder.bytesToHex(toByteArray(metaData.getProfileHash())));
MessageEncoderDecoder.bytesToHex(deltaCache.getHash().getData())); return deltaCache; } catch (GetDeltaException | IOException ex) {