Disable TLS 1.0 from Windows server - ssl

How to disable TLS 1.0 from Windows server 2016?
I tried modifying windows registry. But it didn't work.

Use the reg settings below.
Hive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Server
Value name Enabled
Value type REG_DWORD
Value data 0x0 (0)
Hive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server
Value name DisabledByDefault
Value type REG_DWORD
Value data 0x1 (1)
Hive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client
Value name Enabled
Value type REG_DWORD
Value data 0x0 (0)
Hive HKEY_LOCAL_MACHINE
Key path SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client
Value name DisabledByDefault
Value type REG_DWORD
Value data 0x1 (1)

Related

Can't export sqlite to json because the json option disappeared?

I'm trying to export specific columns of my sqlite database into json.
I found a question relevant to my issue here: Impossible to export SQLite query results to JSON?
Where they used the sqlite3 -json option to solve their problem and export their sqlite database to json.
However, when I try to do the same terminal command I get this in return:
sqlite3: Error: unknown option: -json
and sqlite3 -help returns the following list of options:
-append append the database to the end of the file
-ascii set output mode to 'ascii'
-bail stop after hitting an error
-batch force batch I/O
-column set output mode to 'column'
-cmd COMMAND run "COMMAND" before reading stdin
-csv set output mode to 'csv'
-deserialize open the database using sqlite3_deserialize()
-echo print commands before execution
-init FILENAME read/process named file
-[no]header turn headers on or off
-help show this message
-html set output mode to HTML
-interactive force interactive I/O
-line set output mode to 'line'
-list set output mode to 'list'
-lookaside SIZE N use N entries of SZ bytes for lookaside memory
-maxsize N maximum size for a --deserialize database
-memtrace trace all memory allocations and deallocations
-newline SEP set output row separator. Default: '\n'
-nullvalue TEXT set text string for NULL values. Default ''
-pagecache SIZE N use N slots of SZ bytes each for page cache memory
-quote set output mode to 'quote'
-readonly open the database read-only
-separator SEP set output column separator. Default: '|'
-stats print memory stats before each finalize
-version show SQLite version
-vfs NAME use NAME as the default VFS
json is nowhere to be found. Very strange, because the documentation shows the following:
$ sqlite3 --help
Usage: ./sqlite3 [OPTIONS] FILENAME [SQL]
FILENAME is the name of an SQLite database. A new database is created
if the file does not previously exist.
OPTIONS include:
-A ARGS... run ".archive ARGS" and exit
-append append the database to the end of the file
-ascii set output mode to 'ascii'
-bail stop after hitting an error
-batch force batch I/O
-box set output mode to 'box'
-column set output mode to 'column'
-cmd COMMAND run "COMMAND" before reading stdin
-csv set output mode to 'csv'
-deserialize open the database using sqlite3_deserialize()
-echo print commands before execution
-init FILENAME read/process named file
-[no]header turn headers on or off
-help show this message
-html set output mode to HTML
-interactive force interactive I/O
-json set output mode to 'json'
-line set output mode to 'line'
-list set output mode to 'list'
-lookaside SIZE N use N entries of SZ bytes for lookaside memory
-markdown set output mode to 'markdown'
-maxsize N maximum size for a --deserialize database
-memtrace trace all memory allocations and deallocations
-mmap N default mmap size set to N
-newline SEP set output row separator. Default: '\n'
-nofollow refuse to open symbolic links to database files
-nonce STRING set the safe-mode escape nonce
-nullvalue TEXT set text string for NULL values. Default ''
-pagecache SIZE N use N slots of SZ bytes each for page cache memory
-quote set output mode to 'quote'
-readonly open the database read-only
-safe enable safe-mode
-separator SEP set output column separator. Default: '|'
-stats print memory stats before each finalize
-table set output mode to 'table'
-tabs set output mode to 'tabs'
-version show SQLite version
-vfs NAME use NAME as the default VFS
-zip open the file as a ZIP Archive
As you can see, -json is clearly listed as an option (as well as many others that don't show up for me).
What's going on?

Can you get object details using readelf?

I'm looking to get a specific field of a struct from an elf file. I've found the object:
1009b184 0 NOTYPE LOCAL DEFAULT 3 $d
1009b184 8 OBJECT LOCAL DEFAULT 3 __init___device_cros_system_npcx_0
The struct has 2 fields: .init and .device, I want to get the .init field without having to "just know" that it is the first 4 bytes. Is there a way to do this?
Is there a way to do this?
If the file is compiled with debug info, then readelf -wi will print the info needed to reconstruct the type and offsets within the type.
Without debug info: no.

Redis: BUSYKEY Target key name already exists

I am trying to copy a specific set of keys from a Redis instance(v4.0.1) to another instance(v5.0.5). For this I am using MIGRATE command with COPY option:
migrate <ip-address of dest redis> 6379 "" 0 5000 COPY KEYS key_1 key_2 key_3
There are around 500 keys and it may be possible that the some keys are getting repeated and some don't even exist in the source.
I am getting the following error:
(error) ERR Target instance replied with error: BUSYKEY Target key
name already exists.
On the destination instance, I got some of the keys. Is this an error that can be ignored and can I be sure that all the existing keys are migrated?
The MIGRATE command internally uses DUMP to generate the serialized version of the key value, and RESTORE in order to synthesize the key in the target instance.
That error happens when on a RESTORE command the key already exists. If you want to replace existing keys on the targe instance, you should use the REPLACE optional argument. Please revise the full optional arguments here. https://redis.io/commands/migrate#options

TYPO3: SQL error: 'Incorrect integer value: '' for column 'sys_language_uid' at row 1'

I have newly setup TYPO3, but when I try to add/save content, it gives me this error:
SQL error: 'Incorrect integer value: '' for column 'sys_language_uid'
at row 1
The behavior is related to database management systems using strict mode, like MySQL since version 5.7. Disabling strict mode (like provided in the accepted answer) is just a work around.
The real solution would be to explicitly cast values to integer by modifying TCA (table configuration array) for the according field definitions.
for fields of type input that would be setting/extending 'eval' => 'int', see example tt_content.starttime
or in general for all field types it would be to define the default value using 'default' => 0, see example tt_content.sys_language_uid
set this in Localconfiguration.php file
[SYS][setDBinit] = SET SESSION sql_mode=''
For me, after trying different approaches, the solution was:
mysql -u root -p -e "SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION';"
Then, you can verify that the mode is set by running the following:
mysql -u root -p -e "SELECT ##GLOBAL.sql_mode;"
And you should see:
+---------------+------------------------+
| Variable_name | Value |
+---------------+------------------------+
| sql_mode | NO_ENGINE_SUBSTITUTION |
+---------------+------------------------+
In latest TYPO3 Versions you have to add this in LocalConfiguration.php
'setDBinit' => 'SET SESSION sql_mode = \'NO_ENGINE_SUBSTITUTION\';',
In Typo3 9.5/10.4
It you are not able to change the programming of the used extentions - or change the running mode of mysql server - it might be useful to change the mode of the typo3 connection. You can simply add to youre LocalConfiguration.php.
[DB][Connections][Default][initCommands]='SET SESSION sql_mode = \'\';',

Glassfish Message-Driven bean message size

I'm trying to use a message-driven bean in my webapp, but everytime it throws me this exception :
com.sun.messaging.jmq.jmsserver.util.BrokerException: [B4122]: Can not add message 1-127.0.1.1(b0:1a:c1:66:46:a9)-1-1336769823653 to destination PhysicalQueue [Queue]. The message size of 24968685 bytes is larger than the destination individual message byte limit (maxBytesPerMsg) of 10485760 bytes.
After some researches, I've found out that the default limit is -1, so it has to be unlimited.
I've looked everywhere in Glassfish's admin console but withou finding a way to remove this limit.
Even the "new JMS resource" wizard doesn't ask anything about this parameter.
Is there any way to fix it?
Why is your message so large? You might want to reconsider how you're doing this.
....
You can update it via the imqcmd command. The value you want to change is MaxBytesPerMsg.
From the SunGlassFish MessageQueue 4.4 Administration Guide or the 4.2 guide.
Updating Physical Destination Properties
The subcommand imqcmd update dst changes the values of specified properties of a physical
destination:
imqcmd update dst -t destType -n destName
-o property1=value1 [ [-o property2=value2] ... ]
The properties to be updated can include any of those listed in Table 18–1 (with the exception of the isLocalOnly property, which cannot be changed once the destination has been created).
For example, the following command changes the maxBytesPerMsg property of the queue
destination curlyQueue to 1000 and the maxNumMsgs property to 2000:
imqcmd update dst -t q -n curlyQueue -u admin
-o maxBytesPerMsg=1000
-o maxNumMsgs=2000