@@ -133,6 +133,7 @@ struct arcf_config
133
133
unsigned char * conf_keydata ; /* binary key data */
134
134
size_t conf_keylen ; /* key length */
135
135
int conf_maxhdrsz ; /* max. header size */
136
+ int conf_minkeysz ; /* min. key size */
136
137
struct config * conf_data ; /* configuration data */
137
138
ARC_LIB * conf_libopenarc ; /* shared library instance */
138
139
struct conflist conf_peers ; /* peers hosts */
@@ -1545,6 +1546,9 @@ arcf_config_load(struct config *data,
1545
1546
(void ) config_get (data , "MaximumHeaders" , & conf -> conf_maxhdrsz ,
1546
1547
sizeof conf -> conf_maxhdrsz );
1547
1548
1549
+ config_get (data , "MinimumKeySizeRSA" , & conf -> conf_minkeysz ,
1550
+ sizeof conf -> conf_minkeysz );
1551
+
1548
1552
(void ) config_get (data , "SignHeaders" , & conf -> conf_signhdrs_raw ,
1549
1553
sizeof conf -> conf_signhdrs_raw );
1550
1554
@@ -1919,6 +1923,22 @@ arcf_config_setlib(struct arcf_config *conf, char **err)
1919
1923
return false;
1920
1924
}
1921
1925
1926
+ if (conf -> conf_minkeysz > 0 )
1927
+ {
1928
+ status = arc_options (conf -> conf_libopenarc , ARC_OP_SETOPT ,
1929
+ ARC_OPTS_MINKEYSIZE , & conf -> conf_minkeysz ,
1930
+ sizeof conf -> conf_minkeysz );
1931
+ }
1932
+
1933
+ if (status != ARC_STAT_OK )
1934
+ {
1935
+ if (err != NULL )
1936
+ {
1937
+ * err = "failed to set ARC library options" ;
1938
+ }
1939
+ return false;
1940
+ }
1941
+
1922
1942
if (conf -> conf_testkeys )
1923
1943
{
1924
1944
status = arc_options (conf -> conf_libopenarc , ARC_OP_SETOPT ,
0 commit comments