diff --git a/lib/common/keys_and_cert/keys_and_cert.go b/lib/common/keys_and_cert/keys_and_cert.go index c447c26..01f1321 100644 --- a/lib/common/keys_and_cert/keys_and_cert.go +++ b/lib/common/keys_and_cert/keys_and_cert.go @@ -85,16 +85,16 @@ type KeysAndCert struct { // Bytes returns the entire keyCertificate in []byte form, trims payload to specified length. func (keys_and_cert KeysAndCert) Bytes() []byte { - bytes := keys_and_cert.keyCertificate.Bytes() - bytes = append(bytes, keys_and_cert.publicKey.Bytes()...) + bytes := keys_and_cert.publicKey.Bytes() bytes = append(bytes, keys_and_cert.Padding...) bytes = append(bytes, keys_and_cert.signingPublicKey.Bytes()...) + bytes = append(bytes, keys_and_cert.keyCertificate.Bytes()...) log.WithFields(logrus.Fields{ - "bytes_length": len(bytes), - "pk_bytes_length": len(keys_and_cert.publicKey.Bytes()), + "bytes_length": len(bytes), + "pk_bytes_length": len(keys_and_cert.publicKey.Bytes()), "padding_bytes_length": len(keys_and_cert.Padding), - "spk_bytes_length": len(keys_and_cert.signingPublicKey.Bytes()), - "cert_bytes_length": len(keys_and_cert.keyCertificate.Bytes()), + "spk_bytes_length": len(keys_and_cert.signingPublicKey.Bytes()), + "cert_bytes_length": len(keys_and_cert.keyCertificate.Bytes()), }).Debug("Retrieved bytes from KeysAndCert") return bytes }