This information describes the certificate requirements and configuration for a Tomcat based implementation of a Websocket server as it relates to the Zebra Link-OS Multiplatform SDK. The implementation allows Zebra DNA printers running Link-OS ® to connect securely and communicate using the Link-OS Multiplatform SDK.
You will need an SSL certificate in order to establish communications between your Websocket server and a Zebra DNA printer. Although you may request and obtain a Zebra signed certificate, Zebra strongly recommends either creating and using your own self-signed certificates, or obtaining them from a Publicly Trusted Certificate Authority. That provides you with greater flexibility and control of the certificates and ongoing management of them. Zebra is not a trusted certificate authority, so there's no advantage to obtaining a Zebra signed certificate.
The following sections describe the requirements and steps needed to create your own certificates or obtain one from Zebra.
API documentation for the SDK Weblink support is included in the Java API documentation.
More information regarding the Weblink/Websocket protocol can be found in this Application Note. Printer specific information and troubleshooting can be found in the Using Weblink section of the Programming Guide.
This information supersedes what's included in the v2.14.5198 and prior SDK releases due to changes in our certificate signing process and the ability to use self-signed or publicly trusted CA signed certificates.
Prior to Link-OS v4.x, our printers only contained an embedded SHA-1 certificate for weblink connections. Link-OS versions 5.x through 7.1 included both embedded SHA-1 and SHA-256 certificates. SHA-1 support has been removed in Link-OS v7.2 to enhance product security.
If you have an existing application using a Zebra signed SHA-1 certificate for weblink connections, Zebra recommends transitioning to SHA-256 for enhanced security.
Zebra shall only issue SHA-256 signed certificates in accordance with security best practices.
Zebra recommends using your own certificates which require a certificate chain to be deployed to every printer that needs to connect to your server. Security and certificate information related to Zebra printers can be found in our PrintSecure Administration Guide available here.
This support article contains the instructions to create your own self-signed certificates.
Please note the following important information if you wish to use Zebra signed SHA-256 certificates:
In addition, certificate requests must conform to these requirements:
| Acceptable Examples | Unacceptable Examples |
|---|---|
| *.z.mydomain.com | *.mydomain.com |
| *.z.subdomain.mydomain.com | *.subdomain.mydomain.com |
| *.zebra.mydomain.com | |
| *.zebra.subdomain.mydomain.com | |
| *.zserver.mydomain.com | |
| *.zserver.subdomain.mydomain.com |
These are the steps to request a Zebra signed SHA-256 certificate.
set RANDFILE=.rnd
openssl
"/C=xx/ST=yyyyy/L=aaaaa/O=jjjjj/OU=rrrrrr/emailAddress=sssss/CN=uuuuu" -key uuuuu.key -out uuuuu.csr
Where:
xx is the two-digit ISO Country Code
yyyyy is the full State name
aaaaa is the City or town name
jjjjj is the Organization or company name
rrrrrr is the Organizational unit name
sssss is the contact email address for the certificate creator
uuuuu is the full DNS name of the server
RSA Option
Type the following commands followed by Enter:
genrsa -out zserver.abccompanyinc.com.key 2048
req -new -sha256 -subj "/C=US/ST=Illinois/L=Anytown/O=ABC Company Inc/OU=IT Team/emailAddress=John@abccompanyinc.com/CN=zserver.abccompanyinc.com" -key zserver.abccompanyinc.com.key -out zserver.abccompanyinc.com.csr
ECC Option
Type the following commands followed by Enter:
ecparam -out ec_params.pem -name prime256v1
req -new -sha256 -subj "/C=US/ST=Illinois/L=Anytown/O=ABC Company Inc/OU=IT Team/emailAddress=John@abccompanyinc.com/CN=zserver.abccompanyinc.com" -newkey ec:ec_params.pem -keyout zserver.abccompanyinc.com.key -out zserver.abccompanyinc.com.csr -nodes
pkcs12 -export -in zserver.abccompanyinc.com.crt -inkey zserver.abccompanyinc.com.key -out zserver.abccompanyinc.com.p12 -name tomcat -CAfile WeblinkCAChain.crt -caname root –chain
%TOMCAT_INSTALL_LOCATION%\conf
<Service name="Catalina">
...
<Connector connectionTimeout="20000" maxParameterCount="1000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
<Connector
SSLEnabled="true"
compression="on"
defaultSSLHostConfigName="yourServerFQDN"
maxConnections="-1"
maxThreads="150"
port="8443"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https"
secure="true"
socket.soKeepAlive="true"/>
<SSLHostConfig
certificateVerification="optional"
ciphers="ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384"
hostName="yourServerFQDN"
protocols="TLSv1.2"
sessionTimeout="0"
sslProtocol="TLS"
truststoreFile="path/to/myTrustStore"
truststorePassword="myTrustStorePassword"
truststoreType="JKS">
<Certificate
certificateKeystoreFile="/conf/myServerCertificate.p12"
certificateKeystorePassword="theP12password"
certificateKeystoreType="pkcs12"/>
</SSLHostConfig>
</Connector>
...
</Service>
keytool -importcert -file WeblinkCAChain.crt –keystore "%JRE_HOME%\lib\security\cacerts" -alias "ZebraCAChain"