├── .editorconfig
├── .github
├── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── PULL_REQUEST_TEMPLATE.md
└── workflows
│ ├── check.yml
│ ├── publish.yml
│ ├── snyk-pr.yml
│ ├── snyk-push.yml
│ └── snyk-release.yml
├── .gitignore
├── .idea
├── codeStyles
│ ├── Project.xml
│ └── codeStyleConfig.xml
└── inspectionProfiles
│ └── Project_Default.xml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── CompositeJenkinsfile
├── HEADER
├── LICENSE
├── README.md
├── README.txt
├── build.gradle.kts
├── docs
├── .bundle
│ └── config
├── .gitignore
├── .ruby-version
├── 404.md
├── Gemfile
├── README.md
├── _config.yml
├── _docs
│ ├── configuration.md
│ ├── hivemq.md
│ ├── hivemq
│ │ ├── behavior-policy.md
│ │ ├── behavior-state.md
│ │ ├── data-policy.md
│ │ ├── export.md
│ │ ├── schema.md
│ │ └── script.md
│ ├── installation.md
│ ├── logging.md
│ ├── publish.md
│ ├── publish
│ │ ├── connect_options.md
│ │ ├── debug_options.md
│ │ ├── further_examples.md
│ │ ├── help_options.md
│ │ ├── logging_options.md
│ │ ├── publish_options.md
│ │ └── security_options.md
│ ├── quick-start.md
│ ├── shell.md
│ ├── shell
│ │ ├── clear.md
│ │ ├── connect.md
│ │ ├── disconnect.md
│ │ ├── exit.md
│ │ ├── list.md
│ │ ├── publish.md
│ │ ├── subscribe.md
│ │ ├── switch.md
│ │ └── unsubscribe.md
│ ├── subscribe.md
│ ├── subscribe
│ │ ├── connect_options.md
│ │ ├── debug_options.md
│ │ ├── further_examples.md
│ │ ├── help_options.md
│ │ ├── logging_options.md
│ │ ├── security_options.md
│ │ └── subscribe_options.md
│ ├── swarm.md
│ ├── swarm
│ │ ├── run.md
│ │ └── status.md
│ ├── test.md
│ ├── test
│ │ ├── connect_options.md
│ │ ├── further_examples.md
│ │ ├── help_options.md
│ │ ├── logging_options.md
│ │ ├── security_options.md
│ │ └── test_options.md
│ ├── tls.md
│ └── tls
│ │ ├── cipher_suites.md
│ │ ├── configuration.md
│ │ ├── formats_and_encryption.md
│ │ └── versions.md
├── _includes
│ ├── admonition.html
│ ├── head_custom.html
│ ├── js
│ │ └── custom.js
│ ├── news.md
│ ├── options
│ │ ├── api-connection-options.md
│ │ ├── authentication-options.md
│ │ ├── connect-options.md
│ │ ├── connect-restrictions-options.md
│ │ ├── debug-options.md
│ │ ├── help-options.md
│ │ ├── logging-options.md
│ │ ├── publish-options.md
│ │ ├── subscribe-options.md
│ │ ├── tls-options.md
│ │ └── will-options.md
│ └── tabs.html
├── _layouts
│ └── post.html
├── _sass
│ ├── color_schemes
│ │ └── dark.scss
│ └── custom
│ │ └── custom.scss
├── assets
│ └── images
│ │ ├── 02-mqtt-cli-neg.png
│ │ └── 02-mqtt-cli-neg.svg
├── favicon-144.png
├── favicon-152.png
├── favicon-196.png
├── favicon.ico
├── index.md
└── news.md
├── gradle.properties
├── gradle
├── libs.versions.toml
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── icons
├── 05-mqtt-cli-icon.ico
└── 05-mqtt-cli-icon.png
├── img
├── clone.png
├── commit.png
├── create-branch.png
├── create-pr.png
├── fork.png
├── manage-remote.png
├── merge.png
├── mqtt-logo.svg
├── publish.gif
├── pubsub.gif
├── push.png
├── rebase.png
├── run-config.png
├── shell-mode.gif
├── shell.gif
├── subscribe.gif
├── test.gif
└── triangle-workflow.png
├── mqtt-cli-plugins
├── build.gradle.kts
├── settings.gradle.kts
└── src
│ └── main
│ └── kotlin
│ └── com
│ └── hivemq
│ └── cli
│ └── native_image
│ ├── CliNativeImagePlugin.kt
│ ├── extensions
│ ├── CliNativeExtension.kt
│ └── CliNativeExtensionImpl.kt
│ └── tasks
│ └── DownloadGraalJVMTask.kt
├── packages
├── homebrew
│ ├── mqtt
│ └── mqtt-cli.rb
├── linux
│ └── mqtt
└── windows
│ ├── README.txt
│ └── mqtt-cli-shell.cmd
├── renovate.json5
├── settings.gradle.kts
├── specs
├── hivemq-openapi.yaml
└── hivemq-swarm-openapi.yaml
└── src
├── distribution
└── third-party-licenses
│ ├── licenses
│ └── licenses.html
├── integrationTest
├── java
│ └── com
│ │ └── hivemq
│ │ └── cli
│ │ ├── commands
│ │ ├── cli
│ │ │ ├── TestBrokerCommandDefaultIT.java
│ │ │ ├── TestBrokerCommandQos0IT.java
│ │ │ ├── TestBrokerCommandQos1IT.java
│ │ │ └── TestBrokerCommandRestrictedIT.java
│ │ ├── hivemq
│ │ │ └── export
│ │ │ │ └── clients
│ │ │ │ └── ExportClientsCommandIT.java
│ │ └── swarm
│ │ │ ├── commander
│ │ │ └── SwarmStatusCommandIT.java
│ │ │ └── run
│ │ │ ├── SwarmRunStartCommandIT.java
│ │ │ └── SwarmRunStopCommandIT.java
│ │ ├── mqtt
│ │ └── test
│ │ │ ├── Mqtt3FeatureTesterDefaultIT.java
│ │ │ ├── Mqtt3FeatureTesterQos0IT.java
│ │ │ ├── Mqtt3FeatureTesterQos1IT.java
│ │ │ ├── Mqtt3FeatureTesterRestrictedIT.java
│ │ │ ├── Mqtt5FeatureTesterDefaultIT.java
│ │ │ ├── Mqtt5FeatureTesterQos0IT.java
│ │ │ ├── Mqtt5FeatureTesterQos1IT.java
│ │ │ └── Mqtt5FeatureTesterRestrictedIT.java
│ │ └── utils
│ │ └── TestLoggerUtils.java
└── resources
│ ├── SwarmRunStartCommandIT
│ └── my-scenario.xml
│ ├── SwarmRunStopCommandIT
│ └── blockScenario.xml
│ ├── hivemq.configs
│ └── rest-api-config.xml
│ └── mqtt
│ └── test
│ ├── qos0-config.xml
│ ├── qos1-config.xml
│ └── restricted-config.xml
├── main
├── java
│ └── com
│ │ └── hivemq
│ │ └── cli
│ │ ├── DefaultCLIProperties.java
│ │ ├── MqttCLIMain.java
│ │ ├── commandline
│ │ ├── CommandErrorMessageHandler.java
│ │ ├── CommandLineConfig.java
│ │ ├── CommonErrorMessageHandler.java
│ │ └── ShellErrorMessageHandler.java
│ │ ├── commands
│ │ ├── MqttCLICommand.java
│ │ ├── cli
│ │ │ ├── PublishCommand.java
│ │ │ ├── SubscribeCommand.java
│ │ │ └── TestBrokerCommand.java
│ │ ├── hivemq
│ │ │ ├── HiveMQCLICommand.java
│ │ │ ├── behaviorpolicy
│ │ │ │ ├── BehaviorPolicyCommand.java
│ │ │ │ ├── BehaviorPolicyCreateCommand.java
│ │ │ │ ├── BehaviorPolicyDeleteCommand.java
│ │ │ │ ├── BehaviorPolicyGetCommand.java
│ │ │ │ ├── BehaviorPolicyListCommand.java
│ │ │ │ └── BehaviorPolicyUpdateCommand.java
│ │ │ ├── behaviorstate
│ │ │ │ ├── BehaviorStateCommand.java
│ │ │ │ └── BehaviorStateGetCommand.java
│ │ │ ├── datahub
│ │ │ │ ├── DataHubOptions.java
│ │ │ │ ├── OutputFormatter.java
│ │ │ │ ├── PolicyDefinitionOptions.java
│ │ │ │ ├── SchemaDefinitionOptions.java
│ │ │ │ └── ScriptDefinitionOptions.java
│ │ │ ├── datapolicy
│ │ │ │ ├── DataPolicyCommand.java
│ │ │ │ ├── DataPolicyCreateCommand.java
│ │ │ │ ├── DataPolicyDeleteCommand.java
│ │ │ │ ├── DataPolicyGetCommand.java
│ │ │ │ ├── DataPolicyListCommand.java
│ │ │ │ └── DataPolicyUpdateCommand.java
│ │ │ ├── export
│ │ │ │ ├── ExportCommand.java
│ │ │ │ └── clients
│ │ │ │ │ ├── ClientDetailsCsvWriterTask.java
│ │ │ │ │ ├── ClientDetailsRetrieverTask.java
│ │ │ │ │ ├── ClientIdsRetrieverTask.java
│ │ │ │ │ └── ExportClientsCommand.java
│ │ │ ├── schema
│ │ │ │ ├── SchemaCommand.java
│ │ │ │ ├── SchemaCreateCommand.java
│ │ │ │ ├── SchemaDeleteCommand.java
│ │ │ │ ├── SchemaGetCommand.java
│ │ │ │ └── SchemaListCommand.java
│ │ │ └── script
│ │ │ │ ├── ScriptCommand.java
│ │ │ │ ├── ScriptCreateCommand.java
│ │ │ │ ├── ScriptDeleteCommand.java
│ │ │ │ ├── ScriptGetCommand.java
│ │ │ │ └── ScriptListCommand.java
│ │ ├── options
│ │ │ ├── AuthenticationOptions.java
│ │ │ ├── ConnectOptions.java
│ │ │ ├── ConnectRestrictionOptions.java
│ │ │ ├── DebugOptions.java
│ │ │ ├── DisconnectOptions.java
│ │ │ ├── HelpOptions.java
│ │ │ ├── MessagePayloadOptions.java
│ │ │ ├── PublishOptions.java
│ │ │ ├── SubscribeOptions.java
│ │ │ ├── TlsOptions.java
│ │ │ ├── UnsubscribeOptions.java
│ │ │ └── WillOptions.java
│ │ ├── shell
│ │ │ ├── ClearScreenCommand.java
│ │ │ ├── ContextDisconnectCommand.java
│ │ │ ├── ContextExitCommand.java
│ │ │ ├── ContextPublishCommand.java
│ │ │ ├── ContextSubscribeCommand.java
│ │ │ ├── ContextSwitchCommand.java
│ │ │ ├── ContextUnsubscribeCommand.java
│ │ │ ├── ListClientsCommand.java
│ │ │ ├── ShellCommand.java
│ │ │ ├── ShellConnectCommand.java
│ │ │ ├── ShellContextCommand.java
│ │ │ ├── ShellDisconnectCommand.java
│ │ │ ├── ShellExitCommand.java
│ │ │ └── VersionCommand.java
│ │ └── swarm
│ │ │ ├── SwarmCLICommand.java
│ │ │ ├── commander
│ │ │ ├── CommanderStatus.java
│ │ │ ├── CommanderStatusWithRun.java
│ │ │ └── SwarmStatusCommand.java
│ │ │ ├── error
│ │ │ ├── Error.java
│ │ │ ├── ErrorResponse.java
│ │ │ └── SwarmApiErrorTransformer.java
│ │ │ └── run
│ │ │ ├── SwarmOptions.java
│ │ │ ├── SwarmRunCommand.java
│ │ │ ├── SwarmRunStartCommand.java
│ │ │ ├── SwarmRunStartCommandShutdownHook.java
│ │ │ └── SwarmRunStopCommand.java
│ │ ├── converters
│ │ ├── ByteBufferConverter.java
│ │ ├── EnvVarToByteBufferConverter.java
│ │ ├── FileToByteBufferConverter.java
│ │ ├── FunctionTypeConverter.java
│ │ ├── Mqtt5UserPropertyConverter.java
│ │ ├── MqttQosConverter.java
│ │ ├── MqttVersionConverter.java
│ │ ├── PasswordFileToByteBufferConverter.java
│ │ ├── PayloadFormatIndicatorConverter.java
│ │ ├── SchemaTypeConverter.java
│ │ ├── UnsignedIntConverter.java
│ │ └── UnsignedShortConverter.java
│ │ ├── graal
│ │ ├── BouncyCastleFeature.java
│ │ └── NativeMain.java
│ │ ├── hivemq
│ │ ├── behaviorpolicy
│ │ │ ├── BehaviorPolicyCreateTask.java
│ │ │ ├── BehaviorPolicyDeleteTask.java
│ │ │ ├── BehaviorPolicyGetTask.java
│ │ │ ├── BehaviorPolicyListTask.java
│ │ │ └── BehaviorPolicyUpdateTask.java
│ │ ├── behaviorstate
│ │ │ └── GetBehaviorStateTask.java
│ │ ├── datapolicy
│ │ │ ├── DataPolicyCreateTask.java
│ │ │ ├── DataPolicyDeleteTask.java
│ │ │ ├── DataPolicyGetTask.java
│ │ │ ├── DataPolicyListTask.java
│ │ │ └── DataPolicyUpdateTask.java
│ │ ├── schemas
│ │ │ ├── CreateSchemaTask.java
│ │ │ ├── DeleteSchemaTask.java
│ │ │ ├── GetSchemaTask.java
│ │ │ └── ListSchemasTask.java
│ │ └── scripts
│ │ │ ├── CreateScriptTask.java
│ │ │ ├── DeleteScriptTask.java
│ │ │ ├── GetScriptTask.java
│ │ │ └── ListScriptsTask.java
│ │ ├── ioc
│ │ ├── CliModule.java
│ │ ├── HiveMqModule.java
│ │ ├── MqttCLI.java
│ │ ├── ShellModule.java
│ │ └── SwarmModule.java
│ │ ├── mqtt
│ │ ├── AbstractMqttClientExecutor.java
│ │ ├── ClientData.java
│ │ ├── ClientKey.java
│ │ ├── ContextClientDisconnectListener.java
│ │ ├── Mqtt5DebugIncomingQos1Interceptor.java
│ │ ├── Mqtt5DebugIncomingQos2Interceptor.java
│ │ ├── Mqtt5DebugOutgoingQos1Interceptor.java
│ │ ├── Mqtt5DebugOutgoingQos2Interceptor.java
│ │ ├── MqttClientExecutor.java
│ │ ├── SubscribeMqtt3PublishCallback.java
│ │ ├── SubscribeMqtt5PublishCallback.java
│ │ ├── exception
│ │ │ └── SigpipeException.java
│ │ └── test
│ │ │ ├── Mqtt3FeatureTester.java
│ │ │ ├── Mqtt5FeatureTester.java
│ │ │ └── results
│ │ │ ├── AsciiCharsInClientIdTestResults.java
│ │ │ ├── ClientIdLengthTestResults.java
│ │ │ ├── PayloadTestResults.java
│ │ │ ├── QosTestResult.java
│ │ │ ├── SharedSubscriptionTestResult.java
│ │ │ ├── TestResult.java
│ │ │ ├── TopicLengthTestResults.java
│ │ │ └── WildcardSubscriptionsTestResult.java
│ │ ├── rest
│ │ ├── ClientsApiResponses.java
│ │ ├── HiveMQRestService.java
│ │ └── RateLimitInterceptor.java
│ │ └── utils
│ │ ├── FileUtil.java
│ │ ├── IntersectionUtil.java
│ │ ├── LoggerUtils.java
│ │ ├── MqttPublishUtils.java
│ │ ├── MqttUtils.java
│ │ ├── PasswordUtils.java
│ │ ├── TlsUtil.java
│ │ ├── TopicUtils.java
│ │ ├── Tuple.java
│ │ └── json
│ │ ├── BehaviorPolicySerializer.java
│ │ ├── DataHubSerialization.java
│ │ ├── DataPolicySerializer.java
│ │ ├── JsonFormatted.java
│ │ ├── JsonMqttPublish.java
│ │ ├── OffsetDateTimeSerializer.java
│ │ ├── SchemaSerializer.java
│ │ └── ScriptSerializer.java
└── resources
│ └── META-INF
│ └── native-image
│ ├── jni-config.json
│ ├── predefined-classes-config.json
│ ├── proxy-config.json
│ ├── reflect-config.json
│ ├── resource-config.json
│ └── serialization-config.json
├── systemTest
├── java
│ └── com
│ │ └── hivemq
│ │ └── cli
│ │ ├── commands
│ │ ├── cli
│ │ │ ├── CipherSuitesTlsST.java
│ │ │ ├── HierarchyTlsST.java
│ │ │ ├── publish
│ │ │ │ ├── PublishConnectMTlsST.java
│ │ │ │ ├── PublishConnectST.java
│ │ │ │ ├── PublishConnectTlsST.java
│ │ │ │ ├── PublishConnectWebsocketsST.java
│ │ │ │ ├── PublishLoggingST.java
│ │ │ │ └── PublishST.java
│ │ │ ├── subscribe
│ │ │ │ ├── SubscribeConnectMTlsST.java
│ │ │ │ ├── SubscribeConnectST.java
│ │ │ │ ├── SubscribeConnectTlsST.java
│ │ │ │ ├── SubscribeConnectWebsocketsST.java
│ │ │ │ ├── SubscribeDeprecationST.java
│ │ │ │ ├── SubscribeJsonST.java
│ │ │ │ ├── SubscribeLoggingST.java
│ │ │ │ ├── SubscribeST.java
│ │ │ │ └── SubscribeWithSessionST.java
│ │ │ └── test_broker
│ │ │ │ ├── TestBrokerConnectMTlsST.java
│ │ │ │ ├── TestBrokerConnectST.java
│ │ │ │ ├── TestBrokerConnectTlsST.java
│ │ │ │ └── TestBrokerST.java
│ │ ├── distribution
│ │ │ └── DockerImageST.java
│ │ └── shell
│ │ │ ├── ShellDisconnectST.java
│ │ │ ├── ShellExitST.java
│ │ │ ├── ShellListST.java
│ │ │ ├── ShellPublishLoggingST.java
│ │ │ ├── ShellPublishST.java
│ │ │ ├── ShellSubscribeLoggingST.java
│ │ │ ├── ShellSubscribeST.java
│ │ │ ├── ShellSwitchST.java
│ │ │ ├── ShellUnsubscribeST.java
│ │ │ └── connect
│ │ │ ├── ShellConnectEnvST.java
│ │ │ ├── ShellConnectMTlsST.java
│ │ │ ├── ShellConnectST.java
│ │ │ ├── ShellConnectTlsST.java
│ │ │ └── ShellConnectWebsocketsST.java
│ │ └── utils
│ │ ├── KillCliTestExecutionListener.java
│ │ ├── MqttVersionConverter.java
│ │ ├── broker
│ │ ├── CipherSuite.java
│ │ ├── HiveMQExtension.java
│ │ ├── TlsConfiguration.java
│ │ ├── TlsVersion.java
│ │ └── assertions
│ │ │ ├── ConnectAssertion.java
│ │ │ ├── DisconnectAssertion.java
│ │ │ ├── DisconnectInformation.java
│ │ │ ├── PublishAssertion.java
│ │ │ ├── SubscribeAssertion.java
│ │ │ ├── TestConnectAssertion.java
│ │ │ └── UnsubscribeAssertion.java
│ │ ├── cli
│ │ ├── MqttCli.java
│ │ ├── MqttCliAsyncExtension.java
│ │ ├── MqttCliShellExtension.java
│ │ ├── io
│ │ │ ├── LogWaiter.java
│ │ │ └── ProcessIO.java
│ │ └── results
│ │ │ ├── AwaitOutput.java
│ │ │ ├── ExecutionResult.java
│ │ │ └── ExecutionResultAsync.java
│ │ └── exceptions
│ │ └── TimeoutException.java
└── resources
│ ├── META-INF
│ └── services
│ │ └── org.junit.platform.launcher.TestExecutionListener
│ └── tls
│ ├── certificate-generator-tool.sh
│ ├── certificateAuthority
│ ├── ca-keystore.jks
│ ├── ca-keystore.p12
│ ├── ca.cer
│ ├── ca.pem
│ └── capath
│ │ ├── der
│ │ └── ca.cer
│ │ └── pem
│ │ └── ca.pem
│ ├── client
│ ├── client-cert.cer
│ ├── client-cert.csr
│ ├── client-cert.pem
│ ├── client-key.pkcs1.aes256.der
│ ├── client-key.pkcs1.aes256.pem
│ ├── client-key.pkcs1.camellia256.der
│ ├── client-key.pkcs1.camellia256.pem
│ ├── client-key.pkcs1.des.der
│ ├── client-key.pkcs1.des.pem
│ ├── client-key.pkcs1.des3.der
│ ├── client-key.pkcs1.des3.pem
│ ├── client-key.pkcs1.unencrypted.der
│ ├── client-key.pkcs1.unencrypted.pem
│ ├── client-key.pkcs8.aes256.der
│ ├── client-key.pkcs8.aes256.pem
│ ├── client-key.pkcs8.camellia256.der
│ ├── client-key.pkcs8.camellia256.pem
│ ├── client-key.pkcs8.des.der
│ ├── client-key.pkcs8.des.pem
│ ├── client-key.pkcs8.des3.der
│ ├── client-key.pkcs8.des3.pem
│ ├── client-key.pkcs8.unencrypted.der
│ ├── client-key.pkcs8.unencrypted.pem
│ ├── client-keystore.jks
│ ├── client-keystore.p12
│ ├── client-keystore.similar_private_key_password.jks
│ ├── client-keystore.similar_private_key_password.p12
│ ├── client-truststore.jks
│ └── client-truststore.p12
│ ├── hierarchyTest
│ ├── certificateAuthority
│ │ ├── ca-keystore.jks
│ │ ├── ca-keystore.p12
│ │ ├── ca.cer
│ │ └── ca.pem
│ ├── client
│ │ ├── client-cert.cer
│ │ ├── client-cert.csr
│ │ ├── client-cert.pem
│ │ ├── client-key.pkcs1.aes256.der
│ │ ├── client-key.pkcs1.aes256.pem
│ │ ├── client-key.pkcs1.camellia256.der
│ │ ├── client-key.pkcs1.camellia256.pem
│ │ ├── client-key.pkcs1.des.der
│ │ ├── client-key.pkcs1.des.pem
│ │ ├── client-key.pkcs1.des3.der
│ │ ├── client-key.pkcs1.des3.pem
│ │ ├── client-key.pkcs1.unencrypted.der
│ │ ├── client-key.pkcs1.unencrypted.pem
│ │ ├── client-key.pkcs8.aes256.der
│ │ ├── client-key.pkcs8.aes256.pem
│ │ ├── client-key.pkcs8.camellia256.der
│ │ ├── client-key.pkcs8.camellia256.pem
│ │ ├── client-key.pkcs8.des.der
│ │ ├── client-key.pkcs8.des.pem
│ │ ├── client-key.pkcs8.des3.der
│ │ ├── client-key.pkcs8.des3.pem
│ │ ├── client-key.pkcs8.unencrypted.der
│ │ ├── client-key.pkcs8.unencrypted.pem
│ │ ├── client-keystore.jks
│ │ ├── client-keystore.p12
│ │ ├── client-keystore.similar_private_key_password.jks
│ │ ├── client-keystore.similar_private_key_password.p12
│ │ ├── client-truststore.jks
│ │ └── client-truststore.p12
│ └── server
│ │ ├── server-keystore.jks
│ │ ├── server-keystore.p12
│ │ ├── server-truststore.jks
│ │ ├── server-truststore.p12
│ │ ├── server.cer
│ │ ├── server.csr
│ │ └── server.pem
│ └── server
│ ├── server-keystore.jks
│ ├── server-keystore.p12
│ ├── server-truststore.jks
│ ├── server-truststore.p12
│ ├── server.cer
│ ├── server.csr
│ └── server.pem
└── test
├── java
└── com
│ └── hivemq
│ └── cli
│ ├── DefaultCLIPropertiesTest.java
│ ├── MqttCLIMainTest.java
│ ├── commands
│ ├── hivemq
│ │ ├── behaviorpolicy
│ │ │ ├── BehaviorPolicyCreateCommandTest.java
│ │ │ ├── BehaviorPolicyDeleteCommandTest.java
│ │ │ ├── BehaviorPolicyGetCommandTest.java
│ │ │ ├── BehaviorPolicyListCommandTest.java
│ │ │ └── BehaviorPolicyUpdateCommandTest.java
│ │ ├── behaviorstate
│ │ │ └── BehaviorStateGetCommandTest.java
│ │ ├── datapolicy
│ │ │ ├── DataPolicyCreateCommandTest.java
│ │ │ ├── DataPolicyDeleteCommandTest.java
│ │ │ ├── DataPolicyGetCommandTest.java
│ │ │ ├── DataPolicyListCommandTest.java
│ │ │ └── DataPolicyUpdateCommandTest.java
│ │ ├── export
│ │ │ └── clients
│ │ │ │ ├── ClientDetailsCsvWriterTaskTest.java
│ │ │ │ ├── ClientDetailsRetrieverTaskTest.java
│ │ │ │ └── ClientIdsRetrieverTaskTest.java
│ │ ├── schema
│ │ │ ├── SchemaCreateCommandTest.java
│ │ │ ├── SchemaDeleteCommandTest.java
│ │ │ ├── SchemaGetCommandTest.java
│ │ │ └── SchemaListCommandTest.java
│ │ └── script
│ │ │ ├── ScriptCreateCommandTest.java
│ │ │ ├── ScriptDeleteCommandTest.java
│ │ │ ├── ScriptGetCommandTest.java
│ │ │ └── ScriptListCommandTest.java
│ └── swarm
│ │ ├── commander
│ │ └── SwarmStatusCommandTest.java
│ │ ├── error
│ │ └── SwarmApiErrorTransformerTest.java
│ │ └── run
│ │ ├── SwarmRunStartCommandShutdownHookTest.java
│ │ ├── SwarmRunStartCommandTest.java
│ │ └── SwarmRunStopCommandTest.java
│ ├── converters
│ ├── Mqtt5UserPropertyConverterTest.java
│ ├── MqttQosConverterTest.java
│ ├── MqttVersionConverterTest.java
│ ├── PasswordFileToByteBufferConverterTest.java
│ ├── PayloadFormatIndicatorConverterTest.java
│ ├── UnsignedIntConverterTest.java
│ └── UnsignedShortConverterTest.java
│ ├── hivemq
│ ├── behaviorpolicy
│ │ ├── BehaviorPolicyCreateTaskTest.java
│ │ ├── BehaviorPolicyDeleteTaskTest.java
│ │ ├── BehaviorPolicyGetTaskTest.java
│ │ ├── BehaviorPolicyListTaskTest.java
│ │ └── BehaviorPolicyUpdateTaskTest.java
│ ├── behaviorstate
│ │ └── GetBehaviorStateTaskTest.java
│ ├── datapolicy
│ │ ├── DataPolicyCreateTaskTest.java
│ │ ├── DataPolicyDeleteTaskTest.java
│ │ ├── DataPolicyGetTaskTest.java
│ │ ├── DataPolicyListTaskTest.java
│ │ └── DataPolicyUpdateTaskTest.java
│ ├── schemas
│ │ ├── CreateSchemaTaskTest.java
│ │ ├── DeleteSchemaTaskTest.java
│ │ ├── GetSchemaTaskTest.java
│ │ └── ListSchemasTaskTest.java
│ └── scripts
│ │ ├── CreateScriptTaskTest.java
│ │ ├── DeleteScriptTaskTest.java
│ │ ├── GetScriptTaskTest.java
│ │ └── ListScriptsTaskTest.java
│ ├── mqtt
│ └── AbstractMqttClientExecutorTest.java
│ ├── rest
│ └── hivemq
│ │ ├── HiveMQCLICommandRestServiceTest.java
│ │ ├── TestClientDetails.java
│ │ └── TestResponseBodies.java
│ └── utils
│ ├── IntersectionUtilTest.java
│ ├── MqttUtilsTest.java
│ ├── TestLoggerUtils.java
│ ├── TlsUtilTest.java
│ └── json
│ ├── DataPolicySerializerTest.java
│ ├── JsonMqttPublishTest.java
│ └── SchemaSerializerTest.java
└── resources
├── PasswordFileToByteBufferConverterTest
├── password_with_multi_new_line.txt
├── password_with_new_line.txt
└── password_with_single_line.txt
├── PropertyFiles
├── empty.properties
└── override.properties
└── TlsUtil
├── decrypted_EC_key.pem
├── decrypted_RSA_key.pem
├── decrypted_malformed_RSA_key.pem
├── directory_with_certificates
├── test1.pem
├── test2.crt
└── test3.crt
├── directory_without_certificates
├── file
├── file.txt
└── file.zert
├── encrypted_RSA_key.pem
├── invalidCertificate.pem
├── invalidFileExtensionCertificate.der
├── noFileExtensionCertificate
└── validCertificate.pem
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Expected behavior
11 |
12 | ## Actual behavior
13 |
14 | ## To Reproduce
15 | ### Steps
16 |
17 | ### Reproducer code
18 |
19 | ## Details
20 | - Affected MQTT CLI version(s):
21 | - Used JVM version:
22 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Problem or use case
11 |
12 | ## Preferred solution or suggestions
13 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | **Motivation**
2 |
3 |
4 | **Changes**
5 |
--------------------------------------------------------------------------------
/.github/workflows/check.yml:
--------------------------------------------------------------------------------
1 | name: CI Check
2 |
3 | on: [ push ]
4 |
5 | concurrency:
6 | group: check-${{ github.ref }}
7 | cancel-in-progress: true
8 |
9 | jobs:
10 | check:
11 | runs-on: ubuntu-latest
12 | steps:
13 | - name: Checkout
14 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
15 | - name: Setup Java
16 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
17 | with:
18 | distribution: temurin
19 | java-version: 11
20 | cache: gradle
21 | - name: Login to Docker Hub
22 | uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3
23 | with:
24 | username: ${{ secrets.DOCKER_USERNAME }}
25 | password: ${{ secrets.DOCKER_TOKEN }}
26 | - name: Setup GraalVM
27 | run: ./gradlew installNativeImageTooling
28 | - name: Check
29 | run: ./gradlew check --stacktrace
30 | - name: Upload Test Results
31 | uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
32 | if: failure()
33 | with:
34 | name: test-results
35 | path: build/test-results/
36 | - name: Publish Test Report
37 | uses: mikepenz/action-junit-report@65fe03598d8d251738592a497a9e8547a5c48eaa # v5
38 | if: always() # always run even if the previous step fails
39 | with:
40 | report_paths: '**/build/test-results/*/TEST-*.xml'
41 |
42 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish
2 |
3 | on:
4 | release:
5 | types: [ published ]
6 |
7 | concurrency:
8 | group: publish-${{ github.ref }}
9 | cancel-in-progress: true
10 |
11 | jobs:
12 | publish:
13 | runs-on: ubuntu-latest
14 | steps:
15 | - name: Checkout
16 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17 | - name: Setup Java
18 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
19 | with:
20 | distribution: 'temurin'
21 | java-version: '11'
22 | - name: Publish
23 | env:
24 | githubToken: ${{ secrets.GITHUB_TOKEN }}
25 | GRGIT_USER: ${{ secrets.JENKINS_GITHUB_TOKEN }}
26 | ORG_GRADLE_PROJECT_dockerHubUsername: ${{ secrets.DOCKER_USERNAME }}
27 | ORG_GRADLE_PROJECT_dockerHubPassword: ${{ secrets.DOCKER_TOKEN }}
28 | run: ./gradlew githubRelease gitPublishPush pushOciImage --registry dockerHub --tag . --tag latest # . is a placeholder for the default tag
29 |
--------------------------------------------------------------------------------
/.github/workflows/snyk-pr.yml:
--------------------------------------------------------------------------------
1 | name: Run Snyk scan on PRs
2 |
3 | on:
4 | pull_request:
5 | branches:
6 | - master**
7 |
8 | jobs:
9 | monitor-baseline-project:
10 | uses: ./.github/workflows/snyk-push.yml
11 | with:
12 | github_ref: ${{ github.base_ref }}
13 | secrets: inherit
14 |
15 | scan-for-new-issues:
16 | runs-on: ubuntu-latest
17 | needs: monitor-baseline-project
18 |
19 | steps:
20 | - name: Setup Java
21 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
22 | with:
23 | distribution: 'temurin'
24 | java-version: |
25 | 8
26 | 11
27 |
28 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
29 | with:
30 | path: mqtt-cli
31 |
32 | - name: Check for new issues
33 | uses: hivemq/hivemq-snyk-composite-action@dbe0008ff5a165ad9caf42e7cb2c52d378bd4667 # v2.3.0
34 | with:
35 | snyk-args: --org=hivemq-mqtt-cli --configuration-matching=^runtimeClasspath$ mqtt-cli -d
36 | snyk-token: ${{ secrets.SNYK_TOKEN }}
37 |
--------------------------------------------------------------------------------
/.github/workflows/snyk-push.yml:
--------------------------------------------------------------------------------
1 | name: Run Snyk monitor on push
2 |
3 | on:
4 | push:
5 | branches:
6 | - master**
7 | workflow_call:
8 | inputs:
9 | github_ref:
10 | required: true
11 | type: string
12 |
13 | jobs:
14 | run-snyk-monitor:
15 | runs-on: ubuntu-latest
16 |
17 | steps:
18 | - name: Select GitHub ref
19 | id: select_github_ref
20 | shell: bash
21 | run: |
22 | workflow_call_github_ref=${{ inputs.github_ref }}
23 | echo "selected_github_ref=${workflow_call_github_ref:-${{ github.ref_name }}}" >> "$GITHUB_OUTPUT"
24 |
25 | - name: Setup Java
26 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
27 | with:
28 | distribution: 'temurin'
29 | java-version: |
30 | 8
31 | 11
32 |
33 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
34 | with:
35 | path: mqtt-cli
36 | ref: ${{ steps.select_github_ref.outputs.selected_github_ref }}
37 |
38 | - name: Setup Snyk
39 | uses: snyk/actions/setup@master
40 |
41 | - name: Run Snyk monitor
42 | shell: bash
43 | run: >
44 | snyk monitor --configuration-matching=^runtimeClasspath$ --target-reference=${{ steps.select_github_ref.outputs.selected_github_ref }} --org=hivemq-mqtt-cli
45 | --project-name=mqtt-cli --remote-repo-url=mqtt-cli --project-lifecycle=development mqtt-cli -d
46 | --project-tags=kanbanize_board_name="\"Tooling++&++Extension,kanbanize_board_workflow_name=Development++Workflow,kanbanize_board_column_name=Selected,kanbanize_board_swimlane=Expedite,kanbanize_board_done_sections=4/5\""
47 | env:
48 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
49 |
--------------------------------------------------------------------------------
/.github/workflows/snyk-release.yml:
--------------------------------------------------------------------------------
1 | name: Run Snyk monitor on releases
2 |
3 | on:
4 | release:
5 | types: [ published ]
6 |
7 | jobs:
8 | run-snyk-monitor:
9 | runs-on: ubuntu-latest
10 | environment: snyk-monitor-releases
11 |
12 | steps:
13 | - name: Setup Java
14 | uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4
15 | with:
16 | distribution: 'temurin'
17 | java-version: |
18 | 8
19 | 11
20 |
21 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
22 | with:
23 | path: mqtt-cli
24 |
25 | - name: Setup Snyk
26 | uses: snyk/actions/setup@master
27 |
28 | - name: Run Snyk monitor
29 | shell: bash
30 | run: snyk monitor --configuration-matching=^runtimeClasspath$ --target-reference=${{ github.ref_name }} --org=hivemq-releases --project-name=mqtt-cli --remote-repo-url=mqtt-cli --project-lifecycle=production mqtt-cli -d
31 | env:
32 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
33 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Gradle
2 | .gradle
3 | build/
4 |
5 | # IntelliJ
6 | out/
7 | *.iml
8 | .idea/*
9 | !.idea/codeStyles
10 | !.idea/inspectionProfiles
11 | !.idea/runConfigurations
12 |
13 | .java-version
14 | .DS_Store
15 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/.idea/inspectionProfiles/Project_Default.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # HiveMQ Code of Conduct
2 |
3 | Please refer to our [HiveMQ Code of Conduct](https://github.com/hivemq/hivemq-community/blob/master/code-of-conduct.md).
4 |
--------------------------------------------------------------------------------
/CompositeJenkinsfile:
--------------------------------------------------------------------------------
1 | MASTER_BRANCH = 'master'
2 |
3 | pipeline {
4 | agent { label 'jenkins-worker' }
5 | options {
6 | skipDefaultCheckout() // no checkout needed
7 | buildDiscarder(logRotator(numToKeepStr: '10'))
8 | timestamps()
9 | }
10 | stages {
11 | stage('Trigger build') {
12 | steps {
13 | script {
14 | def multiBranchJobPath = '../../hivemq4-composite'
15 | def branchJobName = BRANCH_NAME.replace('/', '%2F')
16 | try {
17 | build job: "${multiBranchJobPath}/${branchJobName}", wait: false
18 | } catch (e) {
19 | try {
20 | withCredentials([gitUsernamePassword(credentialsId: 'hivemq-jenkins')]) {
21 | sh("git clone https://github.com/hivemq/hivemq.git --branch=${MASTER_BRANCH} --single-branch --depth 1 .")
22 | try {
23 | sh("git push origin HEAD:${BRANCH_NAME}")
24 | } catch (e2) { // if push failed, branch already exists
25 | }
26 | }
27 | } finally {
28 | cleanWs()
29 | build job: multiBranchJobPath, wait: false
30 | }
31 | }
32 | }
33 | }
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/HEADER:
--------------------------------------------------------------------------------
1 | Copyright 2019-present HiveMQ and the HiveMQ Community
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/docs/.bundle/config:
--------------------------------------------------------------------------------
1 | ---
2 | BUNDLE_PATH: "vendor/bundle"
3 |
--------------------------------------------------------------------------------
/docs/.gitignore:
--------------------------------------------------------------------------------
1 | Gemfile.lock
2 | vendor/
3 | _site/
4 | .sass-cache
5 | .jekyll-metadata
6 | .idea/
7 | .DS_Store
--------------------------------------------------------------------------------
/docs/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.6.9
--------------------------------------------------------------------------------
/docs/404.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Page not found
4 | permalink: 404.html
5 | nav_exclude: true
6 | search_exclude: true
7 | ---
8 |
9 | # Page not found
10 |
11 | The page you requested could not be found.
12 | Try using the navigation {% if site.search_enabled %}or search {% endif %}to find what you're looking for or go to this
13 | [site's home page](index.md).
--------------------------------------------------------------------------------
/docs/Gemfile:
--------------------------------------------------------------------------------
1 | source "https://rubygems.org"
2 |
3 | gem 'github-pages', group: :jekyll_plugins
--------------------------------------------------------------------------------
/docs/README.md:
--------------------------------------------------------------------------------
1 | # MQTT Command Line Interface Documentation
2 |
3 | The documentation uses [Jekyll](https://jekyllrb.com/) as a static site generator.
4 |
5 | ## Setup
6 |
7 | In order to get this handbook built or work on it, you'll need [rbenv](https://github.com/rbenv/rbenv), a version
8 | switcher for the ruby programming language and [bundler](https://bundler.io/), a package repository for ruby gems.
9 |
10 | ### rbenv
11 |
12 | - MacOS:
13 | 1. Install [Homebrew](_dev/environment/brew.md)
14 | 2. `brew install rbenv ruby-build`
15 | 3. `rbenv init`
16 | - Linux:
17 | 1. `sudo apt install rbenv`
18 | 2. `rbenv init`
19 | - Windows: Please follow [rbenv-win](https://github.com/nak1114/rbenv-win)
20 |
21 | In the project directory execute: `rbenv install`
22 |
23 | This uses the version that's hard linked in this directory's `.ruby-version` file. The ruby version is also bumped via
24 | the `.ruby-version` file.
25 |
26 | ### bundler
27 |
28 | In the project directory execute:
29 |
30 | 1. `gem install --user-install bundler`
31 | 2. `bundle install`
32 |
33 | ## Build
34 |
35 | 1. `bundler exec jekyll serve` (add `--incremental` for incremental and shorter builds)
36 | 2. Open your browser at http://localhost:4000/
37 |
--------------------------------------------------------------------------------
/docs/_config.yml:
--------------------------------------------------------------------------------
1 | title: MQTT CLI
2 | description: A feature-rich MQTT Command line interface
3 | logo: assets/images/02-mqtt-cli-neg.svg
4 | version: 4.4.0
5 |
6 | remote_theme: SgtSilvio/just-the-docs@3e0de1c7
7 | color_scheme: dark
8 |
9 | permalink: pretty
10 |
11 | collections:
12 | docs:
13 | output: true
14 |
15 | just_the_docs:
16 | collections:
17 | html_pages:
18 | docs:
19 | github:
20 | repo_link:
21 | enabled: true
22 | edit_link:
23 | enabled: true
24 |
25 | defaults:
26 | - scope:
27 | path: ""
28 | type: docs
29 | values:
30 | layout: default
31 |
32 | search_enabled: true
33 | search:
34 | heading_level: 2
35 | previews: 3
36 | preview_words_before: 5
37 | preview_words_after: 10
38 | tokenizer_separator: /[\s\-/]+/
39 | rel_url: false
40 | button: true
41 |
42 | aux_links:
43 | "News":
44 | - "https://hivemq.github.io/mqtt-cli/news"
45 |
46 | plugins:
47 | - jekyll-remote-theme
48 | - jekyll-titles-from-headings
49 | - jekyll-relative-links
50 | - jekyll-redirect-from
51 | - jekyll-github-metadata
52 |
53 | titles_from_headings:
54 | enabled: true
55 | strip_title: false
56 | collections: true
57 |
58 | relative_links:
59 | enabled: true
60 | collections: true
61 |
62 | sass:
63 | style: compressed
64 |
65 | compress_html:
66 | clippings: all
67 | comments: all
68 | endings: all
69 | startings: [ ]
70 | blanklines: false
71 | profile: false
--------------------------------------------------------------------------------
/docs/_docs/hivemq.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 7
3 | redirect_from: /docs/hivemq.html
4 | ---
5 |
6 | # HiveMQ Broker
7 |
8 | ***
9 |
10 | The HiveMQ command line argument offers various HiveMQ specific commands.
11 |
12 | ```
13 | mqtt hivemq
14 | ```
15 |
16 | ***
17 |
18 | ## Commands
19 |
20 | | Command | Explanation |
21 | |-----------------|--------------------------------------------------|
22 | | export | See [Export](hivemq/export.md) |
23 | | data-policy | See [Data Policy](hivemq/data-policy.md) |
24 | | behavior-policy | See [Behavior Policy](hivemq/behavior-policy.md) |
25 | | behavior-state | See [Behavior State](hivemq/behavior-state.md) |
26 | | schema | See [Schema](hivemq/schema.md) |
27 | | script | See [Script](hivemq/script.md) |
28 |
29 | ***
30 |
31 | ## Options
32 |
33 | ### Help Options
34 |
35 | {% include options/help-options.md defaultHelp=true %}
36 |
--------------------------------------------------------------------------------
/docs/_docs/logging.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 9
3 | redirect_from: /docs/logging.html
4 | ---
5 |
6 | # Logging
7 |
8 | ***
9 |
10 | * All non-shell commands offer an `-l` option by which logging to a logfile under `~/.mqtt-cli/logs` can be activated
11 | * The logfile and log level can be configured in the [MQTT-CLI configuration](configuration.md)
12 | * By specifying the `-l` option for the `shell` command the whole shell-session will be logged to a logfile shown at
13 | start
14 |
15 | ***
16 |
17 | ## Direct Logging for Publish and Subscribe
18 |
19 | If you require debug logging for direct access, the `-d` (debug) and `-v` (verbose) options are available for the basic
20 | publish and subscribe command
21 |
22 | ```
23 | $ mqtt pub -i c1 -t test -m "Hello World" -d -h broker.hivemq.com
24 |
25 | Client 'c1@broker.hivemq.com' sending CONNECT
26 | MqttConnect{keepAlive=60, cleanStart=true, sessionExpiryInterval=0}
27 | Client 'c1@broker.hivemq.com' received CONNACK
28 | MqttConnAck{reasonCode=SUCCESS, sessionPresent=false, restrictions=MqttConnAckRestrictions{receiveMaximum=10, maximumPacketSize=268435460, topicAliasMaximum=5, maximumQos=EXACTLY_ONCE, retainAvailable=true, wildcardSubscriptionAvailable=true, sharedSubscriptionAvailable=true, subscriptionIdentifiersAvailable=true}}
29 | Client 'c1@broker.hivemq.com' sending PUBLISH ('Hello World')
30 | MqttPublish{topic=test, payload=11byte, qos=AT_MOST_ONCE, retain=false}
31 | Client 'c1@broker.hivemq.com' finish PUBLISH
32 | MqttPublishResult{publish=MqttPublish{topic=test, payload=11byte, qos=AT_MOST_ONCE, retain=false}}
33 | ```
34 |
--------------------------------------------------------------------------------
/docs/_docs/publish/connect_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Connect Options
3 | permalink: /docs/publish/#connect-options
4 | nav_order: 3
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/publish/debug_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Debug Options
3 | permalink: /docs/publish/#debug-options
4 | nav_order: 6
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/publish/further_examples.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Further Examples
3 | permalink: /docs/publish/#further-examples
4 | nav_order: 8
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/publish/help_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Help Options
3 | permalink: /docs/publish/#help-options
4 | nav_order: 7
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/publish/logging_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Logging Options
3 | permalink: /docs/publish/#logging-options
4 | nav_order: 5
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/publish/publish_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Publish Options
3 | permalink: /docs/publish/#publish-options
4 | nav_order: 2
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/publish/security_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Security Options
3 | permalink: /docs/publish/#security-options
4 | nav_order: 4
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/shell/clear.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 8
3 | redirect_from: /docs/shell/clear.html
4 | ---
5 |
6 | # Clear
7 |
8 | ***
9 |
10 | Clears the terminal screen.
11 |
12 | ```
13 | mqtt> clear
14 | ```
15 |
16 | Alias: `mqtt> cls`
17 |
18 | ***
19 |
20 | ## Options
21 |
22 | ### Help Options
23 |
24 | {% include options/help-options.md defaultHelp=true %}
25 |
--------------------------------------------------------------------------------
/docs/_docs/shell/exit.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 9
3 | redirect_from: /docs/shell/exit.html
4 | ---
5 |
6 | # Exit
7 |
8 | ***
9 |
10 | Exits the currently active client context or the shell if used without a context.
11 |
12 | ```
13 | mqtt> exit
14 | ```
15 |
16 | ***
17 |
18 | ## Options
19 |
20 | ### Help Options
21 |
22 | {% include options/help-options.md defaultHelp=true %}
23 |
24 | ***
25 |
26 | ## Example
27 |
28 | Connect a client with identifier `client` and exit its context afterward
29 |
30 | ```
31 | mqtt> con -i client
32 | client@localhost> exit
33 | mqtt>
34 | ```
35 |
36 | **NOTE**: The client is still connected in the shell
37 |
38 | ***
39 |
40 | Exit the Shell
41 |
42 | ```
43 | mqtt> exit
44 | $
45 | ```
46 |
47 |
--------------------------------------------------------------------------------
/docs/_docs/shell/list.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 6
3 | redirect_from: /docs/shell/list.html
4 | ---
5 |
6 | # List
7 |
8 | ***
9 |
10 | Lists all the connected clients of this mqtt-cli shell session.
11 |
12 | ```
13 | mqtt> list
14 | ```
15 |
16 | Alias: `mqtt> ls`
17 |
18 | ***
19 |
20 | ## Options
21 |
22 | | Option | Long Version | Explanation | Default |
23 | |--------|-------------------|------------------------------------------------------------------------|---------|
24 | | `-l` | `--long` | Use a long listing format with detailed information about the clients. | `false` |
25 | | `-r` | `--reverse` | Reverse order while sorting. | `false` |
26 | | `-s` | `--subscriptions` | List subscribed topics of the clients. | `false` |
27 | | `-t` | `--time` | Sort clients by their creation time. | `false` |
28 | | `-U` | | Do not sort. | `false` |
29 |
30 | ### Help Options
31 |
32 | {% include options/help-options.md defaultHelp=true %}
33 |
34 | ***
35 |
36 | ## Examples
37 |
38 | Connect two clients and list them by default settings
39 |
40 | ```
41 | mqtt> con -i client1
42 | client1@localhost> exit
43 | mqtt> con -i client2
44 | client2@localhost> ls
45 | client1@localhost
46 | client2@localhost
47 | ```
48 |
49 | ***
50 |
51 | Connect a client and show detailed information about it
52 |
53 | ```
54 | mqtt> con -i client
55 | client@localhost> ls -l
56 | total 1
57 | CONNECTED 11:00:29 client1 localhost 1883 MQTT_5_0 NO_SSL
58 | ```
59 |
60 | ***
61 |
62 | List subscriptions of all connected clients
63 |
64 | ```
65 | client1@localhost> sub -t topic -t topic2 -t topic3
66 | client1@localhost> ls -s
67 | client1@localhost
68 | -subscribed topics: [topic2, topic3, topic]
69 | ```
70 |
--------------------------------------------------------------------------------
/docs/_docs/shell/publish.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 3
3 | redirect_from: /docs/shell/publish.html
4 | ---
5 |
6 | # Publish
7 |
8 | ***
9 |
10 | The publish with a context works almost the same as [Publish](../publish.md), but it will not create a new connection
11 | and publish with a new client.
12 | Instead, it uses the currently active context client.
13 |
14 | ```
15 | client@host> publish
16 | ```
17 |
18 | Alias: `client@host> pub`
19 |
20 | ***
21 |
22 | ## Options
23 |
24 | ### Publish Options
25 |
26 | {% include options/publish-options.md %}
27 |
28 | ### Help Options
29 |
30 | {% include options/help-options.md defaultHelp=true %}
31 |
32 | ***
33 |
34 | ## Example
35 |
36 | Publish with a client identified with `myClient` to the default settings:
37 |
38 | ```
39 | mqtt> con -i myClient
40 | myClient@localhost> pub -t test -m msg
41 | ```
42 |
--------------------------------------------------------------------------------
/docs/_docs/shell/subscribe.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 4
3 | redirect_from: /docs/shell/subscribe.html
4 | ---
5 |
6 | # Subscribe
7 |
8 | ***
9 |
10 | The subscribe with a context subscribes the currently active context client to the given topics.
11 | By default, it doesn't block the console like the [Subscribe](../subscribe.md) without a context does.
12 | To enable this behavior you can use the **-s** option.
13 |
14 | ```
15 | client@host> subscribe
16 | ```
17 |
18 | Alias: `client@host> sub`
19 |
20 | ***
21 |
22 | ## Options
23 |
24 | | Option | Long Version | Explanation | Default |
25 | |--------|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|
26 | | `-oc` | `--outputToConsole` | If this flag is set the output will be printed to the console. | `false` |
27 | | `-s` | `--stay` | The subscribe emulates the same behavior as the subscribe command in non-shell mode. **NOTE**: the subscriptions will be unsubscribed afterwards. To cancel the command press *Enter*. | `false` |
28 |
29 | ### Subscribe Options
30 |
31 | {% include options/subscribe-options.md %}
32 |
33 | ### Help Options
34 |
35 | {% include options/help-options.md defaultHelp=true %}
36 |
37 | ***
38 |
39 | ## Examples
40 |
41 | Subscribe to test topic on default settings (output will be written to Logfile. See [Logging](../logging.md)):
42 |
43 | ```
44 | mqtt> con -i myClient
45 | myClient@localhost> sub -t test
46 | ```
47 |
--------------------------------------------------------------------------------
/docs/_docs/shell/unsubscribe.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 5
3 | redirect_from: /docs/shell/unsubscribe.html
4 | ---
5 |
6 | # Unsubscribe
7 |
8 | ***
9 |
10 | Unsubscribes the currently active context client from a list of topics
11 | and is therefore only available in Shell mode.
12 |
13 | ```
14 | client@host> unsubscribe
15 | ```
16 |
17 | Alias: `client@host> unsub`
18 |
19 | ***
20 |
21 | ## Options
22 |
23 | | Option | Long Version | Explanation |
24 | |--------|------------------|------------------------------------------------------|
25 | | `-t` | `--topic` | A topic from which the client will unsubscribe from. |
26 | | `-up` | `--userProperty` | A user property of the unsubscribe message. |
27 |
28 | ### Help Options
29 |
30 | {% include options/help-options.md defaultHelp=true %}
31 |
32 | ***
33 |
34 | ## Example
35 |
36 | Connect a client which is identified by myClient and subscribe it to two topics afterward.
37 | Then unsubscribe from one of the two topics:
38 |
39 | ```
40 | mqtt> con -i myClient
41 | myClient@localhost> sub -t topic1 -t topic2
42 | myClient@localhost> unsub -t topic1
43 | mqtt>
44 | ```
45 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/connect_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Connect Options
3 | permalink: /docs/subscribe/#connect-options
4 | nav_order: 3
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/debug_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Debug Options
3 | permalink: /docs/subscribe/#debug-options
4 | nav_order: 6
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/further_examples.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Further Examples
3 | permalink: /docs/subscribe/#further-examples
4 | nav_order: 8
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/help_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Help Options
3 | permalink: /docs/subscribe/#help-options
4 | nav_order: 7
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/logging_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Logging Options
3 | permalink: /docs/subscribe/#logging-options
4 | nav_order: 5
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/security_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Security Options
3 | permalink: /docs/subscribe/#security-options
4 | nav_order: 4
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/subscribe/subscribe_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Subscribe Options
3 | permalink: /docs/subscribe/#subscribe-options
4 | nav_order: 2
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/swarm.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 8
3 | redirect_from: /docs/swarm.html
4 | ---
5 |
6 | # HiveMQ Swarm
7 |
8 | ***
9 |
10 | The HiveMQ Swarm command offers various ways to interact with HiveMQ Swarm.
11 |
12 | ```
13 | mqtt swarm
14 | ```
15 |
16 | ***
17 |
18 | ## Commands
19 |
20 | | Command | Explanation |
21 | |---------|-------------------------------|
22 | | status | See [Status](swarm/status.md) |
23 | | run | See [Run](swarm/run.md) |
24 |
25 | ***
26 |
27 | ## Options
28 |
29 | ### Help Options
30 |
31 | {% include options/help-options.md defaultHelp=true %}
32 |
--------------------------------------------------------------------------------
/docs/_docs/swarm/status.md:
--------------------------------------------------------------------------------
1 | ---
2 | nav_order: 1
3 | redirect_from: /docs/swarm/status.html
4 | ---
5 |
6 | # Status
7 |
8 | ***
9 |
10 | The status command of the HiveMQ Swarm command line enables fetching of the HiveMQ Swarm status.
11 |
12 | ```
13 | mqtt swarm status
14 | ```
15 |
16 | ***
17 |
18 | ## Options
19 |
20 | | Option | Long Version | Explanation | Default |
21 | |--------|--------------|--------------------------------------------------------------------|-------------------------|
22 | | `-url` | | The URL of the HiveMQ Swarm Rest endpoint. | `http://localhost:8888` |
23 | | | `--format` | The export output format (Currently supported formats [`pretty`]). | `pretty` |
24 |
25 | ### Logging Options
26 |
27 | {% include options/logging-options.md %}
28 |
29 | ### Help Options
30 |
31 | {% include options/help-options.md defaultHelp=true %}
32 |
--------------------------------------------------------------------------------
/docs/_docs/test/connect_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Connect Options
3 | permalink: /docs/test/#connect-options
4 | nav_order: 3
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/test/further_examples.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Further Examples
3 | permalink: /docs/test/#further-examples
4 | nav_order: 7
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/test/help_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Help Options
3 | permalink: /docs/test/#help-options
4 | nav_order: 6
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/test/logging_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Logging Options
3 | permalink: /docs/test/#logging-options
4 | nav_order: 5
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/test/security_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Security Options
3 | permalink: /docs/test/#security-options
4 | nav_order: 4
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/test/test_options.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test Options
3 | permalink: /docs/test/#test-options
4 | nav_order: 2
5 | ---
--------------------------------------------------------------------------------
/docs/_docs/tls/cipher_suites.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Cipher Suites
3 | permalink: /docs/tls/#cipher-suites
4 | nav_order: 4
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/tls/configuration.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Configuration
3 | permalink: /docs/tls/#configuration
4 | nav_order: 2
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/tls/formats_and_encryption.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Formats and Encryption
3 | permalink: /docs/tls/#formats-and-encryption-algorithms
4 | nav_order: 5
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_docs/tls/versions.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Versions
3 | permalink: /docs/tls/#versions
4 | nav_order: 3
5 | ---
6 |
--------------------------------------------------------------------------------
/docs/_includes/admonition.html:
--------------------------------------------------------------------------------
1 | {%- comment -%}
2 | include parameters:
3 | - type: string
4 | type of the admonition (note, tip, warn, important)
5 | - title: string
6 | optional title of the admonition
7 | - content: string
8 | markdown content of the admonition
9 | {%- endcomment -%}
10 |
11 |
12 | {% if include.title %}
13 |
{{ include.title }}
14 | {% endif %}
15 |
{{ include.content | markdownify }}
16 |
--------------------------------------------------------------------------------
/docs/_includes/head_custom.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/docs/_includes/news.md:
--------------------------------------------------------------------------------
1 | # News
2 |
3 | {% for post in site.posts %}
4 | - [{{ post.title }} ({{ post.date | date_to_string }})]({{ post.url | absolute_url }})
5 | {% endfor %}
--------------------------------------------------------------------------------
/docs/_includes/options/api-connection-options.md:
--------------------------------------------------------------------------------
1 | | Option | Long Version | Explanation | Default |
2 | |--------|--------------------|-------------------------------------------------------------------------------------|-------------------------|
3 | | `-u` | `--url` | The URL of the HiveMQ REST API endpoint. | `http://localhost:8888` |
4 | | `-r` | `--rate` | The rate limit of the rest calls to the HiveMQ API endpoint in requests per second. | 1500 |
5 |
--------------------------------------------------------------------------------
/docs/_includes/options/authentication-options.md:
--------------------------------------------------------------------------------
1 | | Option | Long Version | Explanation | Default |
2 | |------------|--------------|--------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
3 | | `-u` | `--user` | Define the username for authentication. | |
4 | | `-pw` | `--password` | Define the password for authentication directly. If left blank the user will be prompted for the password in the console. | |
5 | | `-pw:env` | | Define that the password for authentication is read in from an environment variable. | `MQTT_CLI_PW` if the option is specified without a value |
6 | | `-pw:file` | | Define the path to a file from which the password is read from. | |
7 |
--------------------------------------------------------------------------------
/docs/_includes/options/connect-restrictions-options.md:
--------------------------------------------------------------------------------
1 | | Option | Long Version | Explanation | Default |
2 | |--------|-------------------------|-------------------------------------------------------------------------------------------------------------------|-------------|
3 | | | `--rcvMax` | The maximum amount of not acknowledged publishes with QoS 1 or 2 the client accepts from the server concurrently. | `65535` |
4 | | | `--sendMax` | The maximum amount of not acknowledged publishes with QoS 1 or 2 the client sends to the server concurrently. | `65535` |
5 | | | `--maxPacketSize` | The maximum packet size the client accepts from the server. | `268435460` |
6 | | | `--sendMaxPacketSize` | The maximum packet size the client sends to the server. | `268435460` |
7 | | | `--topicAliasMax` | The maximum amount of topic aliases the client accepts from the server. | `0` |
8 | | | `--sendTopicAliasMax` | The maximum amount of topic aliases the client sends to the server. | `16` |
9 | | | `--[no-]reqProblemInfo` | The client requests problem information from the server. | `true` |
10 | | | `--reqResponseInfo` | The client requests response information from the server. | `false` |
11 |
--------------------------------------------------------------------------------
/docs/_includes/options/debug-options.md:
--------------------------------------------------------------------------------
1 | | Option | Long Version | Explanation | Default |
2 | |--------|--------------|--------------------------------------|---------|
3 | | `-d` | `--debug` | Print debug messages to the console. | `false` |
4 | | `-v` | `--verbose` | Print trace messages to the console. | `false` |
5 |
--------------------------------------------------------------------------------
/docs/_includes/options/help-options.md:
--------------------------------------------------------------------------------
1 | | Option | Long Version | Explanation |
2 | |-----------------------------------------------|--------------|-----------------------------------------|
3 | | {% if include.defaultHelp %} `-h` {% endif %} | `--help` | Display help message for command. |
4 | | {% if include.defaultHelp %} `-V` {% endif %} | `--version` | Display version information of the cli. |
5 |
6 |
--------------------------------------------------------------------------------
/docs/_includes/options/logging-options.md:
--------------------------------------------------------------------------------
1 | | Option | Long Version | Explanation | Default |
2 | |--------|--------------|-------------------------------------------------------------------------------|---------|
3 | | `-l` | | Log to ~./mqtt-cli/logs (Configurable through ~/.mqtt-cli/config.properties). | `false` |
4 |
--------------------------------------------------------------------------------
/docs/_includes/tabs.html:
--------------------------------------------------------------------------------
1 | {%- comment -%}
2 | include parameters:
3 | - group: string
4 | the same tab is selected in all tabs with the same group
5 | - content: string
6 | markdown content, each tab is separated by `====` and tab header and content are seperated by `===`
7 | - no_header: boolean
8 | whether the tab headers should not be shown, useful to continue tabs on the same page
9 | - merge: boolean
10 | whether 2 levels of tabs should be merged, the upper level on the left, the lower on the right
11 | {%- endcomment -%}
12 |
13 | {%- assign tabs = include.content | split: "====" -%}
14 | {%- unless include.no_header -%}
15 |
20 | {%- endunless -%}
21 |
22 | {% for tab in tabs %}
23 | {{ tab | split: "===" | last | markdownify }}
24 | {% endfor %}
25 |
--------------------------------------------------------------------------------
/docs/_layouts/post.html:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | ---
4 |
5 | {{ page.date | date: "%-d %B %Y" }}
6 | {{ page.title }}
7 |
8 | by {{ page.author | default: site.author }}
9 |
10 | {{content}}
11 |
12 | {% if page.tags %}
13 | tags: {{ page.tags | join: " - " }}
14 | {% endif %}
15 |
16 |
17 | {% if page.previous.url %}
18 |
« {{ page.previous.title }}
19 | {% endif %}
20 |
All news
21 | {% if page.next.url %}
22 |
{{ page.next.title }} »
23 | {% endif %}
24 |
--------------------------------------------------------------------------------
/docs/_sass/color_schemes/dark.scss:
--------------------------------------------------------------------------------
1 | $body-background-color: $grey-dk-300;
2 | $sidebar-color: $grey-dk-300;
3 | $border-color: $grey-dk-200;
4 |
5 | $body-text-color: $grey-lt-300;
6 | $body-heading-color: $grey-lt-000;
7 | $nav-child-link-color: $grey-dk-000;
8 | $search-result-preview-color: $grey-dk-000;
9 |
10 | $link-color: $yellow-300;
11 | $btn-primary-color: $yellow-200;
12 | $base-button-color: $grey-dk-250;
13 |
14 | $code-background-color: $grey-dk-250;
15 | $search-background-color: $grey-dk-250;
16 | $table-background-color: $grey-dk-250;
17 | $feedback-color: darken($sidebar-color, 3%);
18 |
--------------------------------------------------------------------------------
/docs/assets/images/02-mqtt-cli-neg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/docs/assets/images/02-mqtt-cli-neg.png
--------------------------------------------------------------------------------
/docs/favicon-144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/docs/favicon-144.png
--------------------------------------------------------------------------------
/docs/favicon-152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/docs/favicon-152.png
--------------------------------------------------------------------------------
/docs/favicon-196.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/docs/favicon-196.png
--------------------------------------------------------------------------------
/docs/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/docs/favicon.ico
--------------------------------------------------------------------------------
/docs/index.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: Home
4 | nav_exclude: true
5 | ---
6 |
7 | 
8 | {: .banner }
9 |
10 |
11 | # What is MQTT CLI?
12 |
13 | MQTT CLI is a full MQTT 5.0 and MQTT 3.1.1 compatible command line interface for MQTT clients
14 | which uses the [HiveMQ MQTT Client API](https://github.com/hivemq/hivemq-mqtt-client).
15 |
16 |
17 | HiveMQ CLI is an Open Source project backed by [HiveMQ](https://www.hivemq.com/).
18 |
19 | [View it on GitHub](https://github.com/hivemq/mqtt-cli){: .btn .btn-yellow }
20 |
21 |
22 | # Features
23 |
24 | - **All MQTT 3.1.1 and MQTT 5.0 features** are supported
25 | - **Interactive**, direct and verbose Mode for all MQTT Commands
26 | - Shell behavior with Syntax Highlighting, Command history
27 | - Ability to connect simultaneously various MQTT Clients to different Broker
28 | - Quick broker tests
29 | - Export information from HiveMQ API endpoints
30 | - Various distributions available
31 |
32 | {% include news.md %}
33 |
--------------------------------------------------------------------------------
/docs/news.md:
--------------------------------------------------------------------------------
1 | ---
2 | layout: default
3 | title: News
4 | nav_exclude: true
5 | search_exclude: true
6 | ---
7 |
8 | {% include news.md %}
9 | - [MQTT CLI 1.2.0 released](MQTT CLI 1.2.0 released)
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # The version of this project is moved to the build.gradle.kts (inside metadata) to overwrite
2 | # the platform version defined in the artifacts creation (-Pversion=${PLATFORM_VERSION}) as all
3 | # releases should be shipped with the newest mqtt-cli version.
4 | #
5 | # gradle properties
6 | #
7 | org.gradle.caching=true
8 | org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=1g
9 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/icons/05-mqtt-cli-icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/icons/05-mqtt-cli-icon.ico
--------------------------------------------------------------------------------
/icons/05-mqtt-cli-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/icons/05-mqtt-cli-icon.png
--------------------------------------------------------------------------------
/img/clone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/clone.png
--------------------------------------------------------------------------------
/img/commit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/commit.png
--------------------------------------------------------------------------------
/img/create-branch.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/create-branch.png
--------------------------------------------------------------------------------
/img/create-pr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/create-pr.png
--------------------------------------------------------------------------------
/img/fork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/fork.png
--------------------------------------------------------------------------------
/img/manage-remote.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/manage-remote.png
--------------------------------------------------------------------------------
/img/merge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/merge.png
--------------------------------------------------------------------------------
/img/publish.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/publish.gif
--------------------------------------------------------------------------------
/img/pubsub.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/pubsub.gif
--------------------------------------------------------------------------------
/img/push.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/push.png
--------------------------------------------------------------------------------
/img/rebase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/rebase.png
--------------------------------------------------------------------------------
/img/run-config.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/run-config.png
--------------------------------------------------------------------------------
/img/shell-mode.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/shell-mode.gif
--------------------------------------------------------------------------------
/img/shell.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/shell.gif
--------------------------------------------------------------------------------
/img/subscribe.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/subscribe.gif
--------------------------------------------------------------------------------
/img/test.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/test.gif
--------------------------------------------------------------------------------
/img/triangle-workflow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/img/triangle-workflow.png
--------------------------------------------------------------------------------
/mqtt-cli-plugins/build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | `kotlin-dsl`
3 | }
4 |
5 | group = "com.hivemq"
6 |
7 | java {
8 | toolchain {
9 | languageVersion = JavaLanguageVersion.of(11)
10 | }
11 | }
12 |
13 | repositories {
14 | mavenCentral()
15 | }
16 |
17 | gradlePlugin {
18 | plugins {
19 | create("native-image") {
20 | id = "$group.cli.$name"
21 | implementationClass = "$group.cli.native_image.CliNativeImagePlugin"
22 | }
23 | }
24 | }
25 |
26 | tasks.withType().configureEach {
27 | isPreserveFileTimestamps = false
28 | isReproducibleFileOrder = true
29 | }
30 |
--------------------------------------------------------------------------------
/mqtt-cli-plugins/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | rootProject.name = "mqtt-cli-plugins"
2 |
--------------------------------------------------------------------------------
/mqtt-cli-plugins/src/main/kotlin/com/hivemq/cli/native_image/extensions/CliNativeExtension.kt:
--------------------------------------------------------------------------------
1 | package com.hivemq.cli.native_image.extensions
2 |
3 | import org.gradle.api.provider.Property
4 |
5 | interface CliNativeExtension {
6 |
7 | /**
8 | * Java version, default: 21.0.2
9 | */
10 | val javaVersion: Property
11 |
12 | /**
13 | * Graal download base url, default: https://github.com/graalvm/graalvm-ce-builds/releases/download
14 | */
15 | val graalBaseUrl: Property
16 | }
17 |
--------------------------------------------------------------------------------
/mqtt-cli-plugins/src/main/kotlin/com/hivemq/cli/native_image/extensions/CliNativeExtensionImpl.kt:
--------------------------------------------------------------------------------
1 | package com.hivemq.cli.native_image.extensions
2 |
3 | import org.gradle.api.model.ObjectFactory
4 | import org.gradle.kotlin.dsl.property
5 | import javax.inject.Inject
6 |
7 | abstract class CliNativeExtensionImpl @Inject constructor(
8 | objectFactory: ObjectFactory
9 | ) : CliNativeExtension {
10 |
11 | final override val javaVersion = objectFactory.property().convention("21.0.2")
12 | final override val graalBaseUrl =
13 | objectFactory.property().convention("https://github.com/graalvm/graalvm-ce-builds/releases/download")
14 | }
15 |
--------------------------------------------------------------------------------
/packages/homebrew/mqtt:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Runs Mqtt CLI
3 | exec java -jar ##PREFIX## "$@"
--------------------------------------------------------------------------------
/packages/homebrew/mqtt-cli.rb:
--------------------------------------------------------------------------------
1 | class MqttCli < Formula
2 | desc "@@description@@"
3 | homepage "https://www.hivemq.com"
4 | url "https://github.com/hivemq/mqtt-cli/releases/download/v@@version@@/@@filename@@"
5 | sha256 "@@shasum@@"
6 | # depends_on :java => "1.8+"
7 |
8 | def install
9 | inreplace "brew/mqtt", "##PREFIX##", "#{prefix}/mqtt-cli-@@version@@.jar"
10 | prefix.install "brew/mqtt-cli-@@version@@.jar"
11 | bin.install "brew/mqtt"
12 | end
13 |
14 | test do
15 | system "false"
16 | end
17 | end
18 |
--------------------------------------------------------------------------------
/packages/linux/mqtt:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | # Runs Mqtt CLI
3 | exec java -jar @@jarPath@@ "$@"
--------------------------------------------------------------------------------
/packages/windows/README.txt:
--------------------------------------------------------------------------------
1 | To execute MQTT CLI simply open the Windows Command Prompt with ⊞Win + R and execute cmd.
2 | Navigate into the extracted MQTT CLI folder and execute the mqtt-cli.exe command.
3 |
4 | To quick start a MQTT CLI shell simply double-click the mqtt-cli-shell.cmd file.
--------------------------------------------------------------------------------
/packages/windows/mqtt-cli-shell.cmd:
--------------------------------------------------------------------------------
1 | @ECHO off
2 | start /B %0\..\ @@exeName@@ shell
3 |
--------------------------------------------------------------------------------
/renovate.json5:
--------------------------------------------------------------------------------
1 | {
2 | $schema: "https://docs.renovatebot.com/renovate-schema.json",
3 | extends: [
4 | "local>hivemq/renovate-config:default.json5",
5 | ],
6 | baseBranches: [
7 | "master",
8 | "renovate-playground",
9 | ],
10 | useBaseBranchConfig: "merge",
11 | branchPrefix: "renovate/mqtt-cli/",
12 | addLabels: [
13 | "tooling-and-extensions-coordination",
14 | ],
15 | }
16 |
--------------------------------------------------------------------------------
/settings.gradle.kts:
--------------------------------------------------------------------------------
1 | pluginManagement {
2 | includeBuild("mqtt-cli-plugins")
3 |
4 | if (file("../hivemq/plugins").exists()) {
5 | includeBuild("../hivemq/plugins")
6 | }
7 | }
8 |
9 | rootProject.name = "mqtt-cli"
10 |
--------------------------------------------------------------------------------
/src/integrationTest/java/com/hivemq/cli/utils/TestLoggerUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import org.tinylog.configuration.Configuration;
20 |
21 | import java.lang.reflect.Field;
22 |
23 | public class TestLoggerUtils {
24 |
25 | /**
26 | * Used to reset the logger after tests
27 | */
28 | public static void resetLogger() {
29 | final Field frozen;
30 | try {
31 | frozen = Configuration.class.getDeclaredField("frozen");
32 | frozen.setAccessible(true);
33 | frozen.set(null, false);
34 | } catch (final NoSuchFieldException | IllegalAccessException e) {
35 | e.printStackTrace();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/integrationTest/resources/SwarmRunStartCommandIT/my-scenario.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | hivemq
5 | 1883
6 |
7 |
8 |
9 |
10 | A[0-9]{4}
11 | 10
12 |
13 |
14 |
15 |
16 | topic/subtopic-[0-9]
17 | 10
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/src/integrationTest/resources/SwarmRunStopCommandIT/blockScenario.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | hivemq
5 | 1883
6 |
7 |
8 |
9 |
10 | client
11 |
12 |
13 |
14 |
15 | topic
16 |
17 |
18 |
19 |
20 | #
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/src/integrationTest/resources/hivemq.configs/rest-api-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 1883
7 | 0.0.0.0
8 |
9 |
10 |
11 |
12 | true
13 |
14 |
15 | 8888
16 | 0.0.0.0
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/src/integrationTest/resources/mqtt/test/qos0-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 1883
7 | 0.0.0.0
8 |
9 |
10 |
11 |
12 |
13 |
14 | 0
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/integrationTest/resources/mqtt/test/qos1-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 1883
7 | 0.0.0.0
8 |
9 |
10 |
11 |
12 |
13 |
14 | 1
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/src/integrationTest/resources/mqtt/test/restricted-config.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 1883
7 | 0.0.0.0
8 |
9 |
10 |
11 |
12 |
13 | 30
14 |
15 |
16 |
17 |
18 |
19 |
20 | 80000
21 |
22 |
23 |
24 | false
25 |
26 |
27 |
28 | false
29 |
30 |
31 |
32 | false
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commandline/CommandErrorMessageHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commandline;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import javax.inject.Inject;
23 | import java.io.PrintWriter;
24 |
25 | public class CommandErrorMessageHandler extends CommonErrorMessageHandler
26 | implements CommandLine.IParameterExceptionHandler {
27 |
28 | @Inject
29 | CommandErrorMessageHandler() {
30 | }
31 |
32 | @Override
33 | public int handleParseException(
34 | final @NotNull CommandLine.ParameterException ex, final @NotNull String @NotNull [] args) throws Exception {
35 | final int exitCode = super.handleParseException(ex, args);
36 | final CommandLine cmd = ex.getCommandLine();
37 | final PrintWriter writer = cmd.getErr();
38 | final CommandLine.Model.CommandSpec spec = cmd.getCommandSpec();
39 | writer.printf("Try '%s --help' for more information.%n", spec.qualifiedName());
40 | return exitCode;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commandline/CommandLineConfig.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commandline;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import javax.inject.Inject;
23 | import javax.inject.Singleton;
24 |
25 | @Singleton
26 | public class CommandLineConfig {
27 |
28 | private final static @NotNull CommandLine.Help.ColorScheme COLOR_SCHEME =
29 | new CommandLine.Help.ColorScheme.Builder(CommandLine.Help.Ansi.AUTO).commands(CommandLine.Help.Ansi.Style.bold,
30 | CommandLine.Help.Ansi.Style.fg_yellow)
31 | .options(CommandLine.Help.Ansi.Style.italic, CommandLine.Help.Ansi.Style.fg_yellow)
32 | .parameters(CommandLine.Help.Ansi.Style.fg_yellow)
33 | .optionParams(CommandLine.Help.Ansi.Style.italic)
34 | .build();
35 | private static final int CLI_WIDTH = 160;
36 |
37 | @Inject
38 | public CommandLineConfig() {
39 | }
40 |
41 | public @NotNull CommandLine.Help.ColorScheme getColorScheme() {
42 | return COLOR_SCHEME;
43 | }
44 |
45 | public int getCliWidth() {
46 | return CLI_WIDTH;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commandline/ShellErrorMessageHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commandline;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import javax.inject.Inject;
23 | import java.io.PrintWriter;
24 |
25 | public class ShellErrorMessageHandler extends CommonErrorMessageHandler
26 | implements CommandLine.IParameterExceptionHandler {
27 |
28 | @Inject
29 | ShellErrorMessageHandler() {
30 | }
31 |
32 | @Override
33 | public int handleParseException(
34 | final @NotNull CommandLine.ParameterException ex, final @NotNull String @NotNull [] args) throws Exception {
35 | final int exitCode = super.handleParseException(ex, args);
36 | final PrintWriter writer = ex.getCommandLine().getErr();
37 |
38 | if (ex instanceof CommandLine.UnmatchedArgumentException &&
39 | ((CommandLine.UnmatchedArgumentException) ex).getUnmatched().get(0).equals(args[0])) {
40 | writer.printf("Try 'help' to get a list of commands.%n");
41 | } else {
42 | writer.printf("Try 'help %s' for more information.%n", args[0]);
43 | }
44 |
45 | return exitCode;
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/MqttCLICommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands;
18 |
19 | import com.hivemq.cli.MqttCLIMain;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | import javax.inject.Inject;
24 |
25 | @CommandLine.Command(name = "mqtt",
26 | description = "MQTT Command Line Interpreter.",
27 | synopsisHeading = "%n@|bold Usage:|@ ",
28 | synopsisSubcommandLabel = "{ pub | sub | shell | test | hivemq | swarm }",
29 | descriptionHeading = "%n",
30 | optionListHeading = "%n@|bold Options:|@%n",
31 | commandListHeading = "%n@|bold Commands:|@%n",
32 | versionProvider = MqttCLIMain.CLIVersionProvider.class,
33 | mixinStandardHelpOptions = true)
34 | public class MqttCLICommand {
35 |
36 | @SuppressWarnings("unused")
37 | public static final @NotNull String VERSION_STRING = "1.0";
38 |
39 | @Inject
40 | MqttCLICommand() {
41 | }
42 |
43 | @Override
44 | public @NotNull String toString() {
45 | return "MqttCLICommand{}";
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/options/HelpOptions.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.options;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | /**
23 | * Helper Option in order to allow the --version and --help option at commands which already define -h and -V
24 | * themselves.
25 | */
26 | public class HelpOptions {
27 |
28 | @SuppressWarnings("unused")
29 | @CommandLine.Option(names = {"--version"}, versionHelp = true, description = "display version info")
30 | private boolean versionInfoRequested;
31 |
32 | @SuppressWarnings("unused")
33 | @CommandLine.Option(names = {"--help"}, usageHelp = true, description = "display this help message")
34 | private boolean usageHelpRequested;
35 |
36 | @Override
37 | public @NotNull String toString() {
38 | return "HelpOptions{" +
39 | "versionInfoRequested=" +
40 | versionInfoRequested +
41 | ", usageHelpRequested=" +
42 | usageHelpRequested +
43 | '}';
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/shell/ClearScreenCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.shell;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import javax.inject.Inject;
23 | import java.util.concurrent.Callable;
24 |
25 | /**
26 | * Command that clears the screen.
27 | */
28 | @CommandLine.Command(name = "cls", aliases = "clear", description = "Clear the screen", mixinStandardHelpOptions = true)
29 | public class ClearScreenCommand implements Callable {
30 |
31 | @Inject
32 | ClearScreenCommand() {
33 | }
34 |
35 | @Override
36 | public @NotNull Integer call() {
37 | ShellCommand.clearScreen();
38 | return 0;
39 | }
40 |
41 | @Override
42 | public @NotNull String toString() {
43 | return "ClearScreenCommand{}";
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/shell/ContextExitCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.shell;
18 |
19 | import com.hivemq.cli.mqtt.MqttClientExecutor;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | import javax.inject.Inject;
24 | import java.util.concurrent.Callable;
25 |
26 | @CommandLine.Command(name = "exit", description = "Exit the current context", mixinStandardHelpOptions = true)
27 | public class ContextExitCommand extends ShellContextCommand implements Callable {
28 |
29 | @Inject
30 | public ContextExitCommand(final @NotNull MqttClientExecutor mqttClientExecutor) {
31 | super(mqttClientExecutor);
32 | }
33 |
34 | @Override
35 | public @NotNull Integer call() {
36 | removeContext();
37 | return 0;
38 | }
39 |
40 | @Override
41 | public @NotNull String toString() {
42 | return "ContextExitCommand{}";
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/shell/ShellExitCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.shell;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import javax.inject.Inject;
23 | import java.util.concurrent.Callable;
24 |
25 | @CommandLine.Command(name = "exit", description = "Exit the shell", mixinStandardHelpOptions = true)
26 | public class ShellExitCommand implements Callable {
27 |
28 | @Inject
29 | public ShellExitCommand() {
30 | }
31 |
32 | @Override
33 | public @NotNull Integer call() {
34 | ShellCommand.exitShell();
35 | return 0;
36 | }
37 |
38 | @Override
39 | public @NotNull String toString() {
40 | return "ShellExitCommand{}";
41 | }
42 | }
43 |
44 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/shell/VersionCommand.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.shell;
18 |
19 | import com.hivemq.cli.MqttCLIMain;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | import javax.inject.Inject;
24 | import java.util.concurrent.Callable;
25 |
26 | @CommandLine.Command(name = "version",
27 | description = "Prints version information",
28 | versionProvider = MqttCLIMain.CLIVersionProvider.class)
29 | public class VersionCommand implements Callable {
30 |
31 | @SuppressWarnings({"NotNullFieldNotInitialized", "unused"})
32 | @CommandLine.Spec
33 | private @NotNull CommandLine.Model.CommandSpec spec;
34 |
35 | @Inject
36 | VersionCommand() {
37 | }
38 |
39 | @Override
40 | public @NotNull Integer call() {
41 | spec.commandLine().printVersionHelp(System.out);
42 | return 0;
43 | }
44 |
45 | @Override
46 | public @NotNull String toString() {
47 | return "VersionCommand{" + "spec=" + spec + '}';
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/swarm/commander/CommanderStatus.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.swarm.commander;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | public class CommanderStatus {
22 |
23 | private final @NotNull String status;
24 |
25 | public CommanderStatus(final @NotNull String status) {
26 | this.status = status;
27 | }
28 |
29 | public @NotNull String getStatus() {
30 | return status;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/swarm/error/Error.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.swarm.error;
18 |
19 | import org.jetbrains.annotations.Nullable;
20 |
21 | public class Error {
22 |
23 | private final @Nullable String detail;
24 |
25 | public Error(final @Nullable String detail) {
26 | this.detail = detail;
27 | }
28 |
29 | public @Nullable String getDetail() {
30 | return detail;
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/commands/swarm/error/ErrorResponse.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.commands.swarm.error;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | import java.util.List;
22 |
23 | public class ErrorResponse {
24 |
25 | private final @NotNull List errors;
26 |
27 | public ErrorResponse(final @NotNull List errors) {
28 | this.errors = errors;
29 | }
30 |
31 | public @NotNull List getErrors() {
32 | return errors;
33 | }
34 | }
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/ByteBufferConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import java.nio.ByteBuffer;
23 | import java.nio.charset.StandardCharsets;
24 |
25 | public class ByteBufferConverter implements CommandLine.ITypeConverter {
26 |
27 | @Override
28 | public @NotNull ByteBuffer convert(final @NotNull String s) throws Exception {
29 | return ByteBuffer.wrap(s.getBytes(StandardCharsets.UTF_8));
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/EnvVarToByteBufferConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import java.nio.ByteBuffer;
23 |
24 | public class EnvVarToByteBufferConverter implements CommandLine.ITypeConverter {
25 |
26 | static final @NotNull String ENVIRONMENT_VARIABLE_IS_NULL = "The given environment variable is not defined.";
27 |
28 | @Override
29 | public @NotNull ByteBuffer convert(final @NotNull String value) throws Exception {
30 | final ByteBufferConverter converter = new ByteBufferConverter();
31 | final String envVar = System.getenv(value);
32 |
33 | if (envVar == null) {
34 | throw new NullPointerException(ENVIRONMENT_VARIABLE_IS_NULL);
35 | }
36 |
37 | return converter.convert(envVar);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/FileToByteBufferConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | import java.io.FileNotFoundException;
23 | import java.nio.ByteBuffer;
24 | import java.nio.file.Files;
25 | import java.nio.file.Path;
26 | import java.nio.file.Paths;
27 |
28 | public class FileToByteBufferConverter implements CommandLine.ITypeConverter {
29 |
30 | @Override
31 | public @NotNull ByteBuffer convert(final @NotNull String fileName) throws Exception {
32 | final Path path = Paths.get(fileName);
33 | if (!Files.isReadable(path)) {
34 | throw new FileNotFoundException("File not found or not readable: " + fileName);
35 | }
36 |
37 | return ByteBuffer.wrap(Files.readAllBytes(path));
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/FunctionTypeConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import com.hivemq.cli.openapi.hivemq.HivemqOpenapiScript;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | public class FunctionTypeConverter implements CommandLine.ITypeConverter {
24 |
25 | @Override
26 | public @NotNull HivemqOpenapiScript.FunctionTypeEnum convert(final @NotNull String s) throws Exception {
27 | return HivemqOpenapiScript.FunctionTypeEnum.fromValue(s.toUpperCase());
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/Mqtt5UserPropertyConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import com.hivemq.client.mqtt.mqtt5.datatypes.Mqtt5UserProperty;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | public class Mqtt5UserPropertyConverter implements CommandLine.ITypeConverter {
24 |
25 | static final @NotNull String KEY_VALUE_DELIMETER_ERROR = "a key value pair wasn't delimited by '='";
26 |
27 | @Override
28 | public @NotNull Mqtt5UserProperty convert(final @NotNull String s) throws Exception {
29 | final String[] splitKeyValue = s.split("=");
30 |
31 | if (splitKeyValue.length != 2) {
32 | throw new Exception(KEY_VALUE_DELIMETER_ERROR);
33 | }
34 |
35 | return Mqtt5UserProperty.of(splitKeyValue[0], splitKeyValue[1]);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/MqttQosConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import com.hivemq.client.mqtt.datatypes.MqttQos;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | public class MqttQosConverter implements CommandLine.ITypeConverter {
24 |
25 | static final @NotNull String WRONG_INPUT_MESSAGE =
26 | "Value must be 0 (AT_MOST_ONCE), 1 (AT_LEAST_ONCE) or 2 (EXACTLY_ONCE)";
27 |
28 | @Override
29 | public @NotNull MqttQos convert(final @NotNull String s) throws Exception {
30 | switch (s.toLowerCase()) {
31 | case "0":
32 | case "at_most_once":
33 | return MqttQos.AT_MOST_ONCE;
34 | case "1":
35 | case "at_least_once":
36 | return MqttQos.AT_LEAST_ONCE;
37 | case "2":
38 | case "exactly_once":
39 | return MqttQos.EXACTLY_ONCE;
40 | default:
41 | throw new Exception(WRONG_INPUT_MESSAGE);
42 | }
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/MqttVersionConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import com.hivemq.client.mqtt.MqttVersion;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | public class MqttVersionConverter implements CommandLine.ITypeConverter {
24 |
25 | static final @NotNull String UNSUPPORTED_MQTT_VERSION = "The specified MQTT Version is not supported.";
26 | static final @NotNull String BAD_NUMBER_FORMAT = "The given number can't be parsed to a valid MQTT Version";
27 |
28 | @Override
29 | public @NotNull MqttVersion convert(final @NotNull String value) throws Exception {
30 | final int version;
31 | try {
32 | version = Integer.parseInt(value);
33 | } catch (final NumberFormatException throwable) {
34 | throw new IllegalArgumentException(BAD_NUMBER_FORMAT);
35 | }
36 |
37 | switch (version) {
38 | case 3:
39 | return MqttVersion.MQTT_3_1_1;
40 | case 5:
41 | return MqttVersion.MQTT_5_0;
42 | default:
43 | throw new IllegalArgumentException(UNSUPPORTED_MQTT_VERSION);
44 | }
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/PasswordFileToByteBufferConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import com.hivemq.cli.utils.FileUtil;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | import java.io.BufferedReader;
24 | import java.io.File;
25 | import java.nio.ByteBuffer;
26 | import java.nio.file.Files;
27 | import java.nio.file.Paths;
28 |
29 | public class PasswordFileToByteBufferConverter implements CommandLine.ITypeConverter {
30 |
31 | @Override
32 | public @NotNull ByteBuffer convert(final @NotNull String value) throws Exception {
33 | final File file = FileUtil.assertFileExists(Paths.get(value));
34 | try (final BufferedReader in = Files.newBufferedReader(file.toPath())) {
35 | return ByteBuffer.wrap(in.readLine().getBytes());
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/PayloadFormatIndicatorConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5PayloadFormatIndicator;
20 | import org.jetbrains.annotations.NotNull;
21 | import picocli.CommandLine;
22 |
23 | public class PayloadFormatIndicatorConverter implements CommandLine.ITypeConverter {
24 |
25 | static final @NotNull String WRONG_INPUT_MESSAGE = "Value must be UTF_8 or empty";
26 |
27 | @Override
28 | public @NotNull Mqtt5PayloadFormatIndicator convert(final @NotNull String s) throws Exception {
29 | switch (s.toLowerCase()) {
30 | case "utf8":
31 | case "utf_8":
32 | return Mqtt5PayloadFormatIndicator.UTF_8;
33 | case "":
34 | return Mqtt5PayloadFormatIndicator.UNSPECIFIED;
35 | default:
36 | throw new Exception(WRONG_INPUT_MESSAGE);
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/SchemaTypeConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | public class SchemaTypeConverter implements CommandLine.ITypeConverter {
23 |
24 | static final @NotNull String WRONG_INPUT_MESSAGE = "Value must be json or protobuf";
25 |
26 | @Override
27 | public @NotNull String convert(final @NotNull String s) throws Exception {
28 | switch (s.toLowerCase()) {
29 | case "json":
30 | return "JSON";
31 | case "protobuf":
32 | return "PROTOBUF";
33 | default:
34 | throw new Exception(WRONG_INPUT_MESSAGE);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/UnsignedIntConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | public class UnsignedIntConverter implements CommandLine.ITypeConverter {
23 |
24 | static final @NotNull String WRONG_INPUT_MESSAGE = "Value must be in range [0 - 4_294_967_295]";
25 |
26 | private final static long MAX_VALUE = 4_294_967_295L;
27 |
28 | @Override
29 | public @NotNull Long convert(final @NotNull String s) throws Exception {
30 | try {
31 | final long interval = Long.parseLong(s);
32 | if (!(interval >= 0 && interval <= MAX_VALUE)) {
33 | throw new Exception(WRONG_INPUT_MESSAGE);
34 | }
35 | return interval;
36 | } catch (final NumberFormatException p) {
37 | throw new Exception(WRONG_INPUT_MESSAGE);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/converters/UnsignedShortConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.converters;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import picocli.CommandLine;
21 |
22 | public class UnsignedShortConverter implements CommandLine.ITypeConverter {
23 |
24 | static final @NotNull String WRONG_INPUT_MESSAGE = "Value must be in range [0 - 65_535]";
25 |
26 | private final static int MAX_VALUE = 65_535;
27 |
28 | @Override
29 | public @NotNull Integer convert(final @NotNull String s) throws Exception {
30 | try {
31 | final int interval = Integer.parseInt(s);
32 | if (!(interval >= 0 && interval <= MAX_VALUE)) {
33 | throw new Exception(WRONG_INPUT_MESSAGE);
34 | }
35 | return interval;
36 | } catch (final NumberFormatException p) {
37 | throw new Exception(WRONG_INPUT_MESSAGE);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/graal/BouncyCastleFeature.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.graal;
18 |
19 | import org.bouncycastle.jce.provider.BouncyCastleProvider;
20 | import org.graalvm.nativeimage.hosted.Feature;
21 | import org.jetbrains.annotations.Nullable;
22 |
23 | import java.security.Security;
24 |
25 | /**
26 | * This class is used to register and validate BouncyCastle providers for the native image.
27 | */
28 | @SuppressWarnings("unused")
29 | public class BouncyCastleFeature implements Feature {
30 |
31 | @Override
32 | public void afterRegistration(final @Nullable AfterRegistrationAccess access) {
33 | Security.addProvider(new BouncyCastleProvider());
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/hivemq/datapolicy/DataPolicyDeleteTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.hivemq.datapolicy;
18 |
19 | import com.hivemq.cli.commands.hivemq.datahub.OutputFormatter;
20 | import com.hivemq.cli.openapi.ApiException;
21 | import com.hivemq.cli.openapi.hivemq.DataHubDataPoliciesApi;
22 | import org.jetbrains.annotations.NotNull;
23 |
24 | public class DataPolicyDeleteTask {
25 | private final @NotNull OutputFormatter outputFormatter;
26 | private final @NotNull DataHubDataPoliciesApi dataPoliciesApi;
27 | private final @NotNull String policyId;
28 |
29 | public DataPolicyDeleteTask(
30 | final @NotNull OutputFormatter outputFormatter,
31 | final @NotNull DataHubDataPoliciesApi dataPoliciesApi,
32 | final @NotNull String policyId) {
33 | this.outputFormatter = outputFormatter;
34 | this.dataPoliciesApi = dataPoliciesApi;
35 | this.policyId = policyId;
36 | }
37 |
38 | public boolean execute() {
39 | try {
40 | dataPoliciesApi.deleteDataPolicy(policyId);
41 | } catch (final ApiException apiException) {
42 | outputFormatter.printApiException("Failed to delete policy", apiException);
43 | return false;
44 | }
45 |
46 | return true;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/hivemq/schemas/DeleteSchemaTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.hivemq.schemas;
18 |
19 | import com.hivemq.cli.commands.hivemq.datahub.OutputFormatter;
20 | import com.hivemq.cli.openapi.ApiException;
21 | import com.hivemq.cli.openapi.hivemq.DataHubSchemasApi;
22 | import org.jetbrains.annotations.NotNull;
23 |
24 | public class DeleteSchemaTask {
25 | private final @NotNull OutputFormatter outputFormatter;
26 | private final @NotNull DataHubSchemasApi schemasApi;
27 | private final @NotNull String schemaId;
28 |
29 | public DeleteSchemaTask(
30 | final @NotNull OutputFormatter outputFormatter,
31 | final @NotNull DataHubSchemasApi schemasApi,
32 | final @NotNull String schemaId) {
33 | this.outputFormatter = outputFormatter;
34 | this.schemasApi = schemasApi;
35 | this.schemaId = schemaId;
36 | }
37 |
38 | public boolean execute() {
39 | try {
40 | schemasApi.deleteSchema(schemaId);
41 | } catch (final ApiException apiException) {
42 | outputFormatter.printApiException("Failed to delete schema", apiException);
43 | return false;
44 | }
45 |
46 | return true;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/hivemq/scripts/DeleteScriptTask.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.hivemq.scripts;
18 |
19 | import com.hivemq.cli.commands.hivemq.datahub.OutputFormatter;
20 | import com.hivemq.cli.openapi.ApiException;
21 | import com.hivemq.cli.openapi.hivemq.DataHubScriptsApi;
22 | import org.jetbrains.annotations.NotNull;
23 |
24 | public class DeleteScriptTask {
25 | private final @NotNull OutputFormatter outputFormatter;
26 | private final @NotNull DataHubScriptsApi scriptsApi;
27 | private final @NotNull String scriptId;
28 |
29 | public DeleteScriptTask(
30 | final @NotNull OutputFormatter outputFormatter,
31 | final @NotNull DataHubScriptsApi scriptsApi,
32 | final @NotNull String scriptId) {
33 | this.outputFormatter = outputFormatter;
34 | this.scriptsApi = scriptsApi;
35 | this.scriptId = scriptId;
36 | }
37 |
38 | public boolean execute() {
39 | try {
40 | scriptsApi.deleteScript(scriptId);
41 | } catch (final ApiException apiException) {
42 | outputFormatter.printApiException("Failed to delete script", apiException);
43 | return false;
44 | }
45 |
46 | return true;
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/ioc/MqttCLI.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.ioc;
18 |
19 | import com.hivemq.cli.DefaultCLIProperties;
20 | import dagger.Component;
21 | import org.jetbrains.annotations.NotNull;
22 | import picocli.CommandLine;
23 |
24 | import javax.inject.Named;
25 | import javax.inject.Singleton;
26 |
27 | @Singleton
28 | @Component(modules = {
29 | CliModule.class, ShellModule.class, HiveMqModule.class, SwarmModule.class})
30 | public interface MqttCLI {
31 |
32 | @SuppressWarnings("NullableProblems") //Dagger implemented methods do not create @NotNull annotations
33 | @Named("cli")
34 | @NotNull CommandLine cli();
35 |
36 | @SuppressWarnings("NullableProblems") //Dagger implemented methods do not create @NotNull annotations
37 | @Named("shell")
38 | @NotNull CommandLine shell();
39 |
40 | @SuppressWarnings("NullableProblems") //Dagger implemented methods do not create @NotNull annotations
41 | @Named("shell-context")
42 | @NotNull CommandLine shellContext();
43 |
44 | @SuppressWarnings("NullableProblems") //Dagger implemented methods do not create @NotNull annotations
45 | @NotNull DefaultCLIProperties defaultCLIProperties();
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/Mqtt5DebugIncomingQos1Interceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt;
18 |
19 | import com.hivemq.cli.utils.LoggerUtils;
20 | import com.hivemq.client.internal.mqtt.message.publish.puback.MqttPubAckBuilder;
21 | import com.hivemq.client.mqtt.mqtt5.Mqtt5ClientConfig;
22 | import com.hivemq.client.mqtt.mqtt5.advanced.interceptor.qos1.Mqtt5IncomingQos1Interceptor;
23 | import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5Publish;
24 | import com.hivemq.client.mqtt.mqtt5.message.publish.puback.Mqtt5PubAckBuilder;
25 | import org.jetbrains.annotations.NotNull;
26 | import org.tinylog.Logger;
27 |
28 | public class Mqtt5DebugIncomingQos1Interceptor implements Mqtt5IncomingQos1Interceptor {
29 |
30 | @Override
31 | public void onPublish(
32 | final @NotNull Mqtt5ClientConfig clientConfig,
33 | final @NotNull Mqtt5Publish publish,
34 | final @NotNull Mqtt5PubAckBuilder pubAckBuilder) {
35 | final String clientPrefix = LoggerUtils.getClientPrefix(clientConfig);
36 | Logger.debug("{} sending PUBACK\n {}", clientPrefix, ((MqttPubAckBuilder) pubAckBuilder).build());
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/Mqtt5DebugOutgoingQos1Interceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt;
18 |
19 | import com.hivemq.cli.utils.LoggerUtils;
20 | import com.hivemq.client.mqtt.mqtt5.Mqtt5ClientConfig;
21 | import com.hivemq.client.mqtt.mqtt5.advanced.interceptor.qos1.Mqtt5OutgoingQos1Interceptor;
22 | import com.hivemq.client.mqtt.mqtt5.message.publish.Mqtt5Publish;
23 | import com.hivemq.client.mqtt.mqtt5.message.publish.puback.Mqtt5PubAck;
24 | import org.jetbrains.annotations.NotNull;
25 | import org.tinylog.Logger;
26 |
27 | public class Mqtt5DebugOutgoingQos1Interceptor implements Mqtt5OutgoingQos1Interceptor {
28 |
29 | @Override
30 | public void onPubAck(
31 | final @NotNull Mqtt5ClientConfig clientConfig,
32 | final @NotNull Mqtt5Publish publish,
33 | final @NotNull Mqtt5PubAck pubAck) {
34 | final String clientPrefix = LoggerUtils.getClientPrefix(clientConfig);
35 | Logger.debug("{} received PUBACK\n {}", clientPrefix, pubAck);
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/exception/SigpipeException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.exception;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | public class SigpipeException extends RuntimeException {
22 |
23 | public SigpipeException(final @NotNull String message) {
24 | super(message);
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/AsciiCharsInClientIdTestResults.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | import com.hivemq.cli.utils.Tuple;
20 | import org.jetbrains.annotations.NotNull;
21 |
22 | import java.util.LinkedList;
23 | import java.util.List;
24 |
25 | public class AsciiCharsInClientIdTestResults {
26 |
27 | private final @NotNull List> testResults;
28 |
29 | public AsciiCharsInClientIdTestResults(final @NotNull List> testResults) {
30 | this.testResults = testResults;
31 | }
32 |
33 | public @NotNull List> getTestResults() {
34 | return testResults;
35 | }
36 |
37 | public @NotNull List getUnsupportedChars() {
38 | final List unsupportedChars = new LinkedList<>();
39 | for (final Tuple tuple : testResults) {
40 | if (tuple.getValue() == null || !("SUCCESS").equals(tuple.getValue())) {
41 | unsupportedChars.add(tuple.getKey());
42 | }
43 | }
44 | return unsupportedChars;
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/ClientIdLengthTestResults.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | import com.hivemq.cli.utils.Tuple;
20 | import org.jetbrains.annotations.NotNull;
21 |
22 | import java.util.List;
23 |
24 | public class ClientIdLengthTestResults {
25 |
26 | private final int maxClientIdLength;
27 | private final @NotNull List> testResults;
28 |
29 | public ClientIdLengthTestResults(
30 | final int maxClientIdLength, final @NotNull List> testResults) {
31 | this.maxClientIdLength = maxClientIdLength;
32 | this.testResults = testResults;
33 | }
34 |
35 | public int getMaxClientIdLength() {
36 | return maxClientIdLength;
37 | }
38 |
39 | public @NotNull List> getTestResults() {
40 | return testResults;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/PayloadTestResults.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | import com.hivemq.cli.utils.Tuple;
20 | import org.jetbrains.annotations.NotNull;
21 |
22 | import java.util.List;
23 |
24 | public class PayloadTestResults {
25 |
26 | private final int payloadSize;
27 | private final @NotNull List> testResults;
28 |
29 | public PayloadTestResults(final int payloadSize, final @NotNull List> testResults) {
30 | this.payloadSize = payloadSize;
31 | this.testResults = testResults;
32 | }
33 |
34 | public int getPayloadSize() {
35 | return payloadSize;
36 | }
37 |
38 | public @NotNull List> getTestResults() {
39 | return testResults;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/QosTestResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | public class QosTestResult {
20 |
21 | private final int receivedPublishes;
22 | private final long timeToReceivePublishes;
23 |
24 | public QosTestResult(final int receivedPublishes, final long timeToReceivePublishes) {
25 | this.receivedPublishes = receivedPublishes;
26 | this.timeToReceivePublishes = timeToReceivePublishes;
27 | }
28 |
29 | public int getReceivedPublishes() {
30 | return receivedPublishes;
31 | }
32 |
33 | public long getTimeToReceivePublishes() {
34 | return timeToReceivePublishes;
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/SharedSubscriptionTestResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | public enum SharedSubscriptionTestResult {
20 | OK,
21 | NOT_SHARED,
22 | TIME_OUT,
23 | INTERRUPTED,
24 | PUBLISH_FAILED,
25 | SUBSCRIBE_FAILED
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/TestResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | public enum TestResult {
20 | OK,
21 | PUBLISH_FAILED,
22 | SUBSCRIBE_FAILED,
23 | WRONG_PAYLOAD,
24 | TIME_OUT,
25 | INTERRUPTED
26 | }
27 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/TopicLengthTestResults.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | import com.hivemq.cli.utils.Tuple;
20 | import org.jetbrains.annotations.NotNull;
21 |
22 | import java.util.List;
23 |
24 | public class TopicLengthTestResults {
25 |
26 | private final int maxTopicLength;
27 | private final @NotNull List> testResults;
28 |
29 | public TopicLengthTestResults(
30 | final int maxTopicLength, final @NotNull List> testResults) {
31 | this.maxTopicLength = maxTopicLength;
32 | this.testResults = testResults;
33 | }
34 |
35 | public int getMaxTopicLength() {
36 | return maxTopicLength;
37 | }
38 |
39 | public @NotNull List> getTestResults() {
40 | return testResults;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/mqtt/test/results/WildcardSubscriptionsTestResult.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.mqtt.test.results;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | public class WildcardSubscriptionsTestResult {
22 |
23 | private final boolean success;
24 | private final @NotNull TestResult plusWildcardTest;
25 | private final @NotNull TestResult hashWildcardTest;
26 |
27 | public WildcardSubscriptionsTestResult(
28 | final @NotNull TestResult plusWildcardTest, final @NotNull TestResult hashWildcardTest) {
29 | this.plusWildcardTest = plusWildcardTest;
30 | this.hashWildcardTest = hashWildcardTest;
31 | success = (plusWildcardTest == TestResult.OK) && (hashWildcardTest == TestResult.OK);
32 | }
33 |
34 | public boolean isSuccess() {
35 | return success;
36 | }
37 |
38 | public @NotNull TestResult getPlusWildcardTest() {
39 | return plusWildcardTest;
40 | }
41 |
42 | public @NotNull TestResult getHashWildcardTest() {
43 | return hashWildcardTest;
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/rest/ClientsApiResponses.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.rest;
18 |
19 | public class ClientsApiResponses {
20 |
21 | public static final int INVALID_CURSOR_VALUE = 400;
22 | public static final int CURSOR_NOT_VALID_ANYMORE = 410;
23 | public static final int HIVEMQ_IN_REPLICATION = 503;
24 | }
25 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/rest/RateLimitInterceptor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.rest;
18 |
19 | import com.google.common.util.concurrent.RateLimiter;
20 | import okhttp3.Interceptor;
21 | import okhttp3.Response;
22 | import org.jetbrains.annotations.NotNull;
23 |
24 | import java.io.IOException;
25 |
26 | @SuppressWarnings("UnstableApiUsage")
27 | public class RateLimitInterceptor implements Interceptor {
28 |
29 | private final @NotNull RateLimiter rateLimiter;
30 |
31 | public RateLimitInterceptor(final double requestsPerSecond) {
32 | this.rateLimiter = RateLimiter.create(requestsPerSecond);
33 | }
34 |
35 | @Override
36 | public @NotNull Response intercept(final @NotNull Chain chain) throws IOException {
37 | rateLimiter.acquire(1);
38 | return chain.proceed(chain.request());
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/utils/FileUtil.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.hivemq.cli.utils;
17 |
18 | import org.jetbrains.annotations.NotNull;
19 |
20 | import java.io.File;
21 | import java.io.FileNotFoundException;
22 | import java.nio.file.Path;
23 |
24 | public class FileUtil {
25 |
26 | static final @NotNull String FILE_NOT_FOUND = "The given file was not found.";
27 | static final @NotNull String NOT_A_FILE = "The given path does not lead to a valid file.";
28 |
29 | public static @NotNull File assertFileExists(final @NotNull Path value) throws Exception {
30 | final File file = new File(value.toUri());
31 |
32 | if (!file.exists()) {
33 | throw new FileNotFoundException(FILE_NOT_FOUND);
34 | }
35 |
36 | if (!file.isFile()) {
37 | throw new IllegalArgumentException(NOT_A_FILE);
38 | }
39 |
40 | return file;
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/utils/PasswordUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | import java.io.BufferedReader;
22 | import java.io.Console;
23 | import java.io.IOException;
24 | import java.io.InputStreamReader;
25 |
26 | public class PasswordUtils {
27 |
28 | public static char @NotNull [] readPassword(final @NotNull String @NotNull ... args) throws IOException {
29 | if (args.length > 1) {
30 | throw new IllegalArgumentException();
31 | }
32 | String promptMessage = "";
33 | if (args.length == 1) {
34 | promptMessage = args[0];
35 | }
36 |
37 | final Console console = System.console();
38 | if (console != null) {
39 | return console.readPassword("%s", promptMessage);
40 | } else { // Safe password prompt is not possible - maybe called program from IDE?
41 | System.out.print(promptMessage);
42 | final BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
43 | final String result = in.readLine();
44 | return result.toCharArray();
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/utils/TopicUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | import java.util.UUID;
22 |
23 | public class TopicUtils {
24 |
25 | public static @NotNull String generateTopicUUID() {
26 | final String uuid = UUID.randomUUID().toString();
27 | return uuid.replace("-", "");
28 | }
29 |
30 | public static @NotNull String generateTopicUUID(final int maxLength) {
31 | if (maxLength == -1 || maxLength > 32) {
32 | return generateTopicUUID();
33 | } else {
34 | return generateTopicUUID().substring(0, maxLength);
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/utils/Tuple.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import org.jetbrains.annotations.Nullable;
21 |
22 | public class Tuple {
23 |
24 | private final @NotNull A key;
25 | private final @Nullable B value;
26 |
27 | private Tuple(final @NotNull A key, final @Nullable B value) {
28 | this.key = key;
29 | this.value = value;
30 | }
31 |
32 | public static @NotNull Tuple of(final @NotNull A key, final @Nullable B value) {
33 | return new Tuple<>(key, value);
34 | }
35 |
36 | public @NotNull A getKey() {
37 | return key;
38 | }
39 |
40 | public @Nullable B getValue() {
41 | return value;
42 | }
43 |
44 | @Override
45 | public @NotNull String toString() {
46 | return "Tuple{" + "key=" + key + ", value=" + value + '}';
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/com/hivemq/cli/utils/json/OffsetDateTimeSerializer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils.json;
18 |
19 | import com.google.gson.JsonElement;
20 | import com.google.gson.JsonPrimitive;
21 | import com.google.gson.JsonSerializationContext;
22 | import com.google.gson.JsonSerializer;
23 | import org.jetbrains.annotations.NotNull;
24 |
25 | import java.lang.reflect.Type;
26 | import java.time.OffsetDateTime;
27 | import java.time.format.DateTimeFormatter;
28 |
29 | public class OffsetDateTimeSerializer implements JsonSerializer {
30 |
31 | @Override
32 | public @NotNull JsonElement serialize(
33 | final @NotNull OffsetDateTime dateTime,
34 | final @NotNull Type typeOfSrc,
35 | final @NotNull JsonSerializationContext context) {
36 | return new JsonPrimitive(DateTimeFormatter.ISO_INSTANT.format(dateTime));
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/native-image/jni-config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "name":"com.hivemq.cli.graal.NativeMain",
4 | "methods":[{"name":"main","parameterTypes":["java.lang.String[]"] }]
5 | },
6 | {
7 | "name":"java.lang.String",
8 | "methods":[
9 | {"name":"lastIndexOf","parameterTypes":["int"] },
10 | {"name":"substring","parameterTypes":["int"] }
11 | ]
12 | },
13 | {
14 | "name":"java.lang.System",
15 | "methods":[
16 | {"name":"getProperty","parameterTypes":["java.lang.String"] },
17 | {"name":"setProperty","parameterTypes":["java.lang.String","java.lang.String"] }
18 | ]
19 | },
20 | {
21 | "name":"sun.management.VMManagementImpl",
22 | "fields":[
23 | {"name":"compTimeMonitoringSupport"},
24 | {"name":"currentThreadCpuTimeSupport"},
25 | {"name":"objectMonitorUsageSupport"},
26 | {"name":"otherThreadCpuTimeSupport"},
27 | {"name":"remoteDiagnosticCommandsSupport"},
28 | {"name":"synchronizerUsageSupport"},
29 | {"name":"threadAllocatedMemorySupport"},
30 | {"name":"threadContentionMonitoringSupport"}
31 | ]
32 | }
33 | ]
34 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/native-image/predefined-classes-config.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "type":"agent-extracted",
4 | "classes":[
5 | ]
6 | }
7 | ]
8 |
9 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/native-image/proxy-config.json:
--------------------------------------------------------------------------------
1 | [
2 | ]
3 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/native-image/resource-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "resources":{
3 | "includes":[
4 | {
5 | "pattern":"\\QMETA-INF/services/org.tinylog.configuration.ConfigurationLoader\\E"
6 | },
7 | {
8 | "pattern":"\\QMETA-INF/services/org.tinylog.provider.LoggingProvider\\E"
9 | },
10 | {
11 | "pattern":"\\QMETA-INF/services/org.tinylog.writers.Writer\\E"
12 | }
13 | ]},
14 | "bundles":[]
15 | }
16 |
--------------------------------------------------------------------------------
/src/main/resources/META-INF/native-image/serialization-config.json:
--------------------------------------------------------------------------------
1 | {
2 | "types":[
3 | ],
4 | "lambdaCapturingTypes":[
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/systemTest/java/com/hivemq/cli/utils/KillCliTestExecutionListener.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 | import org.junit.platform.engine.TestExecutionResult;
21 | import org.junit.platform.launcher.TestExecutionListener;
22 | import org.junit.platform.launcher.TestIdentifier;
23 |
24 | import java.util.Arrays;
25 | import java.util.Optional;
26 |
27 | public class KillCliTestExecutionListener implements TestExecutionListener {
28 |
29 | @Override
30 | public void executionFinished(
31 | final @NotNull TestIdentifier testIdentifier, final @NotNull TestExecutionResult testExecutionResult) {
32 | final String processIds = System.getProperty(testIdentifier.getUniqueId());
33 | if (processIds == null) {
34 | return;
35 | }
36 | System.clearProperty(testIdentifier.getUniqueId());
37 | Arrays.stream(processIds.split(":")).forEach(processId -> {
38 | final Optional childProcess = ProcessHandle.of(Long.parseLong(processId));
39 | childProcess.ifPresent(ProcessHandle::destroyForcibly);
40 | });
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/src/systemTest/java/com/hivemq/cli/utils/MqttVersionConverter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import com.hivemq.extension.sdk.api.packets.general.MqttVersion;
20 | import org.jetbrains.annotations.NotNull;
21 |
22 | public class MqttVersionConverter {
23 |
24 | public static @NotNull MqttVersion toExtensionSdkVersion(final char version) {
25 | if (version == '3') {
26 | return MqttVersion.V_3_1_1;
27 | } else if (version == '5') {
28 | return MqttVersion.V_5;
29 | }
30 | throw new IllegalArgumentException("version " + version + " can not be converted to MqttVersion object.");
31 | }
32 |
33 | public static @NotNull com.hivemq.client.mqtt.MqttVersion toClientVersion(final char version) {
34 | if (version == '3') {
35 | return com.hivemq.client.mqtt.MqttVersion.MQTT_3_1_1;
36 | } else if (version == '5') {
37 | return com.hivemq.client.mqtt.MqttVersion.MQTT_5_0;
38 | }
39 | throw new IllegalArgumentException("version " + version + " can not be converted to MqttVersion object.");
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/src/systemTest/java/com/hivemq/cli/utils/broker/TlsVersion.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils.broker;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | import java.util.Arrays;
22 | import java.util.List;
23 | import java.util.stream.Collectors;
24 |
25 | public enum TlsVersion {
26 | //SSL_3_0("SSLv3"),
27 | //TLS_1_0("TLSv1"),
28 | //TLS_1_1("TLSv1.1"),
29 | TLS_1_2("TLSv1.2"),
30 | TLS_1_3("TLSv1.3");
31 |
32 | private final @NotNull String tlsString;
33 |
34 | @Override
35 | public @NotNull String toString() {
36 | return tlsString;
37 | }
38 |
39 | TlsVersion(final @NotNull String asString) {
40 | tlsString = asString;
41 | }
42 |
43 | public static @NotNull List supportedAsList() {
44 | return Arrays.stream(TlsVersion.values()).collect(Collectors.toList());
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/systemTest/java/com/hivemq/cli/utils/broker/assertions/DisconnectInformation.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils.broker.assertions;
18 |
19 | import com.hivemq.extension.sdk.api.packets.disconnect.DisconnectPacket;
20 | import org.jetbrains.annotations.NotNull;
21 |
22 | public class DisconnectInformation {
23 |
24 | private final @NotNull DisconnectPacket disconnectPacket;
25 | private final @NotNull String clientId;
26 |
27 | public DisconnectInformation(final @NotNull DisconnectPacket disconnectPacket, final @NotNull String clientId) {
28 | this.disconnectPacket = disconnectPacket;
29 | this.clientId = clientId;
30 | }
31 |
32 | public @NotNull DisconnectPacket getDisconnectPacket() {
33 | return disconnectPacket;
34 | }
35 |
36 | public @NotNull String getClientId() {
37 | return clientId;
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/src/systemTest/java/com/hivemq/cli/utils/exceptions/TimeoutException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils.exceptions;
18 |
19 | import org.jetbrains.annotations.NotNull;
20 |
21 | public class TimeoutException extends Exception {
22 |
23 | private final @NotNull String actualOutput;
24 |
25 | public TimeoutException(final @NotNull Throwable cause, final @NotNull String actualOutput) {
26 | super(cause);
27 | this.actualOutput = actualOutput;
28 | }
29 |
30 | public @NotNull String getActualOutput() {
31 | return actualOutput;
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/systemTest/resources/META-INF/services/org.junit.platform.launcher.TestExecutionListener:
--------------------------------------------------------------------------------
1 | com.hivemq.cli.utils.KillCliTestExecutionListener
2 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/certificateAuthority/ca-keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/certificateAuthority/ca-keystore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/certificateAuthority/ca-keystore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/certificateAuthority/ca-keystore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/certificateAuthority/ca.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/certificateAuthority/ca.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/certificateAuthority/ca.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIC4zCCAcugAwIBAgIEcqEwRzANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
3 | b290LUNBMCAXDTIzMDIxNzEwMjM1N1oYDzMwMjIwNjIwMTAyMzU3WjASMRAwDgYD
4 | VQQDEwdSb290LUNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhqkJ
5 | mgBCcnc3xf2qnJvD3txr8ASAmQMt14FzINmRoOBu9FyPQ9sc1EkfzywTHWBySzYK
6 | sqS2ofk+4aL3j3O3dhBZNngUJS69zF37K72E9NhQss9EiocLzHhDfj1v+xAhDRfe
7 | rLcKgGYSqX0SsRabKD8UGViDc3AHblvScelS4Ohc9NP+QwJJxLqQ7p5cNnh1MGr4
8 | Y6M2kYMFZwcqxQIcx67A9kZlLU6ER909Pg8/Ip+MGPv2xAZp5z7nli+rm6LyUDUg
9 | tP3VXQ4VvZuYT+04dcwuP7NP+N1IZDN6aQA5+XbT16NWZ/KrXFLi+dXJdeObUmDS
10 | gkPsNy3t9GYonwLzlwIDAQABoz8wPTAdBgNVHQ4EFgQUT6Dk80UQ2jayXbtGO6Lk
11 | k6gR0oYwCwYDVR0PBAQDAgKEMA8GA1UdEwQIMAYBAf8CAQMwDQYJKoZIhvcNAQEL
12 | BQADggEBAHFsqy7uJpJGkUCLjb116XsAmJE/1zcParuhBNT/rLCqiA6vYYUiNRd0
13 | qTHzR/M7tSe52gMt6MNaDzPA/MBE30foHL5j+SjD3p8XJF68ReByQCXpj4njwQ6n
14 | EkYSlTplCNNjQ6ivef78T4Tb5RITOn9SRmd+0mUVzFtcetRa+2cafLAgA0XKp4Tv
15 | /EQ/7f9RcGIMaf/Umpum0rax+/omn0yz2G8eURNh13ZgP4/dsw2EXUUCfvQ84TdL
16 | yDuZnxLRieHtAA0h+AMC4t1JHz6QfrDcbP1tptyXbae9LTsCjGZN+SJRQ3Y79dJD
17 | GuyIlVc3tCIMdHH9kqNAe696K242YJo=
18 | -----END CERTIFICATE-----
19 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/certificateAuthority/capath/der/ca.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/certificateAuthority/capath/der/ca.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/certificateAuthority/capath/pem/ca.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIC4zCCAcugAwIBAgIEcqEwRzANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
3 | b290LUNBMCAXDTIzMDIxNzEwMjM1N1oYDzMwMjIwNjIwMTAyMzU3WjASMRAwDgYD
4 | VQQDEwdSb290LUNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhqkJ
5 | mgBCcnc3xf2qnJvD3txr8ASAmQMt14FzINmRoOBu9FyPQ9sc1EkfzywTHWBySzYK
6 | sqS2ofk+4aL3j3O3dhBZNngUJS69zF37K72E9NhQss9EiocLzHhDfj1v+xAhDRfe
7 | rLcKgGYSqX0SsRabKD8UGViDc3AHblvScelS4Ohc9NP+QwJJxLqQ7p5cNnh1MGr4
8 | Y6M2kYMFZwcqxQIcx67A9kZlLU6ER909Pg8/Ip+MGPv2xAZp5z7nli+rm6LyUDUg
9 | tP3VXQ4VvZuYT+04dcwuP7NP+N1IZDN6aQA5+XbT16NWZ/KrXFLi+dXJdeObUmDS
10 | gkPsNy3t9GYonwLzlwIDAQABoz8wPTAdBgNVHQ4EFgQUT6Dk80UQ2jayXbtGO6Lk
11 | k6gR0oYwCwYDVR0PBAQDAgKEMA8GA1UdEwQIMAYBAf8CAQMwDQYJKoZIhvcNAQEL
12 | BQADggEBAHFsqy7uJpJGkUCLjb116XsAmJE/1zcParuhBNT/rLCqiA6vYYUiNRd0
13 | qTHzR/M7tSe52gMt6MNaDzPA/MBE30foHL5j+SjD3p8XJF68ReByQCXpj4njwQ6n
14 | EkYSlTplCNNjQ6ivef78T4Tb5RITOn9SRmd+0mUVzFtcetRa+2cafLAgA0XKp4Tv
15 | /EQ/7f9RcGIMaf/Umpum0rax+/omn0yz2G8eURNh13ZgP4/dsw2EXUUCfvQ84TdL
16 | yDuZnxLRieHtAA0h+AMC4t1JHz6QfrDcbP1tptyXbae9LTsCjGZN+SJRQ3Y79dJD
17 | GuyIlVc3tCIMdHH9kqNAe696K242YJo=
18 | -----END CERTIFICATE-----
19 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-cert.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-cert.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-cert.csr:
--------------------------------------------------------------------------------
1 | -----BEGIN NEW CERTIFICATE REQUEST-----
2 | MIICiTCCAXECAQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B
3 | AQEFAAOCAQ8AMIIBCgKCAQEAnTNYpThOxJW//gMFIQMF5rHxW/Kc84/zdvaQUIC6
4 | 2NMhALBiV8FZzAvVs2bI4hr1PPRAVGJq/uzU5deXvRop6oR6GcDYQoKWtTQoFX+G
5 | So2DExR1oZYScxgLBO7VSMcp0A3dmWQFuh1Kct7g0N1PWQ7QCmxzWZJB2HNHssjC
6 | sBg8oei+q9P3b0LDz/Y7odGIP3OL5+04zN96/i/vzh2KFCc/QyC5yGei7Lm5FhXL
7 | ipqYxvxdt9YXZJHPHhoZL7uKlDBC8cpwc3KrFSjd0wHsEtwN3wbSTyMc3fm+uYFZ
8 | ySvjubU8UzFGiFqUsunvlmTShnQfpKtRB3rhtiVAVrqkWQIDAQABoDAwLgYJKoZI
9 | hvcNAQkOMSEwHzAdBgNVHQ4EFgQU2CeZQWUeUmKyEtyvkEaYWyh9KUwwDQYJKoZI
10 | hvcNAQELBQADggEBAIJy7oJvxLO8tlQPSMaYwS0tW/x7VmBCxiUTGB26QTGy9Joy
11 | y0/X7JmHexzKqSWxTfMFnhiXHgJnECCSNIvzcrW2n6/7DDRLzyENwqsvj5Jec+3H
12 | TffDO9qrDoK/0yLrNhMVSA9AnGV0+aLYK2/deydkBaxT5OJ8UBcqK39cbjnx5+DI
13 | zidTqYoFso+loU96wlMVoTZGh1LkVpKiGDD/iztcl8zM42y6B2Wd7Ow5rZS0btVH
14 | vQKbdgZl2hW+s8kNFrWWpKc5sGAv4CVJ3EcNpSWbFyfByqkH+xXFzfDj0VaVa8ak
15 | TO2+gF9jPVjgz+PXuKBWteQsuf3DqI2uDFm4pfs=
16 | -----END NEW CERTIFICATE REQUEST-----
17 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-cert.pem:
--------------------------------------------------------------------------------
1 | Bag Attributes
2 | friendlyName: client
3 | localKeyID: 54 69 6D 65 20 31 36 37 36 36 32 39 34 34 34 32 32 36
4 | subject=/CN=localhost
5 | issuer=/CN=Root-CA
6 | -----BEGIN CERTIFICATE-----
7 | MIIC6DCCAdCgAwIBAgIEBBKODzANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
8 | b290LUNBMCAXDTIzMDIxNzEwMjQwM1oYDzMwMjIwNjIwMTAyNDAzWjAUMRIwEAYD
9 | VQQDEwlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCd
10 | M1ilOE7Elb/+AwUhAwXmsfFb8pzzj/N29pBQgLrY0yEAsGJXwVnMC9WzZsjiGvU8
11 | 9EBUYmr+7NTl15e9GinqhHoZwNhCgpa1NCgVf4ZKjYMTFHWhlhJzGAsE7tVIxynQ
12 | Dd2ZZAW6HUpy3uDQ3U9ZDtAKbHNZkkHYc0eyyMKwGDyh6L6r0/dvQsPP9juh0Yg/
13 | c4vn7TjM33r+L+/OHYoUJz9DILnIZ6LsubkWFcuKmpjG/F231hdkkc8eGhkvu4qU
14 | MELxynBzcqsVKN3TAewS3A3fBtJPIxzd+b65gVnJK+O5tTxTMUaIWpSy6e+WZNKG
15 | dB+kq1EHeuG2JUBWuqRZAgMBAAGjQjBAMB0GA1UdDgQWBBTYJ5lBZR5SYrIS3K+Q
16 | RphbKH0pTDAfBgNVHSMEGDAWgBRPoOTzRRDaNrJdu0Y7ouSTqBHShjANBgkqhkiG
17 | 9w0BAQsFAAOCAQEAFcGEBtkEfukEn53ivh8ru7msonEmjNMvFo1PtuqwQ231TkO1
18 | rkjbu3eVSTAyBCHKq3tauNnF00m8gFIl0qwlzUuqVWvfanHgRxdROpHBJpsYtKj1
19 | lu/Ss/uDbYl8F0CEZOO4uOnoPEczZwFP58ii9d0puh9mqtAY2fY3q+iX0A6Qpq6V
20 | AIhCsioorsznHMzxSdW1Zf4fUndevthXX85hyYSQW3eqA+gx92y2zbpypoZxmqtO
21 | 5ORt5Ll2NHwidUcH13cN1fQBqHxcj1qwctaOzm85hlWmXFmplNxfGbCOTqYS8QzY
22 | q0q7VxiWcS5kHsK6QZ1ZqEJ3BSmgZxr9GnsEpw==
23 | -----END CERTIFICATE-----
24 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.aes256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs1.aes256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.aes256.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: AES-256-CBC,7261D5A7A4D3746478621C949ECD1727
4 |
5 | fNdmXrdQ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Si+Mdvp+UU1
21 | qxzknWBOhOEHPsxpVpweOCEeTtz5GN9gG8/ovv/WobipTTYdsE7PJT+/Ze2BhgJF
22 | K73g2068dZQfYpxiM6Rm/DjeDdZDJkgfpTXuWlF/1KqB4YeLM9jGhhOl1ZQCet0t
23 | qTwN/lt6z8QMcN0nZb62GBGMix0w44zKcO/1MPVWt9FJXdvpijUrwxf5XDuUlMa7
24 | IViZtynXYWlT4/BaHKE/aW+2V1CDrkXFLUVVlmT0hru1lfl2ECRKBvEWNqvjFUF9
25 | a7esl06l7HK5vgm4ghdU7irKclaL6biRLhaLWihdpKalHfSKD1E8NkYLGDV5shXS
26 | gAq9w93UKtsNumdiR/2L3O8LCQproPfT1CQR2+UuQ4ZeIrQbCMushKBmhuUFtgwc
27 | w8V9+LJfb9vndW1elJwO5DGLubQ95/qUEGSiGnUtDsmYyoRjNe0ctK7AhIOyF+vz
28 | qb7wZPfrmAGQt78Tl5zGAAxkweIy0lSTRJ+mPD4ShGpMo9WnxJ7RjjXhvyHK/TRG
29 | bDb/1346nt+GyqnLKuYqdU5cvW4s7KgOOyU+42IZ9hrQ6eLnWfdp/t6Txecfl8nL
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.camellia256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs1.camellia256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.camellia256.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: CAMELLIA-256-CBC,04AAAEF0643126039D48EA0288CD7EA0
4 |
5 | srtDtRnZAx1pE1Vnfv/GO+aOrT8nVA+AzN/WJdZLcfWOL90+UpxpkVo2zzZBRycD
6 | MupevnpO/U/H8eYt+mIHIAb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GiYUn643gLZio8hk9tdcO2H5vt//yBbrkksQbVC0ZlRhltWlAyIPyQ3s
23 | 8+nUF2Zt8GTO/B5YOg45WQETBWo/FYoUSNem49nEnoMgvxNz3s0FgiG210Q4LvPD
24 | A/cbLxjVqBW4rEzx3dsXdDWs1PUA1CCc2/H9j9TyMINe8AUJ7kH7wDJfMLpVQ3kD
25 | o0pbhVFwiR2ShU4eihRv1U2l6i7o+gF8dt/UCdchPbfed79u/fuG/g0oDGeiIQ4i
26 | uIduHCZJUlS8UJ4yiEvD+8zS54WMvBxnrKcMkTPib0xieHylZGBykCqHo7DDiiN8
27 | yQlIJzU5cXyIQzx3Vp6i84YG+6nZsmiTw6+/f2OFSw4kd5Vl6MVzg9/NnGXeTUP9
28 | 4ibROzMmB6giDNB1BHHxc7e121yOb3QQF6oG1tDbDrtoPsUrzLYVojqMaSeWZv7D
29 | JpDdTVmWD3esYkg3V6peENvR5eUDkWuxEXg0IhXoEA10dCAp9xqDhJq6vQnrHvNr
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.des.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs1.des.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.des.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: DES-CBC,C35E519937CD4EC9
4 |
5 | g2avtHsIE78rnkDvOnysBrdZ2tCQii1qkSzwOXndiZFpBqLUhl1srpqA5S8YKS7R
6 | gQAISYU/YZ5dMOhTep+QKGCsWvNKXXObSQOJ76S6CgvAkCsDxm76pvJb982TsPWI
7 | feTpOAouy8nZ2aQ9/INs9jIVvznxYUwDMvJAXTKnW2CIKltAvU8ZpWgqiTdv9Alf
8 | YtQkMdC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Id06hp
24 | EUxD5m+25X3okYCz5OkBOKfhVlSIR6gsq3xnpWI6Ncx4itLLKjmY3RsssJ6iiIW/
25 | 99d/tWApnXUXyRvaaOPbWjf8rrkXNukdpLqHJAVHlC1DaJV4zePLBbJfRyN2P1U/
26 | ERbbsmDE2/XF/zAhQkLfblLtkfUhnh7DqxkOFPyf3jIyDtn/xNR/NKpQsviH8uQR
27 | 4Zf09W3h9S8xDKjwOqcmtqSmIMuQc19CqA5DPpoRyKPTd76qzwDn+qpCQEku9hs8
28 | 2XVnz+Jia3QHNFfJOkHQvytqrv0rPkShV7KUjZ7c+m4usQjFmaq+DtxJ4rPZIvXQ
29 | UjN/H8xFRAi2sQFvl/6SZPOwsSFAg80WjelYu17tDVh2qAHADAEBHw==
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.des3.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs1.des3.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.des3.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: DES-EDE3-CBC,4B4049B8AC63F2A8
4 |
5 | VumN7c8xpvmGD/tM/+WnHgY8p8UUwGWCh36/GlM/qJXlQ8PPPgjGewaisVcJtfhR
6 | LADsBr/+zwClfCkKMBzj8HLUjZOLg+zpsxJnkN/tkmFI1w3J/QxMCoCtyyFlI+AY
7 | LlozwL2qKKmon51mAn4O0qXnOCefDtpg8W727imzAYy/TqzTjrPQ5SsYFB1UE6bG
8 | AisgenizroZNWnxuT/4zPOQPQk81vDNFZ6yWQ/sH1gjMKvUmDJMevggq+TMEL2Ng
9 | OGv0VM70YCFt/7sBy1CYrpa4SawI/DnckNkR4wkvftefjMnNWkNY2aesz2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9jn/2gCV6MqVWXdlQwXCafSOhzNkez0JR
26 | zVbSed2tC30UaFVgDSOxfrp7Ez+6YXo4XS47m4pNlLrjebEyNfB7eEJuGO2fXMdR
27 | XVI1tgfi7DtgzoMe+NWmnuapNQQYpPJ+S9XuGb/sXX5O35GBkeQIHin2vbKeH9bH
28 | YehWbXN4pIQ7entAU9y/N4lfGIpwZ+M1DvZqaWbo+xEw2+7hKOTh5uo6jE7fpXlM
29 | AhiQ/f2K/ESeflJsZrVcb5N2MVgOsqX14L4S3k/MxIngQxi9EyYuJw==
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.unencrypted.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs1.unencrypted.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs1.unencrypted.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEogIBAAKCAQEAnTNYpThOxJW//gMFIQMF5rHxW/Kc84/zdvaQUIC62NMhALBi
3 | V8FZzAvVs2bI4hr1PPRAVGJq/uzU5deXvRop6oR6GcDYQoKWtTQoFX+GSo2DExR1
4 | oZYScxgLBO7VSMcp0A3dmWQFuh1Kct7g0N1PWQ7QCmxzWZJB2HNHssjCsBg8oei+
5 | q9P3b0LDz/Y7odGIP3OL5+04zN96/i/vzh2KFCc/QyC5yGei7Lm5FhXLipqYxvxd
6 | t9YXZJHPHhoZL7uKlDBC8cpwc3KrFSjd0wHsEtwN3wbSTyMc3fm+uYFZySvjubU8
7 | UzFGiFqUsunvlmTShnQfpKtRB3rhtiVAVrqkWQIDAQABAoIBAAJAmRWM7/v7FUwj
8 | aPBnJa9/fzDNEhifSGK896Zfoc23gLKM1GvjdlDpHn+6ikhLEJZ1/XH4EwZiCE7e
9 | vurTtCQLD+DM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RSbDg+
25 | ZJ3fReDkUEAFWQupz7rdQQNIi2KVcxhKnLbFQayQw1HNBVgBukYBVSk7HhESmaep
26 | J7z9As6Wxx3dVp5LVyy1WzP5t1EOGZFxIp6j6LIYx/uzdTAy43E=
27 | -----END RSA PRIVATE KEY-----
28 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs8.aes256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs8.aes256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs8.camellia256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs8.camellia256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs8.des.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs8.des.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs8.des3.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs8.des3.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-key.pkcs8.unencrypted.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-key.pkcs8.unencrypted.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-keystore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-keystore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-keystore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-keystore.similar_private_key_password.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-keystore.similar_private_key_password.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-keystore.similar_private_key_password.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-keystore.similar_private_key_password.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-truststore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-truststore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/client/client-truststore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/client/client-truststore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca-keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca-keystore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca-keystore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca-keystore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/certificateAuthority/ca.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIC4zCCAcugAwIBAgIEV3AKXzANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
3 | b290LUNBMCAXDTIzMDQyNzEzMjkxOVoYDzMwMjIwODI4MTMyOTE5WjASMRAwDgYD
4 | VQQDEwdSb290LUNBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhtrw
5 | JSThRb8x028kmgf+aPlEGykoasNXo6I4y5UTQGzNeJqs/jrPbJIV/B4gk5DJHoac
6 | suJx7BwK/hx0tycVjtDJiq8aJ7NZ4xfxJPD3qo9XmNteWMa00fn/cEehAq9ZOJjW
7 | 9+7ibj0al2nfzvFRRN+TkpjjdHfZG4iEl4HLLHOBneMhWqbisV1o4xOA+V+5E8Iq
8 | XQb6RFgXEf3LBYrPg2TDt5DTNiDjqaal8NRMs4ImLjetnceAb0t6AiaW7KsuyzAr
9 | OwWbZApK5gNpxtBgMvFY+iijjObkdo/XG0p0+4EvkOOyEVh7tK0cg1WpLsHT8qnS
10 | u1NhZ2sBPPiQ9jtkewIDAQABoz8wPTAdBgNVHQ4EFgQUN+l/yuTON359QOyP0Z+Q
11 | EU1kfPwwCwYDVR0PBAQDAgKEMA8GA1UdEwQIMAYBAf8CAQMwDQYJKoZIhvcNAQEL
12 | BQADggEBADdEtW5zFwmGzTVVukJgLPS/SggXSnFCSMW4QlXiBQKUVkqOOK66acrj
13 | vE7+MnPTtC9f6BtU2wQK3nDCXquRAiEPVAuaZYL4qp8aWBpQUy2hsGUD+/Y+K9Sb
14 | gJ3yglddeviubBg0eVZAQ40jfi4t0nZmfFE28J5JZWY8R9oZjZO0Z4evyU0C8ZHY
15 | 63Ya52xycWRhIyP4PcNs+Q8t+p49F+aOMqdTCG9qb0AsehZTh+g6O6mCVFJOZRhh
16 | CdeX/ltFTRUIeQLCFAZYaADA/uknloYypxLCcqpbQUEw6v1/fuvfF88RxpQ7vKCt
17 | YGcEVmhbxthwjjEqi5fGLK/YdXvDtxY=
18 | -----END CERTIFICATE-----
19 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-cert.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-cert.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-cert.csr:
--------------------------------------------------------------------------------
1 | -----BEGIN NEW CERTIFICATE REQUEST-----
2 | MIICiTCCAXECAQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B
3 | AQEFAAOCAQ8AMIIBCgKCAQEAjojhjBWRLQZNeN/oODzZzz1r4TgzzoXBPvfFVF+3
4 | 4ykn6XLG8X9NEUUodkBp+9CIqflOQ1sGl9O3FLg611vS0hvzPWhgZNT4egEXr1bR
5 | UI6/Qmz+DMH7fYGWGJdYONIeNZJlciS2GV1RPOABZwQyTTKMwVYeT+IoF78MwnUF
6 | 2JbnugdrAxVEErIcIutFthVLPBHbfeHjFRcI5RTbkmJjMtaNzSLCId57zX5Ve1hO
7 | cSfuzWf80tZQPdKwhdqOi55Ze2u7f3K0XTYVawncksF9wNaJYaGaDn19+TpGVOT4
8 | QBRr3IylUXYh+Kou29VTDSbbRMPjkINeSxQI4yHeGLiiHwIDAQABoDAwLgYJKoZI
9 | hvcNAQkOMSEwHzAdBgNVHQ4EFgQUsfrypoAPszLCFt5djsIzTMoCJyIwDQYJKoZI
10 | hvcNAQELBQADggEBAIk0ZyWZ/p5oAF7oHsUiPPdwkMam58W82bwDUcbVWH12DAhf
11 | sLIEZPoGPijEtyQWHGxYKobLeDptUn+5BaIVksJxqL2TV9sSKZhfIiBSHsHHzScc
12 | 4v+ZpySguAi2EeO5i4uqZF9+9nFsvwmSDGBc5GGYzPpA2i6MfpfwFunXgkXg6hDt
13 | YQR9031ksZqknEWXmrp73KyOEFvzV4ULdKNYCRcye5PHdHxSpSTzhM8O33YqGUSp
14 | BRoqsUEYriRSMYOdHa35QO7C7tujPJYTP1hJEmICXpA6er6ncn0GaJdn8py1gkxP
15 | Cef8nnJi0o7djqMuk25pmpBA9C/8kpylFf6AlDg=
16 | -----END NEW CERTIFICATE REQUEST-----
17 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-cert.pem:
--------------------------------------------------------------------------------
1 | Bag Attributes
2 | friendlyName: client
3 | localKeyID: 54 69 6D 65 20 31 36 38 32 36 30 32 31 36 36 31 36 34
4 | subject=/CN=localhost
5 | issuer=/CN=Root-CA
6 | -----BEGIN CERTIFICATE-----
7 | MIIC6DCCAdCgAwIBAgIEZ8SwFTANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
8 | b290LUNBMCAXDTIzMDQyNzEzMjkyNVoYDzMwMjIwODI4MTMyOTI1WjAUMRIwEAYD
9 | VQQDEwlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCO
10 | iOGMFZEtBk143+g4PNnPPWvhODPOhcE+98VUX7fjKSfpcsbxf00RRSh2QGn70Iip
11 | +U5DWwaX07cUuDrXW9LSG/M9aGBk1Ph6ARevVtFQjr9CbP4Mwft9gZYYl1g40h41
12 | kmVyJLYZXVE84AFnBDJNMozBVh5P4igXvwzCdQXYlue6B2sDFUQSshwi60W2FUs8
13 | Edt94eMVFwjlFNuSYmMy1o3NIsIh3nvNflV7WE5xJ+7NZ/zS1lA90rCF2o6Lnll7
14 | a7t/crRdNhVrCdySwX3A1olhoZoOfX35OkZU5PhAFGvcjKVRdiH4qi7b1VMNJttE
15 | w+OQg15LFAjjId4YuKIfAgMBAAGjQjBAMB0GA1UdDgQWBBSx+vKmgA+zMsIW3l2O
16 | wjNMygInIjAfBgNVHSMEGDAWgBQ36X/K5M43fn1A7I/Rn5ARTWR8/DANBgkqhkiG
17 | 9w0BAQsFAAOCAQEADx2fHdLkeqp0wXsAs/JxVvjBFqxhdQLmgfb8ausylcTr39mj
18 | rnyhrt2hjmGnguqaERbRIeYzyOFJrCw5NRhaBGNyQ6qEtBI4B5db8OUOtDEYrcDf
19 | ewYJObkmbsLQL2Ur66CtK3OIMkXEOegB+JilQ3mYkERjIue4RKK1uTBMG1uE5k5R
20 | 6Li2b4a5vwmX4eB2Cja/9G/fpPRn5mg5gjwEiLWoxn+30S28QhggzLKPzWewYCz9
21 | mMdn3oz9eenf/UvuO9doAGhbTf867AcOA1Xv67uTr3hqWJbM/Kk5Y85+FUfpd9e2
22 | rBQrLsqzKERWxMBT1leQetU/Zb1aq2JnbE+hbA==
23 | -----END CERTIFICATE-----
24 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.aes256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.aes256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.aes256.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: AES-256-CBC,04B9E0F9F89D9F9A4065F98782EF6E7B
4 |
5 | 3bJ+enja3APFvGV9zZFT0gy0EfDr5xH1KWd5ECFFEzt2B8ravGMq0I50gZJUwZcl
6 | mTL4gWleLlpvZhlopLKFFBA43/K6gXCEGomqxbFsqkGR+AElEuzicA+ziSACkvvn
7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RYi0/J0
23 | pRRW45NFR061WZggWchcs3K5qEUSuATawF5KzPBa2VGvvEgjY62cY+EJSr68W1me
24 | /eYRSZaUQqn0Yim7lBuqZleJWrwaAB+c+3sZbV0/LLUNUbmkGFazaAmcof2CAvch
25 | xXdqudMbJmT73o0vajYiswt14BpExuU6olGg8OOaaLFdXqwW/qvLwvSSFWsZQDs/
26 | DTKDt3xIrua3BbnRK/iH9CZGG+eiLSCVkOr1pXU+SYaIfRWLr1G6J7WpfLnf4WE2
27 | n/ZPbRVHLIpKiyi+ZPVmnu4VaSiNS9hM5FNFqn4sgpgdEcIR+wAbWRxO0D2Z1+4b
28 | 1oZY3gFUaBeIcnfVOOVmt4AcZ7XtFS8yh9LeiQNxsV1i05z440VbqdKX3QboHunj
29 | O7xwkxF6RKeU+awlavSWKPqx7yysbCANKmVA58I/agpFNtJXSKGtZQEWj6hIv7uF
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.camellia256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.camellia256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.camellia256.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: CAMELLIA-256-CBC,72E96B462008DF026954B3AF18EE5A83
4 |
5 | HaemPQJt9xwiDiq55oiKRkwyi6VSL5Kuk7WnqYP0/F6d4X4tl6Kr2J08ydGtFvZZ
6 | ChBNL1Sa8bFVmJSksbbPCqoWUdHRliW8anC1w+PctUu6X0HOOL2RNhH0H6cE1p78
7 | 808DNzI821MLLRUqUmyNkIvDf29wlE3PFg7IXQZf0Nv8xARY8rLv8RSXS0isJ8tL
8 | lYIM/q31x/s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Oxstw
24 | exzvtJvXndJDq2c95/XurQd0OxVK31N+jyAsdRAAaAfvUCcCUoQGBTQrjRgFINLp
25 | W2FSmyVgHfH05IQrolFTfY5OYWr91LM0zP4KA3Hz3ft6kVXD4QCqNu41FLxkGNE8
26 | aE9oIhQCTglA2xyaIfbaXlYcaNhE4sOaquKmKuNjq0JQp9kH76OsfYInOEYBh5sA
27 | PwczoSAC2VEnV7tu6Y9vOXSo4B9DRc+Y/8dllNhpddKTyQriGIT9vUXsC/p5vwAg
28 | udkvrgMc+3sk56Ph03bUUZZ5UlIhO1coVgeyEUwFQHL84+91czPVxpPpfo+I154x
29 | /JWDU2OKaBuk4V13/hdP98FbvrW2c4sywwU5yk7rZHQRjr2+nFvE38OUAONo3Xmj
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.des.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.des.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.des.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: DES-CBC,829308DC72A5CD2B
4 |
5 | 5xgvwDshJRN8mNRTghMVqK3xsn0/Rn3XHx5spTJRW4DKQJ46GRUsEDo7Z6FASq8M
6 | /stIwhxcMWqSdiIFby6eMlm3pRB8src86Wa6Zy9HpEobPw/lSGBwlzk64gCIyHTk
7 | P3DLtc+ipm8a24shjcWbXLciT8uT0m73jLU13ua0m+vjtiXUklr97FS1pGUIH0tp
8 | gWsNrvVftx0gWry+0jyUWNYCDEKGwdzRHOD5eSgsieBfwkTbXQjjZN56XcRY8MzF
9 | G6j1louvbX/75LpP80hHvd4D1mrShHldWniPKYfVbx5Bfca5+0h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CPokU6SXnTZiqq4+HbaNaBrgGGbBEPojp2pgo
26 | ysUVOwIzOkp1cDfw3VTeJLPHvSV5Ti6xc8izMr9etqLwNocycvCt7HeLkM8uJNmg
27 | Dtj6rR9TdCs8q6wF5yRXXbrkIsB7PYyOw/pGH3CMwximlFEssLQK5DJ/yP/zrMmn
28 | AlA7Oql8cDQxQZ/+dbJrG4pTqNwVfaQ+nHtMYP+Zl9uu2vqlTDPLWeWUn4JV7E/S
29 | AmkmOwG5REG50FYxfLpu90XflnTJSSMgqVd7XFV7JDaLLJzmdtNtaQ==
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.des3.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.des3.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.des3.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | Proc-Type: 4,ENCRYPTED
3 | DEK-Info: DES-EDE3-CBC,EEE2CB91BB3516B4
4 |
5 | RDHNYz708Efibr6oh6HGpuOW+nFNJIENps+jbqwgCpqHQ84LD24sD6tCObvzh7EU
6 | S/dUjJo/qe39CbHwkIDrHe2rs1uidTD84yKh0/Pl8VxqmIVjcJFT1JCRhcMLmbEM
7 | mkh3e8o/8NvoqfHHD98TRHNB94SbmDmPforx6ReFbOl1LmCWMx1ePXFGJzOLmD/q
8 | lFfpX5NsP3I7sq+wU6AaavfkV86iI5NLksz68y5FABDurPraGubBZz9Gd/kmh5UV
9 | DC5v5rvZrcsqaiiseg0VmxtJ6cA/8chRTmpYg9jjXBm94qmMGAW5sQxQTweh+ZgV
10 | EVFuc0uCH8E6Vl9gSQkxTx65+4UH8daZGhWo15WnASIumsfcJsk2cWA04LFSixgS
11 | l6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97AldBIDvo9ulczX
27 | lNhs2YwZEIQw/nyp3AD6H1Y12uS356HdTtNKRsYxH9VPKBCtKMGViZvwOIHxKkms
28 | S4WvxogsT366hCXVzJ7aD2ftJSs0lT9HZGdfGh4XEw4V7hS5pD5eY08M8qXUGkJ8
29 | kmHDgztXdByEyMCnvPMCkTgA3/fb5UOYo6/SPviTjeOn5gYDHYNb2A==
30 | -----END RSA PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.unencrypted.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.unencrypted.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs1.unencrypted.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEowIBAAKCAQEAjojhjBWRLQZNeN/oODzZzz1r4TgzzoXBPvfFVF+34ykn6XLG
3 | 8X9NEUUodkBp+9CIqflOQ1sGl9O3FLg611vS0hvzPWhgZNT4egEXr1bRUI6/Qmz+
4 | DMH7fYGWGJdYONIeNZJlciS2GV1RPOABZwQyTTKMwVYeT+IoF78MwnUF2Jbnugdr
5 | AxVEErIcIutFthVLPBHbfeHjFRcI5RTbkmJjMtaNzSLCId57zX5Ve1hOcSfuzWf8
6 | 0tZQPdKwhdqOi55Ze2u7f3K0XTYVawncksF9wNaJYaGaDn19+TpGVOT4QBRr3Iyl
7 | UXYh+Kou29VTDSbbRMPjkINeSxQI4yHeGLiiHwIDAQABAoIBAC4Rc8TRG7EPvm55
8 | ABddI5Dl6z5J6gSwGnt9nZvdrBORs8KyRDa9zGzui1tdCmRHTESTvYXrn7/mv9/E
9 | g9Ajb4pVWlLYr38njn/wZnVXfCOrX4narGn3MI+qGJcuI2eKEhWCkaNI1kpwbNde
10 | F1Xyd0eYNQI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Lg9xdY5Wfu4gmsYC54HjYtJsJ5eYcFHQlD3CmF4EH2vpwX2AB2Ur
27 | -----END RSA PRIVATE KEY-----
28 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.aes256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.aes256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.camellia256.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.camellia256.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.des.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.des.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.des3.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.des3.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.unencrypted.der:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-key.pkcs8.unencrypted.der
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.similar_private_key_password.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.similar_private_key_password.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.similar_private_key_password.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-keystore.similar_private_key_password.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-truststore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-truststore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/client/client-truststore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/client/client-truststore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server-keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/server/server-keystore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server-keystore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/server/server-keystore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server-truststore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/server/server-truststore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server-truststore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/server/server-truststore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/hierarchyTest/server/server.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server.csr:
--------------------------------------------------------------------------------
1 | -----BEGIN NEW CERTIFICATE REQUEST-----
2 | MIICiTCCAXECAQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B
3 | AQEFAAOCAQ8AMIIBCgKCAQEAi0UMS8RzF36CeWive6H+7u3YaMF3cFNtnHMVIKRT
4 | skFlLyaleZURJgdPj5ONapIz8XGoOWIfyyRQfAu41kcPf6hwh17nvv0/Mp/CPX4I
5 | 9i42Pv9k3AhCiLR+SuK/ys91cp33g0TUR2dzpWVF/EezDZ/nj5Vxeos2GmSTa3tB
6 | M3Nijmu5WIQcSauSPGg4O1+DKr74NakFcRR69nAi2ZlIgoyjmxZxj3I1zZWKNACb
7 | MFFtCFdJMH/gUOBGAJu8qc7zGQGt2Pm0AFIR64uoT8z6ATtbXBW5gd9Jpt+9zZfM
8 | 2ROf4q1BAMiUaMBSudipmJkr5MWA2brbTJRtA7b1I3rbiQIDAQABoDAwLgYJKoZI
9 | hvcNAQkOMSEwHzAdBgNVHQ4EFgQUIXDVMfpSjsOAXBhYdW7DvvM3ZdEwDQYJKoZI
10 | hvcNAQELBQADggEBAAtTStas5+NEkciufFo438v8F1HLCX7G24IPbdbH0AFivZMf
11 | 8gCge9gYZr5lpY+g0xj3Z8V2ajLEY3Oz7CmbPYV8Hk6BSzQazRUqtXiaIoqGxeYh
12 | EarkH1aSpB4o4PFoPKTRLrm6DKM6mL8OWGtcAzxSkCpGWQGoJI3/rVKQe5+Z3JaS
13 | klCt8N2weG2p800W7JUs9KH8/nNyryls2+8vErcos62SCIQy4nPdJ8JaUqVtS3XJ
14 | LshJ6UGiMKT2RYB44kgEgvUoiy052Uun/gWGlZV8ZZLxeJ3VKGN4Ipnbya+ZKqqJ
15 | aN+1Xld8hKezslhQoquBQ8a1usIVhoN4I0mTvHM=
16 | -----END NEW CERTIFICATE REQUEST-----
17 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/hierarchyTest/server/server.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDNTCCAh2gAwIBAgIEdC3ejTANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
3 | b290LUNBMCAXDTIzMDQyNzEzMjkyMloYDzMwMjIwODI4MTMyOTIyWjAUMRIwEAYD
4 | VQQDEwlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCL
5 | RQxLxHMXfoJ5aK97of7u7dhowXdwU22ccxUgpFOyQWUvJqV5lREmB0+Pk41qkjPx
6 | cag5Yh/LJFB8C7jWRw9/qHCHXue+/T8yn8I9fgj2LjY+/2TcCEKItH5K4r/Kz3Vy
7 | nfeDRNRHZ3OlZUX8R7MNn+ePlXF6izYaZJNre0Ezc2KOa7lYhBxJq5I8aDg7X4Mq
8 | vvg1qQVxFHr2cCLZmUiCjKObFnGPcjXNlYo0AJswUW0IV0kwf+BQ4EYAm7ypzvMZ
9 | Aa3Y+bQAUhHri6hPzPoBO1tcFbmB30mm373Nl8zZE5/irUEAyJRowFK52KmYmSvk
10 | xYDZuttMlG0DtvUjetuJAgMBAAGjgY4wgYswHQYDVR0OBBYEFCFw1TH6Uo7DgFwY
11 | WHVuw77zN2XRMAsGA1UdDwQEAwIDuDAdBgNVHREBAf8EEzARgglsb2NhbGhvc3SH
12 | BH8AAAEwHwYDVR0jBBgwFoAUN+l/yuTON359QOyP0Z+QEU1kfPwwHQYDVR0lBBYw
13 | FAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQBdJPyBu+2v
14 | SLPqM/kt36P25wFas6CF3eqZ3UXKJfdE8yb0c55WLvv3txni8YiGdDHZra72DOj5
15 | yS3H2uM2jPc6tWVQsEJGtmXz3Nj1lu0qVhcVFY7K2UXzJGAQ70H9p/bhqCBvDuEt
16 | wEOGWXW/CFTqnPGP93V9OtGiFqUemV6BReYe8Eef35r0yzAvs7L5QmsCINtaiD5D
17 | 2txNy31FthG6H1fOSTxzw043hE0QHLewBLrCinzbi82VwjSgRVeVJ6l7WFXJYUaC
18 | EvSeB2Ej2pNoryCboVm1nCbJV81KX4Gi02HdoyubAit+h4vk3hTaFigw9GGkQYSr
19 | ofbkDvYSbBIn
20 | -----END CERTIFICATE-----
21 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server-keystore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/server/server-keystore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server-keystore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/server/server-keystore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server-truststore.jks:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/server/server-truststore.jks
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server-truststore.p12:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/server/server-truststore.p12
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/systemTest/resources/tls/server/server.cer
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server.csr:
--------------------------------------------------------------------------------
1 | -----BEGIN NEW CERTIFICATE REQUEST-----
2 | MIICiTCCAXECAQAwFDESMBAGA1UEAxMJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B
3 | AQEFAAOCAQ8AMIIBCgKCAQEAsvaLRsDrHyJuAhsVPho8eeUrSRyhKP18N2glx9Q3
4 | ajNPpKtwQrK8+7LMQ4LdKkCOVZuvGagTlwivYTSz5j7NWev9JV2rdYQg+c7ysERI
5 | CXKBGluU9roD/DJClSFDUvslKhj1xAWN2AC2VCZVmf9mgTynNmevTLbmQt7U6VaO
6 | 1zNSC4n+gTOq68+Icx1ePi97m91/Wadoyay07bGDssyxUmlMZVS8vjF1CB9hg/Rm
7 | qG5UoI0UmpgNpLd9gygUb6HYcqicurK8iOEixaAnHA+dlp0995eT6sUwZHRDJ8KK
8 | FNC/5Ao/6tkvm+9FKNFUc/9QYQJjNeXTXnyGeWE3sX9YDQIDAQABoDAwLgYJKoZI
9 | hvcNAQkOMSEwHzAdBgNVHQ4EFgQUFRyAO2aWp0yUXedS6TONsm8/lYgwDQYJKoZI
10 | hvcNAQELBQADggEBAIrjeIRVPYKBDpoWCbRzsXg1uoc5CHlne0Us/fi/jFfQOoVZ
11 | PwxrtckloIcX0xzReQNhu7lQcn/TTXkQLHBNIJ1n4hRmQr5KGUho7U+nLfAcRVGz
12 | 2NA/qhLlfUTpwXsewxPuSvKaoASJiGySPs4jfUfmHvaWUYuhENgQdo3XyocqJV4T
13 | fwbKjWZWpiFNxEHluBsoHLDLv1OtbqrpQI1t2AsKM0pmsecRGwLAXOHFiUy2Bduq
14 | C9I/qJbKXtswvcqFLJ1PUVq4e8RcfK3Ubn2rPfvFF0bRd0PJ1g6CZSwYYiL7dnx9
15 | Gj4nX5ie4VdbuTdAAfRSMLet6WkcCL331evPB5U=
16 | -----END NEW CERTIFICATE REQUEST-----
17 |
--------------------------------------------------------------------------------
/src/systemTest/resources/tls/server/server.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDNTCCAh2gAwIBAgIEBmX20zANBgkqhkiG9w0BAQsFADASMRAwDgYDVQQDEwdS
3 | b290LUNBMCAXDTIzMDIxNzEwMjQwMFoYDzMwMjIwNjIwMTAyNDAwWjAUMRIwEAYD
4 | VQQDEwlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCy
5 | 9otGwOsfIm4CGxU+Gjx55StJHKEo/Xw3aCXH1DdqM0+kq3BCsrz7ssxDgt0qQI5V
6 | m68ZqBOXCK9hNLPmPs1Z6/0lXat1hCD5zvKwREgJcoEaW5T2ugP8MkKVIUNS+yUq
7 | GPXEBY3YALZUJlWZ/2aBPKc2Z69MtuZC3tTpVo7XM1ILif6BM6rrz4hzHV4+L3ub
8 | 3X9Zp2jJrLTtsYOyzLFSaUxlVLy+MXUIH2GD9GaoblSgjRSamA2kt32DKBRvodhy
9 | qJy6sryI4SLFoCccD52WnT33l5PqxTBkdEMnwooU0L/kCj/q2S+b70Uo0VRz/1Bh
10 | AmM15dNefIZ5YTexf1gNAgMBAAGjgY4wgYswHQYDVR0OBBYEFBUcgDtmlqdMlF3n
11 | UukzjbJvP5WIMAsGA1UdDwQEAwIDuDAdBgNVHREBAf8EEzARgglsb2NhbGhvc3SH
12 | BH8AAAEwHwYDVR0jBBgwFoAUT6Dk80UQ2jayXbtGO6Lkk6gR0oYwHQYDVR0lBBYw
13 | FAYIKwYBBQUHAwEGCCsGAQUFBwMCMA0GCSqGSIb3DQEBCwUAA4IBAQBjFvyZABF6
14 | 1oUhQDdyaUNYjX//JGN4iLhDykeOvmFhlSM3+XgkVF6KcFdMESIOQLCw62pQasIn
15 | F4B03YKMdS383Faljz2j5hIpWjwIiq4zlT2BU302+3eqKR0KIr5WddgImS+RGanK
16 | 6nu8wgN2uVgphs4zTVieUkwmW8Qgolp9VbLFpJ3+qc+6aU/Vy8H2l720dEJz4fQd
17 | Qjw6IGhOn7UE/cLZ92PaGp8tTd5jQLfaMigHa1X8YmgH7W51Zd04Bw2/rcoUHvnm
18 | i5EjmBIS0uX96OkxnUtCS0+cRuDDEmhBg0/yI4vqM5zyqMaXf/gyuo3FvDqho1PO
19 | m3WcSjPPyQC5
20 | -----END CERTIFICATE-----
21 |
--------------------------------------------------------------------------------
/src/test/java/com/hivemq/cli/MqttCLIMainTest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 | package com.hivemq.cli;
17 |
18 | import com.hivemq.cli.utils.TestLoggerUtils;
19 | import org.junit.jupiter.api.AfterEach;
20 | import org.junit.jupiter.api.BeforeEach;
21 | import org.junit.jupiter.api.Test;
22 |
23 | import static org.junit.jupiter.api.Assertions.assertEquals;
24 |
25 | class MqttCLIMainTest {
26 |
27 | @BeforeEach
28 | void setUp() {
29 | TestLoggerUtils.resetLogger();
30 | }
31 |
32 | @AfterEach
33 | void tearDown() {
34 | TestLoggerUtils.resetLogger();
35 | }
36 |
37 | @Test
38 | void mqtt_command() {
39 | assertEquals(0, MqttCLIMain.mainWithExitCode());
40 | }
41 |
42 | @Test
43 | void hivemq_command() {
44 | assertEquals(0, MqttCLIMain.mainWithExitCode("hivemq"));
45 | }
46 |
47 | @Test
48 | void hivemq_export_command() {
49 | assertEquals(0, MqttCLIMain.mainWithExitCode("hivemq", "export"));
50 | }
51 |
52 | @Test
53 | void hivemq_export_clients_help_command() {
54 | assertEquals(0, MqttCLIMain.mainWithExitCode("hivemq", "export", "clients", "-h"));
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/src/test/java/com/hivemq/cli/utils/TestLoggerUtils.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2019-present HiveMQ and the HiveMQ Community
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.hivemq.cli.utils;
18 |
19 | import org.tinylog.configuration.Configuration;
20 |
21 | import java.lang.reflect.Field;
22 |
23 | public class TestLoggerUtils {
24 |
25 | /**
26 | * Used to reset the logger after tests
27 | */
28 | public static void resetLogger() {
29 | final Field frozen;
30 | try {
31 | frozen = Configuration.class.getDeclaredField("frozen");
32 | frozen.setAccessible(true);
33 | frozen.set(null, false);
34 | } catch (final NoSuchFieldException | IllegalAccessException e) {
35 | e.printStackTrace();
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/src/test/resources/PasswordFileToByteBufferConverterTest/password_with_multi_new_line.txt:
--------------------------------------------------------------------------------
1 | Z$a8o7PQ3wnoA%=F%Bx*cevXRym44y+NRFWiEA3C
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/test/resources/PasswordFileToByteBufferConverterTest/password_with_new_line.txt:
--------------------------------------------------------------------------------
1 | Z$a8o7PQ3wnoA%=F%Bx*cevXRym44y+NRFWiEA3C
2 |
3 |
--------------------------------------------------------------------------------
/src/test/resources/PasswordFileToByteBufferConverterTest/password_with_single_line.txt:
--------------------------------------------------------------------------------
1 | Z$a8o7PQ3wnoA%=F%Bx*cevXRym44y+NRFWiEA3C
--------------------------------------------------------------------------------
/src/test/resources/PropertyFiles/empty.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/test/resources/PropertyFiles/empty.properties
--------------------------------------------------------------------------------
/src/test/resources/PropertyFiles/override.properties:
--------------------------------------------------------------------------------
1 | mqtt.port=1884
2 | client.id.prefix=testprefix
3 | mqtt.host=broker.hivemq.com
4 | mqtt.version=3
5 | logfile.level=TRACE
6 | logfile.path=some_folder/.mqtt-cli/logs
7 | auth.username=mqtt
8 | auth.password=password
9 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/decrypted_EC_key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN EC PRIVATE KEY-----
2 | MHcCAQEEIH4o32zy3DxO/PDXnA871BYuFO5P4VD5GaVpVttta2E2oAoGCCqGSM49
3 | AwEHoUQDQgAEvjQ+MhBvevBTkp8tnu0UHO+73mNPgLv0OHAe10HnNM8vR5C0uYXp
4 | UW+pe3h/G4hH1su8P3twQA1ovMfUckxbmQ==
5 | -----END EC PRIVATE KEY-----
6 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/decrypted_RSA_key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEowIBAAKCAQEA0PycmJipAjp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LSxlr5zwXbK7dNaB7fK4oi8P+pasCDMf3vsLMCgYEAqiJgB4OUTy/xJwUBiHNF
19 | cCJmbJqX45uysW0Sak9ZQS0KeX8KaGQD9Gf4pimrbSnmG2D9ctvb/2ubpUhO8hqE
20 | nEHHp+P/D/T1delgB1/kZdq7DRFc9y/EjipeIcJAE7+gF/nrjLVvD4J4ylljs98P
21 | za2H3OpDVyI7XmNfR7p4LIECgYBlX+VqQ/Auc71kfQbkJJTesW0+yOa4QqvojLak
22 | /9Yre6fekyGJvA7WovGlk/QVL5iCRy1CaWBJD45Sss9Y8sk7r0Q/KljN2aDmeAGi
23 | o4FnK0XS6KPZT/vhuxJC0gOFN5F84N3kP2OCLw7wsLyQu0e5Oh6nf5zIBW2cuhM0
24 | PD1a7wKBgG+ZRYATKCl67gIrOTRivZgchiqRw8xToYUB3pA4g84lOAa7lH885g8M
25 | adzC3skhRHAKrVZIHbLTn+TrFF4CXdgMUS8nyngUSsWdXKiePjYcVewVbyKR42Lq
26 | rQBO5xLXWxyz2JbHwLzuR6CZY1eNvGxtcnfewFyWUPbA8bF1rh6j
27 | -----END RSA PRIVATE KEY-----
28 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/decrypted_malformed_RSA_key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN RSA PRIVATE KEY-----
2 | MIIEowIBAAKCAQEA0PycmJipAjpeXbwnudMoVFiZ9eiid1FwMgqTbeS49dKQ2EP1
3 | vwKdBZdj0tXsZGvU461E6sCIJ+wwcyNLDDlQUwfsBP/+FBCd7SIKYQO3L1F3LTJw
4 | 1n4Bmp6SGZnAw86Ql7w2ZDO5GjUFhWzjFWZXvZIten/vttlLFKd+ypqCQzisdhs7
5 | juwOiyCG+avGE640hyMVqXXV1k6CRNRk4UzO/Y9RZQ+Yx3t4m8MTI+6OeZNq0tdd
6 | CtEGv3ZaVa9k3S8dcjsZ2+sAVN2LK7aNIykowafUB8GZGIii/rwsFyRBKRGm+5Qc
7 | DX0BYQWmMNaCEX5dwknrtOIRj4QHHkExvNmZ8wIDAQABAoIBAGHgzd7SMOWwPJ4e
8 | D2UCtnK6hHEdoWnMpIVrWp0vcEkBc4E2YxQwvyXtP31xX6OwtSZk8lAYGCzKe+6Q
9 | 6wcwmKQqo6m7013GYpC7Tq0dNmBdAToT07FBlrK57ac70YJjbmkCZ18KsnjJuGpD
10 | Ex/krNdGbTJgVP8IShfEUqfFMZkVSoiY1aYurcP+3dQXokiCNVvluVhbjGigEKsZ
11 | 1P1YCnC1dwH2sgh8QpvMGALHBv59VsMZ1p3edVPLG6algpgd//pvI7wcL88/w+Bc
12 | 16TLH+uBn9eL0gSPn2pYGP7pwK7+V2usnuom06U3fqoh7myTZNvV5nMjiGjJJnk2
13 | MdgwHQECgYEA/COUeZbfB8sdKKmkrnv80v7eXDxeyjHkIHaUlnorAOegW5Eyz/Q3
14 | za2H3OpDVyI7XmNfR7p4LIECgYBlX+VqQ/Auc71kfQbkJJTesW0+yOa4QqvojLak
15 | /9Yre6fekyGJvA7WovGlk/QVL5iCRy1CaWBJD45Sss9Y8sk7r0Q/KljN2aDmeAGi
16 | o4FnK0XS6KPZT/vhuxJC0gOFN5F84N3kP2OCLw7wsLyQu0e5Oh6nf5zIBW2cuhM0
17 | PD1a7wKBgG+ZRYATKCl67gIrOTRivZgchiqRw8xToYUB3pA4g84lOAa7lH885g8M
18 | adzC3skhRHAKrVZIHbLTn+TrFF4CXdgMUS8nyngUSsWdXKiePjYcVewVbyKR42Lq
19 | rQBO5xLXWxyz2JbHwLzuR6CZY1eNvGxtcnfewFyWUPbA8bF1rh6j
20 | -----END RSA PRIVATE KEY-----
21 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/directory_with_certificates/test1.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDezCCAmOgAwIBAgIEJE7MjzANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
3 | bmtub3duMRAwDgYDVQQIEwdVbmtub3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5tPKF7M6LaBQmMghm2/mj+H+ua09p9QyMW8idHHU6LP7O3u
20 | CPFMfS3ObdTP8ObpXBZTUTLbzTeDug0WubhMFv57nQ==
21 | -----END CERTIFICATE-----
22 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/directory_with_certificates/test2.crt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/test/resources/TlsUtil/directory_with_certificates/test2.crt
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/directory_with_certificates/test3.crt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/test/resources/TlsUtil/directory_with_certificates/test3.crt
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/directory_without_certificates/file:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/test/resources/TlsUtil/directory_without_certificates/file
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/directory_without_certificates/file.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/test/resources/TlsUtil/directory_without_certificates/file.txt
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/directory_without_certificates/file.zert:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hivemq/mqtt-cli/f039040491dd8da88bb61d488071afb0a6adc0cf/src/test/resources/TlsUtil/directory_without_certificates/file.zert
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/encrypted_RSA_key.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN ENCRYPTED PRIVATE KEY-----
2 | MIIFHzBJBgkqhkiG9w0BBQ0wPDAbBgkqhkiG9w0BBQwwDgQIvJxhVzsX2asCAggA
3 | MB0GCWCGSAFlAwQBKgQQLWh0Od4Kve7wIO1CR7bB1QSCBNBq2i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ASAA2JO8PYFfZ1ygFr0KcTeUf9/SPz0E
20 | l1oX/LxmWuG0hB0zxLVPJVoN4bN7E6NTyo6cp+GZppCm0CMjxWWN05+v+igVCmIf
21 | VGhhzXxXG1VZYS4DOGlKHFsZKLy/DkvHmnDpio1uMxaAcs48d1BOQWpssbEHD+p9
22 | qPj2LCfv3lal5sr816fBVNeFzb8yI5o/m3YERphg5qu9KgzU4m2tjI+FHhrsk3YE
23 | KDDd7rJRwjW5sokUuONI5MDxSfFJoG2M0Zqsk26WtmT5MQUVI3PvAxLtGZBlJtbb
24 | euujufrUm4hX50JRUNLAtJCL2IRhkhs7T15v6wSfitFWttPAItOK1cO17DUNFfS+
25 | EZLgkdNhFNPW3Lnurd1eciv7angJbhHzGZnCUnJQ8ECOKRGcnnPccLg5RXhiNjMD
26 | DUAeSER/CoAeO5xf7OXIi4qQ6DD/mB4ynUqw/UYBbo0ft0p114ORdlmqmIyLiyOD
27 | UVGhT7ec2s/2c+5hJXxGAKPyyLBjNgulcB+lYS9LIagHj27EEiPG7oAUB1ze7+q2
28 | 2tQRlxZ8UwcyvaRY4pAeFOUwIH6+iA3OvaVPT7bOzfK5woh1HC5Q4SGrAvDeseeU
29 | yOSw5BY6Azvgf2GGoJTaLlT31Q==
30 | -----END ENCRYPTED PRIVATE KEY-----
31 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/invalidCertificate.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDezCCAmOgAwIBAgIEJE7MjzANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
3 | bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
4 | VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
5 | c3QwHhcNMTkwODAyMTMwNDE1WhcNMjAwNzI3MTMwNDE1WjBuMRAwDgYDVQQGEwdV
6 | bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
7 | VQQKEwdVbmtub3duMRAwDvuStEddgjBcLb
8 | IIKpCimo37NebK+MH0rnS+ZCmFIMk7WUcAXBGITOsKsBsjr/L8uAcS5HB3pUnyJC
9 | cMf49vLMd9jf1TPHVrTAeaHoTlxB5wW1jJVKKMuUiPkl+4RSHY+d2Akquz60SC3m
10 | FG9LAgMBAAGjITAfMB0GA1UdDgQWBBQx2mM3epVStYHUE4h06Bn5e8buvTANBgkq
11 | hkiG9w0BAQsFAAOCAQEAZyPNbT19UGSg5xKaxXbBqCTn7HfuA2FBw3+HRPdN1td3
12 | +iCHmXcwG7EhCZbHkHU40F2rmypEWvlHsyxC2+JHzJRUXMPouVV/PcJZJBLUcn5Q
13 | b0hsvjO/MEKqfXFPbCcQYV5Quy/vOy/YSkaBjOPZJt1Wry+T+QHxHBGuvkIImNEb
14 | 9XJ05q8LpGu/bLuXR5eg2ro55+hIKs9ts0Q/d7tX7oIc9so0Bhcirdn/fdTtzgNs
15 | 4o0nm42PF70WPNTrL5tPKF7M6LaBQmMghm2/mj+H+ua09p9QyMW8idHHU6LP7O3u
16 | CPFMfS3ObdTP8ObpXBZTUTLbzTeDug0WubhMFv57nQ==
17 | -----END CERTIFICATE-----
18 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/invalidFileExtensionCertificate.der:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDezCCAmOgAwIBAgIEJE7MjzANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
3 | bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
4 | VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
5 | c3QwHhcNMTkwODAyMTMwNDE1WhcNMjAwNzI3MTMwNDE1WjBuMRAwDgYDVQQGEwdV
6 | bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
7 | VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
8 | c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCuYRaKUQn4gfJoyuOL
9 | RP/w0Z5M/XxaOprNByImi68Wqb3NdVKwn1x6/0iu6MrwMq90398hgKT/d2ILHrZQ
10 | 3KxLKkTRtDxBdUKOoScCrJokW39NpaCvwbE2i1SVwDjICYTy4u+h6jySfOr9oLQY
11 | g4vYriwBQv575fVRtgw2EAFk8ZY/8h5jZIuzHivQakdgKfpa9cMvuStEddgjBcLb
12 | IIKpCimo37NebK+MH0rnS+ZCmFIMk7WUcAXBGITOsKsBsjr/L8uAcS5HB3pUnyJC
13 | cMf49vLMd9jf1TPHVrTAeaHoTlxB5wW1jJVKKMuUiPkl+4RSHY+d2Akquz60SC3m
14 | FG9LAgMBAAGjITAfMB0GA1UdDgQWBBQx2mM3epVStYHUE4h06Bn5e8buvTANBgkq
15 | hkiG9w0BAQsFAAOCAQEAZyPNbT19UGSg5xKaxXbBqCTn7HfuA2FBw3+HRPdN1td3
16 | +iCHmXcwG7EhCZbHkHU40F2rmypEWvlHsyxC2+JHzJRUXMPouVV/PcJZJBLUcn5Q
17 | b0hsvjO/MEKqfXFPbCcQYV5Quy/vOy/YSkaBjOPZJt1Wry+T+QHxHBGuvkIImNEb
18 | 9XJ05q8LpGu/bLuXR5eg2ro55+hIKs9ts0Q/d7tX7oIc9so0Bhcirdn/fdTtzgNs
19 | 4o0nm42PF70WPNTrL5tPKF7M6LaBQmMghm2/mj+H+ua09p9QyMW8idHHU6LP7O3u
20 | CPFMfS3ObdTP8ObpXBZTUTLbzTeDug0WubhMFv57nQ==
21 | -----END CERTIFICATE-----
22 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/noFileExtensionCertificate:
--------------------------------------------------------------------------------
1 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OPZJt1Wry+T+QHxHBGuvkIImNEb
18 | 9XJ05q8LpGu/bLuXR5eg2ro55+hIKs9ts0Q/d7tX7oIc9so0Bhcirdn/fdTtzgNs
19 | 4o0nm42PF70WPNTrL5tPKF7M6LaBQmMghm2/mj+H+ua09p9QyMW8idHHU6LP7O3u
20 | CPFMfS3ObdTP8ObpXBZTUTLbzTeDug0WubhMFv57nQ==
21 | -----END CERTIFICATE-----
22 |
--------------------------------------------------------------------------------
/src/test/resources/TlsUtil/validCertificate.pem:
--------------------------------------------------------------------------------
1 | -----BEGIN CERTIFICATE-----
2 | MIIDezCCAmOgAwIBAgIEJE7MjzANBgkqhkiG9w0BAQsFADBuMRAwDgYDVQQGEwdV
3 | bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
4 | VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
5 | c3QwHhcNMTkwODAyMTMwNDE1WhcNMjAwNzI3MTMwNDE1WjBuMRAwDgYDVQQGEwdV
6 | bmtub3duMRAwDgYDVQQIEwdVbmtub3duMRAwDgYDVQQHEwdVbmtub3duMRAwDgYD
7 | VQQKEwdVbmtub3duMRAwDgYDVQQLEwdVbmtub3duMRIwEAYDVQQDEwlsb2NhbGhv
8 | c3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCuYRaKUQn4gfJoyuOL
9 | RP/w0Z5M/XxaOprNByImi68Wqb3NdVKwn1x6/0iu6MrwMq90398hgKT/d2ILHrZQ
10 | 3KxLKkTRtDxBdUKOoScCrJokW39NpaCvwbE2i1SVwDjICYTy4u+h6jySfOr9oLQY
11 | g4vYriwBQv575fVRtgw2EAFk8ZY/8h5jZIuzHivQakdgKfpa9cMvuStEddgjBcLb
12 | IIKpCimo37NebK+MH0rnS+ZCmFIMk7WUcAXBGITOsKsBsjr/L8uAcS5HB3pUnyJC
13 | cMf49vLMd9jf1TPHVrTAeaHoTlxB5wW1jJVKKMuUiPkl+4RSHY+d2Akquz60SC3m
14 | FG9LAgMBAAGjITAfMB0GA1UdDgQWBBQx2mM3epVStYHUE4h06Bn5e8buvTANBgkq
15 | hkiG9w0BAQsFAAOCAQEAZyPNbT19UGSg5xKaxXbBqCTn7HfuA2FBw3+HRPdN1td3
16 | +iCHmXcwG7EhCZbHkHU40F2rmypEWvlHsyxC2+JHzJRUXMPouVV/PcJZJBLUcn5Q
17 | b0hsvjO/MEKqfXFPbCcQYV5Quy/vOy/YSkaBjOPZJt1Wry+T+QHxHBGuvkIImNEb
18 | 9XJ05q8LpGu/bLuXR5eg2ro55+hIKs9ts0Q/d7tX7oIc9so0Bhcirdn/fdTtzgNs
19 | 4o0nm42PF70WPNTrL5tPKF7M6LaBQmMghm2/mj+H+ua09p9QyMW8idHHU6LP7O3u
20 | CPFMfS3ObdTP8ObpXBZTUTLbzTeDug0WubhMFv57nQ==
21 | -----END CERTIFICATE-----
22 |
--------------------------------------------------------------------------------