Generated with:
#!/bin/bash -e
echo "subjectAltName=DNS:dns.com,otherName:2.3.3;UTF8:hello" > SANOtherName.ext
openssl req -new -subj '/CN=OtherName' -days 3650 -newkey rsa:2048 -sha256 -nodes -keyout SANOtherName.key -out SANOtherName.csr
if ! [ -f "root.key" ]; then
	echo "Generating self-signed root signer"
	openssl req -new -x509 -subj "//CN=TestRoot" -days 3650 -newkey rsa:2048 -sha256 -nodes -keyout root.key -out root.cer
fi
openssl x509 -req -CA root.cer -CAkey root.key -CAcreateserial -in SANOtherName.csr -out SANOtherName.cer -days 3650 -extfile SANOtherName.ext
openssl x509 -text < SANOtherName.cer > SANOtherName.pem

Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            f7:f4:00:77:18:1b:21:f6
    Signature Algorithm: sha256WithRSAEncryption
        Issuer: CN=TestRoot
        Validity
            Not Before: Mar 14 19:20:13 2018 GMT
            Not After : Mar 11 19:20:13 2028 GMT
        Subject: CN=OtherName
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                Public-Key: (2048 bit)
                Modulus:
                    00:bd:a4:07:88:60:35:46:fa:05:ef:25:17:9f:32:
                    fc:94:57:4e:62:a9:26:85:49:bb:fb:58:88:5f:ef:
                    54:4a:3a:89:b8:ce:02:f5:e0:a1:61:08:24:67:6a:
                    ca:b1:df:17:90:2e:20:2e:64:63:6d:17:88:b7:8b:
                    c6:e7:f2:01:1d:c5:64:25:87:e5:a8:3f:ea:a9:4c:
                    eb:1d:39:35:ea:92:71:f3:ae:0f:ad:90:4c:94:ef:
                    93:b3:3f:91:ac:6e:3b:b4:38:fd:0c:e8:0b:e5:a4:
                    b9:5b:b0:0a:e3:9e:1f:19:cc:f8:ef:b8:b7:80:f1:
                    03:98:49:35:05:fd:17:3b:0e:1b:b4:b9:96:f4:22:
                    28:c8:4e:26:25:70:3b:94:9d:e0:45:18:14:e6:42:
                    b0:80:48:50:9e:2d:78:5b:bf:50:55:e1:03:0f:c2:
                    20:b8:ef:b4:1a:88:12:10:a6:29:c8:f4:02:e6:24:
                    09:a8:31:d3:e8:4c:81:b5:17:7c:67:6c:12:51:9d:
                    56:95:47:ef:57:a7:a0:b1:15:ba:db:be:07:ea:d6:
                    b9:2d:a7:3e:75:e8:29:4d:c1:a3:5d:ab:39:ed:3a:
                    a8:29:87:e3:43:35:83:04:f1:4f:d5:2b:0c:3b:24:
                    b5:71:b1:ab:5d:e1:3c:5d:e2:4e:84:b8:a7:0b:e7:
                    a4:bb
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Subject Alternative Name: 
                DNS:dns.com, othername:<unsupported>
    Signature Algorithm: sha256WithRSAEncryption
         62:af:d3:2c:de:e6:23:95:e7:d0:34:7c:bf:06:67:15:b2:b5:
         ca:ed:ef:0f:2a:4e:7c:a8:03:1d:1f:3f:a0:87:73:58:c1:6f:
         b5:be:d5:e7:fc:72:35:3d:39:99:c2:51:98:8d:7c:78:97:7c:
         e3:1f:f7:89:26:25:7b:1a:06:be:1a:cb:df:7d:3b:aa:76:65:
         8c:92:af:82:e5:b1:58:4a:ae:e5:15:50:63:7d:f2:34:4c:3c:
         cc:c0:3f:2d:56:50:1a:ce:2d:c5:7c:37:fb:af:55:bc:c7:a8:
         1e:5f:10:3f:01:a5:94:dc:7e:69:dd:9f:80:b4:21:6f:74:62:
         8e:be:05:95:8d:85:e2:7e:ad:df:47:a2:01:61:7b:47:75:a1:
         87:6c:12:bf:03:19:60:60:d0:fd:f7:f3:46:f3:f8:8a:5b:18:
         76:b0:94:05:6b:95:d7:b8:54:ad:96:a9:5d:e2:58:21:a7:43:
         38:91:1d:0d:e1:93:1d:c7:38:7a:c5:05:94:e0:ae:a5:9e:32:
         fc:0e:a4:58:4d:40:15:ac:29:2e:95:d7:8e:d8:70:31:98:79:
         fa:1f:2f:74:03:a2:94:38:a6:a5:0c:d1:91:f5:77:4e:4e:64:
         e1:40:9e:5b:c1:8a:87:62:74:19:ca:51:9f:3a:20:cf:33:32:
         5c:d7:bf:0f
-----BEGI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