File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 22# Options
33#-----------------------------------------------------------------------------
44option (BUILD_USEFUL_DEMOS "Build useful demos (hashsum)" FALSE )
5- option (BUILD_USABLE_DEMOS "Build usable demos (ltcrypt sizes constants)" FALSE )
5+ option (BUILD_USABLE_DEMOS "Build usable demos (ltcrypt sizes constants pem-info )" FALSE )
66
77#-----------------------------------------------------------------------------
88# Useful demos
@@ -38,7 +38,7 @@ endif()
3838
3939if (BUILD_USABLE_DEMOS)
4040
41- list (APPEND ALL_DEMOS_TARGETS ltcrypt sizes constants)
41+ list (APPEND ALL_DEMOS_TARGETS ltcrypt sizes constants pem-info )
4242
4343 # ltcrypt
4444 add_executable (ltcrypt
@@ -67,6 +67,15 @@ if(BUILD_USABLE_DEMOS)
6767 ${PROJECT_NAME}
6868 )
6969
70+ # pem-info
71+ add_executable (pem-info
72+ ${CMAKE_CURRENT_SOURCE_DIR} /pem-info.c
73+ )
74+
75+ target_link_libraries (pem-info PRIVATE
76+ ${PROJECT_NAME}
77+ )
78+
7079endif ()
7180
7281#-----------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ static const struct {
4949 { cm_none , "none" , },
5050 { cm_cbc , "CBC" , },
5151 { cm_cfb , "CFB" , },
52+ { cm_cfb1 , "CFB1" , },
53+ { cm_cfb8 , "CFB8" , },
5254 { cm_ctr , "CTR" , },
5355 { cm_ofb , "OFB" , },
5456 { cm_stream , "STREAM" , },
@@ -58,7 +60,7 @@ static const struct {
5860static const char * s_map_mode (enum cipher_mode mode )
5961{
6062 size_t n ;
61- mode &= cm_modes ;
63+ mode &= cm_modes | cm_1bit | cm_8bit ;
6264 for (n = 0 ; n < sizeof (cipher_mode_map )/sizeof (cipher_mode_map [0 ]); ++ n ) {
6365 if (cipher_mode_map [n ].mode == mode )
6466 return cipher_mode_map [n ].name ;
You can’t perform that action at this time.
0 commit comments