gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-34


From: Pawel Kot
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-342-g7de9d7a
Date: Sun, 25 Dec 2011 12:26:32 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  7de9d7a93df13453ca42bd786ac01eff4e2c54ee (commit)
       via  aa002eecd63b80791410fad3fd19a57bf2cebb63 (commit)
       via  a6c5ac9b23f07271c6de6107fad78ca5ca2a5480 (commit)
       via  fee38afe185f007f824091c00408c30a58ca825b (commit)
      from  16fb026cdccb036396fef32c1a6f56fe86a13dbc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=7de9d7a93df13453ca42bd786ac01eff4e2c54ee


commit 7de9d7a93df13453ca42bd786ac01eff4e2c54ee
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 25 13:23:58 2011 +0100

    Remove SECURITY option
    
    Remove --enable-security option. All security options (like reading or
    changing PIN) are enabled now unconditionally.

diff --git a/Windows/MSVC2010Express/config.h b/Windows/MSVC2010Express/config.h
index 1231ddf..30ba8c5 100644
--- a/Windows/MSVC2010Express/config.h
+++ b/Windows/MSVC2010Express/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC6/config.h b/Windows/MSVC6/config.h
index b6c9ea6..458c937 100644
--- a/Windows/MSVC6/config.h
+++ b/Windows/MSVC6/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC8/config.h b/Windows/MSVC8/config.h
index 3e6ea03..1da1386 100644
--- a/Windows/MSVC8/config.h
+++ b/Windows/MSVC8/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2005/config.h b/Windows/MSVS2005/config.h
index bd9d2eb..ae614d0 100644
--- a/Windows/MSVS2005/config.h
+++ b/Windows/MSVS2005/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2008/config.h b/Windows/MSVS2008/config.h
index 3cdc8f7..f225f4c 100644
--- a/Windows/MSVS2008/config.h
+++ b/Windows/MSVS2008/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2010/config.h b/Windows/MSVS2010/config.h
index 602c7f1..0514feb 100644
--- a/Windows/MSVS2010/config.h
+++ b/Windows/MSVS2010/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index a706f2e..3a912a3 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -64,9 +64,7 @@ static gn_error ReplyGetSMS(int messagetype, unsigned char 
*buffer, int length,
 /* static gn_error ReplyDeleteSMS(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state); */
 static gn_error ReplyGetCharset(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetSMSCenter(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 static gn_error ReplyGetNetworkInfo(int messagetype, unsigned char *buffer, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetDateTime(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
@@ -102,10 +100,8 @@ static gn_error AT_DeleteSMS(gn_data *data, struct 
gn_statemachine *state);
 static gn_error AT_GetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_SetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetSMSCenter(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error AT_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetNetworkInfo(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_AnswerCall(gn_data *data, struct gn_statemachine *state);
@@ -155,10 +151,8 @@ static at_function_init_type at_function_init[] = {
        { GN_OP_AT_GetCharset,         AT_GetCharset,            
ReplyGetCharset },
        { GN_OP_AT_SetCharset,         AT_SetCharset,            Reply },
        { GN_OP_GetSMSCenter,          AT_GetSMSCenter,          
ReplyGetSMSCenter },
-#ifdef SECURITY
        { GN_OP_GetSecurityCodeStatus, AT_GetSecurityCodeStatus, 
ReplyGetSecurityCodeStatus },
        { GN_OP_EnterSecurityCode,     AT_EnterSecurityCode,     Reply },
-#endif
        { GN_OP_MakeCall,              AT_DialVoice,             Reply },
        { GN_OP_AnswerCall,            AT_AnswerCall,            Reply },
        { GN_OP_CancelCall,            AT_CancelCall,            Reply },
@@ -1542,7 +1536,6 @@ static gn_error AT_GetSMSCenter(gn_data *data, struct 
gn_statemachine *state)
        return sm_block_no_retry(GN_OP_GetSMSCenter, data, state);
 }
 
-#ifdef SECURITY
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        if (sm_message_send(9, GN_OP_GetSecurityCodeStatus, "AT+CPIN?\r", 
state))
@@ -1562,7 +1555,6 @@ static gn_error AT_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *stat
                return GN_ERR_NOTREADY;
        return sm_block_no_retry(GN_OP_EnterSecurityCode, data, state);
 }
-#endif
 
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state)
 {
@@ -2568,7 +2560,6 @@ static gn_error ReplyGetCharset(int messagetype, unsigned 
char *buffer, int leng
        return GN_ERR_FAILED;
 }
 
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state)
 {
        at_line_buffer buf;
@@ -2612,7 +2603,6 @@ static gn_error ReplyGetSecurityCodeStatus(int 
messagetype, unsigned char *buffe
        }
        return GN_ERR_NONE;
 }
-#endif
 
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state)
 {
diff --git a/common/phones/nk6100.c b/common/phones/nk6100.c
index 9b59e1a..1a471fd 100644
--- a/common/phones/nk6100.c
+++ b/common/phones/nk6100.c
@@ -110,13 +110,10 @@ static gn_error get_imei(gn_data *data, struct 
gn_statemachine *state);
 static gn_error get_phone_info(gn_data *data, struct gn_statemachine *state);
 static gn_error get_hw(gn_data *data, struct gn_statemachine *state);
 static gn_error get_ringtone_list(gn_data *data, struct gn_statemachine 
*state);
-
-#ifdef SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error ChangeSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error get_security_code(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error IncomingPhoneInfo(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingPhoneInfo2(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
@@ -134,10 +131,7 @@ static gn_error IncomingCallInfo(int messagetype, unsigned 
char *message, int le
 static gn_error IncomingRLPFrame(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingKey(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingMisc(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
-
-#ifdef SECURITY
 static gn_error IncomingSecurityCode(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int get_memory_type(gn_memory_type memory_type);
 static void FlushLostSMSNotifications(struct gn_statemachine *state);
@@ -149,9 +143,7 @@ static gn_incoming_function_type 
nk6100_incoming_functions[] = {
        { 0x04, IncomingPhoneStatus },
        { 0x05, IncomingProfile },
        { 0x06, pnok_call_divert_incoming },
-#ifdef SECURITY
        { 0x08, IncomingSecurityCode },
-#endif
        { 0x0a, IncomingNetworkInfo },
        { 0x0c, IncomingKey },
        { 0x0d, IncomingDisplay },
@@ -322,7 +314,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return SendRLPFrame(data, state);
        case GN_OP_SetRLPRXCallback:
                return SetRLPRXCallback(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
@@ -331,7 +322,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return ChangeSecurityCode(data, state);
        case GN_OP_GetSecurityCode:
                return get_security_code(data, state);
-#endif
        case GN_OP_GetLocksInfo:
                return pnok_get_locks_info(data, state);
        case GN_OP_SendDTMF:
@@ -3104,7 +3094,6 @@ static gn_error get_hw(gn_data *data, struct 
gn_statemachine *state)
        return sm_block(0x40, data, state);
 }
 
-#ifdef  SECURITY
 static gn_error get_security_code(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[] = {0x00, 0x01, 0x6e, 0x01};
@@ -3119,7 +3108,6 @@ static gn_error get_security_code(gn_data *data, struct 
gn_statemachine *state)
        if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY;
        return sm_block(0x40, data, state);
 }
-#endif
 
 static gn_error IncomingSecurity(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state)
 {
@@ -3134,7 +3122,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                }
                break;
 
-#ifdef SECURITY
        /* get security code */
        case 0x6e:
                if (message[4] != 0x01) return GN_ERR_UNKNOWN;
@@ -3143,7 +3130,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                        snprintf(data->security_code->code, 
sizeof(data->security_code->code), "%s", message + 5);
                }
                break;
-#endif
 
        /* Get bin ringtone */
        case 0x9e:
@@ -3670,8 +3656,6 @@ static gn_error IncomingRLPFrame(int messagetype, 
unsigned char *message, int le
        return GN_ERR_NONE;
 }
 
-
-#ifdef  SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[32] = {FBUS_FRAME_HEADER, 0x0a};
@@ -3779,8 +3763,6 @@ static gn_error IncomingSecurityCode(int messagetype, 
unsigned char *message, in
 
        return GN_ERR_NONE;
 }
-#endif
-
 
 static gn_error PressOrReleaseKey1(bool press, gn_data *data, struct 
gn_statemachine *state)
 {
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 7ec01eb..c30ddbc 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -266,10 +266,8 @@ static gn_error NK6510_DeleteFile(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_DeleteFileById(gn_data *data, struct gn_statemachine 
*state);
 static gn_error NK6510_GetFileDetailsById(gn_data *data, struct 
gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_GetSecurityCodeStatus(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error NK6510_GetToDo(gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_DeleteAllToDoLocations(gn_data *data, struct 
gn_statemachine *state);
@@ -296,9 +294,7 @@ static gn_error NK6510_IncomingReset(int messagetype, 
unsigned char *message, in
 static gn_error NK6510_IncomingRadio(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_IncomingFile(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_IncomingSecurity(int messagetype, unsigned char 
*message, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int sms_encode(gn_data *data, struct gn_statemachine *state, unsigned 
char *req);
 static int get_memory_type(gn_memory_type memory_type);
@@ -320,9 +316,7 @@ static gn_incoming_function_type 
nk6510_incoming_functions[] = {
        { NK6510_MSG_PROFILE,    NK6510_IncomingProfile },
        { NK6510_MSG_RINGTONE,  NK6510_IncomingRingtone },
        { NK6510_MSG_KEYPRESS,  NK6510_IncomingKeypress },
-#ifdef  SECURITY
        { NK6510_MSG_SECURITY,  NK6510_IncomingSecurity },
-#endif
        { NK6510_MSG_SUBSCRIBE, NK6510_IncomingSubscribe },
        { NK6510_MSG_COMMSTATUS,        NK6510_IncomingCommStatus },
        { NK6510_MSG_WAP,       NK6510_IncomingWAP },
@@ -479,12 +473,10 @@ static gn_error NK6510_Functions(gn_operation op, gn_data 
*data, struct gn_state
                return NK6510_CancelCall(data, state);
        case GN_OP_AnswerCall:
                return NK6510_AnswerCall(data, state);
-#ifdef  SECURITY
        case GN_OP_GetSecurityCodeStatus:
                return NK6510_GetSecurityCodeStatus(data, state);
        case GN_OP_EnterSecurityCode:
                return NK6510_EnterSecurityCode(data, state);
-#endif
        case GN_OP_Subscribe:
                return NK6510_Subscribe(data, state);
        case GN_OP_GetRawRingtone:
@@ -5250,7 +5242,6 @@ static gn_error NK6510_PressOrReleaseKey(gn_data *data, 
struct gn_statemachine *
        SEND_MESSAGE_BLOCK(NK6510_MSG_KEYPRESS, 10);
 }
 
-#ifdef  SECURITY
 /*****************/
 /*** SECURITY  ***/
 /*****************/
@@ -5359,7 +5350,6 @@ static gn_error NK6510_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *
 
        SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 6 + len);
 }
-#endif
 
 /*****************/
 /*** SUBSCRIBE ***/
diff --git a/common/phones/pcsc.c b/common/phones/pcsc.c
index 4d2fe0d..9887c5d 100644
--- a/common/phones/pcsc.c
+++ b/common/phones/pcsc.c
@@ -35,10 +35,8 @@ static gn_error Initialise(struct gn_statemachine *state);
 static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error Terminate(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error functions(gn_operation op, gn_data *data, struct 
gn_statemachine *state);
 
 /* prototypes for functions related to libpcsclite */
@@ -57,9 +55,7 @@ static LONG pcsc_read_file(PCSC_IOSTRUCT *ios, LONG dir_id, 
LONG file_id);
 static LONG pcsc_read_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record);
 static LONG pcsc_stat_file(PCSC_IOSTRUCT *ios, LONG file_id);
 static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record, BYTE *data, BYTE length);
-#ifdef SECURITY
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len);
-#endif
 
 /* prototypes for functions converting between the two libraries */
 
@@ -470,12 +466,10 @@ static gn_error functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return DeletePhonebook(data, state);
        case GN_OP_GetFile:
                return GetFile(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
                return GetSecurityCodeStatus(data, state);
-#endif
        default:
                return GN_ERR_NOTIMPLEMENTED;
        }
@@ -1048,8 +1042,6 @@ static gn_error DeletePhonebook(gn_data *data, struct 
gn_statemachine *state)
        return get_gn_error(&IoStruct, ret);
 }
 
-#ifdef SECURITY
-
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        LONG ret;
@@ -1120,8 +1112,6 @@ static gn_error EnterSecurityCode(gn_data *data, struct 
gn_statemachine *state)
        return error;
 }
 
-#endif /* SECURITY */
-
 
 /* functions for libpcsc stuff */
 
@@ -1432,8 +1422,6 @@ static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, 
LONG file_id, BYTE recor
        return ret;
 }
 
-#ifdef SECURITY
-
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len)
 {
        LONG ret = SCARD_S_SUCCESS;
@@ -1452,8 +1440,6 @@ static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE 
chv_id, BYTE *chv, BYTE chv
        return ret;
 }
 
-#endif /* SECURITY */
-
 static LONG pcsc_close_reader()
 {
 /* disconnect from reader */
diff --git a/configure.in b/configure.in
index 633b5fa..ab0bb50 100644
--- a/configure.in
+++ b/configure.in
@@ -780,17 +780,6 @@ AM_CONDITIONAL(HAVE_MYSQL, test "x$have_mysql" = "xyes")
 
 dnl ======================== Additional switches
 
-AC_ARG_ENABLE(security,
-   [  --enable-security       enable all security features @<:@default=no@:>@],
-   [ if test x$enable_security = xyes; then
-       AC_DEFINE(SECURITY, 1, [Whether security features are enabled])
-       security="yes"
-     else
-       security="no"
-     fi ],
-   [ security="no" ]
-)
-
 dnl ======================== Checks for libpcsclite
 USE_LIBPCSCLITE="no"
 AC_ARG_ENABLE(libpcsclite,
@@ -1115,7 +1104,6 @@ echo "
     phonet support:     $USE_SOCKETPHONET
     libpcsclite support:$USE_LIBPCSCLITE
     readline support:   $USE_READLINE
-    Security:           $security
     Build Shared Lib:   $enable_shared
     Build Static Lib:   $enable_static
     Windows:            $win32 
diff --git a/gnokii/gnokii-app.h b/gnokii/gnokii-app.h
index 88c1f36..d704a6c 100644
--- a/gnokii/gnokii-app.h
+++ b/gnokii/gnokii-app.h
@@ -182,13 +182,11 @@ extern void security_usage(FILE *f);
 extern gn_error identify(struct gn_statemachine *state);
 extern gn_error getlocksinfo(gn_data *data, struct gn_statemachine *state);
 extern gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 extern int entersecuritycode_usage(FILE *f, int exitval);
 extern gn_error entersecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
 extern gn_error getsecuritycodestatus(gn_data *data, struct gn_statemachine 
*state);
 extern int changesecuritycode_usage(FILE *f, int exitval);
 extern gn_error changesecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
-#endif
 
 /* File options */
 extern void file_usage(FILE *f);
diff --git a/gnokii/gnokii-security.c b/gnokii/gnokii-security.c
index c460d70..b08bace 100644
--- a/gnokii/gnokii-security.c
+++ b/gnokii/gnokii-security.c
@@ -43,15 +43,11 @@ void security_usage(FILE *f)
                     "Security options:\n"
                     "          --identify\n"
                     "          --getlocksinfo\n"
-               ));
-#ifdef SECURITY
-       fprintf(f, _(
                     "          --entersecuritycode PIN|PIN2|PUK|PUK2|SEC 
[COMMAND]\n"
                     "          --getsecuritycodestatus\n"
                     "          --getsecuritycode\n"
                     "          --changesecuritycode PIN|PIN2|PUK|PUK2\n"
                ));
-#endif
 }
 
 gn_error identify(struct gn_statemachine *state)
@@ -91,8 +87,6 @@ gn_error getlocksinfo(gn_data *data, struct gn_statemachine 
*state)
        return GN_ERR_NONE;
 }
 
-#ifdef SECURITY
-
 gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state)
 {
        gn_error error;
@@ -285,5 +279,3 @@ gn_error changesecuritycode(char *type, gn_data *data, 
struct gn_statemachine *s
 
        return error;
 }
-
-#endif
diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c
index b4f5c82..035d627 100644
--- a/gnokii/gnokii.c
+++ b/gnokii/gnokii.c
@@ -468,11 +468,10 @@ static int parse_options(int argc, char *argv[])
 
                /* Alternate config file location */
                { "config",             required_argument, NULL, OPT_CONFIGFILE 
},
+
                /* Alternate phone section from the config */
                { "phone",              required_argument, NULL, 
OPT_CONFIGMODEL },
 
-#ifdef SECURITY
-
                /* Get Security Code */
                { "getsecuritycode",    no_argument,       NULL, 
OPT_GETSECURITYCODE },
 
@@ -485,8 +484,6 @@ static int parse_options(int argc, char *argv[])
                /* Change Security Code */
                { "changesecuritycode", required_argument, NULL, 
OPT_CHANGESECURITYCODE },
 
-#endif
-
                /* Set date and time */
                { "setdatetime",        optional_argument, NULL, 
OPT_SETDATETIME },
 
@@ -721,10 +718,8 @@ static int parse_options(int argc, char *argv[])
                { OPT_HELP,              1, 100, 0 },
                { OPT_CONFIGFILE,        1, 100, 0 },
                { OPT_CONFIGMODEL,       1, 100, 0 },
-#ifdef SECURITY
                { OPT_ENTERSECURITYCODE, 1, 100, 0 },
                { OPT_CHANGESECURITYCODE,1, 1, 0 },
-#endif
                { OPT_SETDATETIME,       0, 5, 0 },
                { OPT_SETALARM,          0, 2, 0 },
                { OPT_DIALVOICE,         1, 1, 0 },
@@ -1049,7 +1044,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_GETLOCKSINFO:
                rc = getlocksinfo(data, state);
                break;
-#ifdef SECURITY
        case OPT_GETSECURITYCODE:
                rc = getsecuritycode(data, state);
                break;
@@ -1064,7 +1058,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_CHANGESECURITYCODE:
                rc = changesecuritycode(optarg, data, state);
                        break;
-#endif
 
        /* File options */
        case OPT_GETFILELIST:

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=aa002eecd63b80791410fad3fd19a57bf2cebb63


commit 7de9d7a93df13453ca42bd786ac01eff4e2c54ee
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 25 13:23:58 2011 +0100

    Remove SECURITY option
    
    Remove --enable-security option. All security options (like reading or
    changing PIN) are enabled now unconditionally.

diff --git a/Windows/MSVC2010Express/config.h b/Windows/MSVC2010Express/config.h
index 1231ddf..30ba8c5 100644
--- a/Windows/MSVC2010Express/config.h
+++ b/Windows/MSVC2010Express/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC6/config.h b/Windows/MSVC6/config.h
index b6c9ea6..458c937 100644
--- a/Windows/MSVC6/config.h
+++ b/Windows/MSVC6/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC8/config.h b/Windows/MSVC8/config.h
index 3e6ea03..1da1386 100644
--- a/Windows/MSVC8/config.h
+++ b/Windows/MSVC8/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2005/config.h b/Windows/MSVS2005/config.h
index bd9d2eb..ae614d0 100644
--- a/Windows/MSVS2005/config.h
+++ b/Windows/MSVS2005/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2008/config.h b/Windows/MSVS2008/config.h
index 3cdc8f7..f225f4c 100644
--- a/Windows/MSVS2008/config.h
+++ b/Windows/MSVS2008/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2010/config.h b/Windows/MSVS2010/config.h
index 602c7f1..0514feb 100644
--- a/Windows/MSVS2010/config.h
+++ b/Windows/MSVS2010/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index a706f2e..3a912a3 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -64,9 +64,7 @@ static gn_error ReplyGetSMS(int messagetype, unsigned char 
*buffer, int length,
 /* static gn_error ReplyDeleteSMS(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state); */
 static gn_error ReplyGetCharset(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetSMSCenter(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 static gn_error ReplyGetNetworkInfo(int messagetype, unsigned char *buffer, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetDateTime(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
@@ -102,10 +100,8 @@ static gn_error AT_DeleteSMS(gn_data *data, struct 
gn_statemachine *state);
 static gn_error AT_GetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_SetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetSMSCenter(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error AT_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetNetworkInfo(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_AnswerCall(gn_data *data, struct gn_statemachine *state);
@@ -155,10 +151,8 @@ static at_function_init_type at_function_init[] = {
        { GN_OP_AT_GetCharset,         AT_GetCharset,            
ReplyGetCharset },
        { GN_OP_AT_SetCharset,         AT_SetCharset,            Reply },
        { GN_OP_GetSMSCenter,          AT_GetSMSCenter,          
ReplyGetSMSCenter },
-#ifdef SECURITY
        { GN_OP_GetSecurityCodeStatus, AT_GetSecurityCodeStatus, 
ReplyGetSecurityCodeStatus },
        { GN_OP_EnterSecurityCode,     AT_EnterSecurityCode,     Reply },
-#endif
        { GN_OP_MakeCall,              AT_DialVoice,             Reply },
        { GN_OP_AnswerCall,            AT_AnswerCall,            Reply },
        { GN_OP_CancelCall,            AT_CancelCall,            Reply },
@@ -1542,7 +1536,6 @@ static gn_error AT_GetSMSCenter(gn_data *data, struct 
gn_statemachine *state)
        return sm_block_no_retry(GN_OP_GetSMSCenter, data, state);
 }
 
-#ifdef SECURITY
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        if (sm_message_send(9, GN_OP_GetSecurityCodeStatus, "AT+CPIN?\r", 
state))
@@ -1562,7 +1555,6 @@ static gn_error AT_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *stat
                return GN_ERR_NOTREADY;
        return sm_block_no_retry(GN_OP_EnterSecurityCode, data, state);
 }
-#endif
 
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state)
 {
@@ -2568,7 +2560,6 @@ static gn_error ReplyGetCharset(int messagetype, unsigned 
char *buffer, int leng
        return GN_ERR_FAILED;
 }
 
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state)
 {
        at_line_buffer buf;
@@ -2612,7 +2603,6 @@ static gn_error ReplyGetSecurityCodeStatus(int 
messagetype, unsigned char *buffe
        }
        return GN_ERR_NONE;
 }
-#endif
 
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state)
 {
diff --git a/common/phones/nk6100.c b/common/phones/nk6100.c
index 9b59e1a..1a471fd 100644
--- a/common/phones/nk6100.c
+++ b/common/phones/nk6100.c
@@ -110,13 +110,10 @@ static gn_error get_imei(gn_data *data, struct 
gn_statemachine *state);
 static gn_error get_phone_info(gn_data *data, struct gn_statemachine *state);
 static gn_error get_hw(gn_data *data, struct gn_statemachine *state);
 static gn_error get_ringtone_list(gn_data *data, struct gn_statemachine 
*state);
-
-#ifdef SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error ChangeSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error get_security_code(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error IncomingPhoneInfo(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingPhoneInfo2(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
@@ -134,10 +131,7 @@ static gn_error IncomingCallInfo(int messagetype, unsigned 
char *message, int le
 static gn_error IncomingRLPFrame(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingKey(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingMisc(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
-
-#ifdef SECURITY
 static gn_error IncomingSecurityCode(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int get_memory_type(gn_memory_type memory_type);
 static void FlushLostSMSNotifications(struct gn_statemachine *state);
@@ -149,9 +143,7 @@ static gn_incoming_function_type 
nk6100_incoming_functions[] = {
        { 0x04, IncomingPhoneStatus },
        { 0x05, IncomingProfile },
        { 0x06, pnok_call_divert_incoming },
-#ifdef SECURITY
        { 0x08, IncomingSecurityCode },
-#endif
        { 0x0a, IncomingNetworkInfo },
        { 0x0c, IncomingKey },
        { 0x0d, IncomingDisplay },
@@ -322,7 +314,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return SendRLPFrame(data, state);
        case GN_OP_SetRLPRXCallback:
                return SetRLPRXCallback(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
@@ -331,7 +322,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return ChangeSecurityCode(data, state);
        case GN_OP_GetSecurityCode:
                return get_security_code(data, state);
-#endif
        case GN_OP_GetLocksInfo:
                return pnok_get_locks_info(data, state);
        case GN_OP_SendDTMF:
@@ -3104,7 +3094,6 @@ static gn_error get_hw(gn_data *data, struct 
gn_statemachine *state)
        return sm_block(0x40, data, state);
 }
 
-#ifdef  SECURITY
 static gn_error get_security_code(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[] = {0x00, 0x01, 0x6e, 0x01};
@@ -3119,7 +3108,6 @@ static gn_error get_security_code(gn_data *data, struct 
gn_statemachine *state)
        if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY;
        return sm_block(0x40, data, state);
 }
-#endif
 
 static gn_error IncomingSecurity(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state)
 {
@@ -3134,7 +3122,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                }
                break;
 
-#ifdef SECURITY
        /* get security code */
        case 0x6e:
                if (message[4] != 0x01) return GN_ERR_UNKNOWN;
@@ -3143,7 +3130,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                        snprintf(data->security_code->code, 
sizeof(data->security_code->code), "%s", message + 5);
                }
                break;
-#endif
 
        /* Get bin ringtone */
        case 0x9e:
@@ -3670,8 +3656,6 @@ static gn_error IncomingRLPFrame(int messagetype, 
unsigned char *message, int le
        return GN_ERR_NONE;
 }
 
-
-#ifdef  SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[32] = {FBUS_FRAME_HEADER, 0x0a};
@@ -3779,8 +3763,6 @@ static gn_error IncomingSecurityCode(int messagetype, 
unsigned char *message, in
 
        return GN_ERR_NONE;
 }
-#endif
-
 
 static gn_error PressOrReleaseKey1(bool press, gn_data *data, struct 
gn_statemachine *state)
 {
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 7ec01eb..c30ddbc 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -266,10 +266,8 @@ static gn_error NK6510_DeleteFile(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_DeleteFileById(gn_data *data, struct gn_statemachine 
*state);
 static gn_error NK6510_GetFileDetailsById(gn_data *data, struct 
gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_GetSecurityCodeStatus(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error NK6510_GetToDo(gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_DeleteAllToDoLocations(gn_data *data, struct 
gn_statemachine *state);
@@ -296,9 +294,7 @@ static gn_error NK6510_IncomingReset(int messagetype, 
unsigned char *message, in
 static gn_error NK6510_IncomingRadio(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_IncomingFile(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_IncomingSecurity(int messagetype, unsigned char 
*message, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int sms_encode(gn_data *data, struct gn_statemachine *state, unsigned 
char *req);
 static int get_memory_type(gn_memory_type memory_type);
@@ -320,9 +316,7 @@ static gn_incoming_function_type 
nk6510_incoming_functions[] = {
        { NK6510_MSG_PROFILE,    NK6510_IncomingProfile },
        { NK6510_MSG_RINGTONE,  NK6510_IncomingRingtone },
        { NK6510_MSG_KEYPRESS,  NK6510_IncomingKeypress },
-#ifdef  SECURITY
        { NK6510_MSG_SECURITY,  NK6510_IncomingSecurity },
-#endif
        { NK6510_MSG_SUBSCRIBE, NK6510_IncomingSubscribe },
        { NK6510_MSG_COMMSTATUS,        NK6510_IncomingCommStatus },
        { NK6510_MSG_WAP,       NK6510_IncomingWAP },
@@ -479,12 +473,10 @@ static gn_error NK6510_Functions(gn_operation op, gn_data 
*data, struct gn_state
                return NK6510_CancelCall(data, state);
        case GN_OP_AnswerCall:
                return NK6510_AnswerCall(data, state);
-#ifdef  SECURITY
        case GN_OP_GetSecurityCodeStatus:
                return NK6510_GetSecurityCodeStatus(data, state);
        case GN_OP_EnterSecurityCode:
                return NK6510_EnterSecurityCode(data, state);
-#endif
        case GN_OP_Subscribe:
                return NK6510_Subscribe(data, state);
        case GN_OP_GetRawRingtone:
@@ -5250,7 +5242,6 @@ static gn_error NK6510_PressOrReleaseKey(gn_data *data, 
struct gn_statemachine *
        SEND_MESSAGE_BLOCK(NK6510_MSG_KEYPRESS, 10);
 }
 
-#ifdef  SECURITY
 /*****************/
 /*** SECURITY  ***/
 /*****************/
@@ -5359,7 +5350,6 @@ static gn_error NK6510_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *
 
        SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 6 + len);
 }
-#endif
 
 /*****************/
 /*** SUBSCRIBE ***/
diff --git a/common/phones/pcsc.c b/common/phones/pcsc.c
index 4d2fe0d..9887c5d 100644
--- a/common/phones/pcsc.c
+++ b/common/phones/pcsc.c
@@ -35,10 +35,8 @@ static gn_error Initialise(struct gn_statemachine *state);
 static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error Terminate(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error functions(gn_operation op, gn_data *data, struct 
gn_statemachine *state);
 
 /* prototypes for functions related to libpcsclite */
@@ -57,9 +55,7 @@ static LONG pcsc_read_file(PCSC_IOSTRUCT *ios, LONG dir_id, 
LONG file_id);
 static LONG pcsc_read_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record);
 static LONG pcsc_stat_file(PCSC_IOSTRUCT *ios, LONG file_id);
 static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record, BYTE *data, BYTE length);
-#ifdef SECURITY
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len);
-#endif
 
 /* prototypes for functions converting between the two libraries */
 
@@ -470,12 +466,10 @@ static gn_error functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return DeletePhonebook(data, state);
        case GN_OP_GetFile:
                return GetFile(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
                return GetSecurityCodeStatus(data, state);
-#endif
        default:
                return GN_ERR_NOTIMPLEMENTED;
        }
@@ -1048,8 +1042,6 @@ static gn_error DeletePhonebook(gn_data *data, struct 
gn_statemachine *state)
        return get_gn_error(&IoStruct, ret);
 }
 
-#ifdef SECURITY
-
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        LONG ret;
@@ -1120,8 +1112,6 @@ static gn_error EnterSecurityCode(gn_data *data, struct 
gn_statemachine *state)
        return error;
 }
 
-#endif /* SECURITY */
-
 
 /* functions for libpcsc stuff */
 
@@ -1432,8 +1422,6 @@ static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, 
LONG file_id, BYTE recor
        return ret;
 }
 
-#ifdef SECURITY
-
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len)
 {
        LONG ret = SCARD_S_SUCCESS;
@@ -1452,8 +1440,6 @@ static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE 
chv_id, BYTE *chv, BYTE chv
        return ret;
 }
 
-#endif /* SECURITY */
-
 static LONG pcsc_close_reader()
 {
 /* disconnect from reader */
diff --git a/configure.in b/configure.in
index 633b5fa..ab0bb50 100644
--- a/configure.in
+++ b/configure.in
@@ -780,17 +780,6 @@ AM_CONDITIONAL(HAVE_MYSQL, test "x$have_mysql" = "xyes")
 
 dnl ======================== Additional switches
 
-AC_ARG_ENABLE(security,
-   [  --enable-security       enable all security features @<:@default=no@:>@],
-   [ if test x$enable_security = xyes; then
-       AC_DEFINE(SECURITY, 1, [Whether security features are enabled])
-       security="yes"
-     else
-       security="no"
-     fi ],
-   [ security="no" ]
-)
-
 dnl ======================== Checks for libpcsclite
 USE_LIBPCSCLITE="no"
 AC_ARG_ENABLE(libpcsclite,
@@ -1115,7 +1104,6 @@ echo "
     phonet support:     $USE_SOCKETPHONET
     libpcsclite support:$USE_LIBPCSCLITE
     readline support:   $USE_READLINE
-    Security:           $security
     Build Shared Lib:   $enable_shared
     Build Static Lib:   $enable_static
     Windows:            $win32 
diff --git a/gnokii/gnokii-app.h b/gnokii/gnokii-app.h
index 88c1f36..d704a6c 100644
--- a/gnokii/gnokii-app.h
+++ b/gnokii/gnokii-app.h
@@ -182,13 +182,11 @@ extern void security_usage(FILE *f);
 extern gn_error identify(struct gn_statemachine *state);
 extern gn_error getlocksinfo(gn_data *data, struct gn_statemachine *state);
 extern gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 extern int entersecuritycode_usage(FILE *f, int exitval);
 extern gn_error entersecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
 extern gn_error getsecuritycodestatus(gn_data *data, struct gn_statemachine 
*state);
 extern int changesecuritycode_usage(FILE *f, int exitval);
 extern gn_error changesecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
-#endif
 
 /* File options */
 extern void file_usage(FILE *f);
diff --git a/gnokii/gnokii-security.c b/gnokii/gnokii-security.c
index c460d70..b08bace 100644
--- a/gnokii/gnokii-security.c
+++ b/gnokii/gnokii-security.c
@@ -43,15 +43,11 @@ void security_usage(FILE *f)
                     "Security options:\n"
                     "          --identify\n"
                     "          --getlocksinfo\n"
-               ));
-#ifdef SECURITY
-       fprintf(f, _(
                     "          --entersecuritycode PIN|PIN2|PUK|PUK2|SEC 
[COMMAND]\n"
                     "          --getsecuritycodestatus\n"
                     "          --getsecuritycode\n"
                     "          --changesecuritycode PIN|PIN2|PUK|PUK2\n"
                ));
-#endif
 }
 
 gn_error identify(struct gn_statemachine *state)
@@ -91,8 +87,6 @@ gn_error getlocksinfo(gn_data *data, struct gn_statemachine 
*state)
        return GN_ERR_NONE;
 }
 
-#ifdef SECURITY
-
 gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state)
 {
        gn_error error;
@@ -285,5 +279,3 @@ gn_error changesecuritycode(char *type, gn_data *data, 
struct gn_statemachine *s
 
        return error;
 }
-
-#endif
diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c
index b4f5c82..035d627 100644
--- a/gnokii/gnokii.c
+++ b/gnokii/gnokii.c
@@ -468,11 +468,10 @@ static int parse_options(int argc, char *argv[])
 
                /* Alternate config file location */
                { "config",             required_argument, NULL, OPT_CONFIGFILE 
},
+
                /* Alternate phone section from the config */
                { "phone",              required_argument, NULL, 
OPT_CONFIGMODEL },
 
-#ifdef SECURITY
-
                /* Get Security Code */
                { "getsecuritycode",    no_argument,       NULL, 
OPT_GETSECURITYCODE },
 
@@ -485,8 +484,6 @@ static int parse_options(int argc, char *argv[])
                /* Change Security Code */
                { "changesecuritycode", required_argument, NULL, 
OPT_CHANGESECURITYCODE },
 
-#endif
-
                /* Set date and time */
                { "setdatetime",        optional_argument, NULL, 
OPT_SETDATETIME },
 
@@ -721,10 +718,8 @@ static int parse_options(int argc, char *argv[])
                { OPT_HELP,              1, 100, 0 },
                { OPT_CONFIGFILE,        1, 100, 0 },
                { OPT_CONFIGMODEL,       1, 100, 0 },
-#ifdef SECURITY
                { OPT_ENTERSECURITYCODE, 1, 100, 0 },
                { OPT_CHANGESECURITYCODE,1, 1, 0 },
-#endif
                { OPT_SETDATETIME,       0, 5, 0 },
                { OPT_SETALARM,          0, 2, 0 },
                { OPT_DIALVOICE,         1, 1, 0 },
@@ -1049,7 +1044,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_GETLOCKSINFO:
                rc = getlocksinfo(data, state);
                break;
-#ifdef SECURITY
        case OPT_GETSECURITYCODE:
                rc = getsecuritycode(data, state);
                break;
@@ -1064,7 +1058,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_CHANGESECURITYCODE:
                rc = changesecuritycode(optarg, data, state);
                        break;
-#endif
 
        /* File options */
        case OPT_GETFILELIST:

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=a6c5ac9b23f07271c6de6107fad78ca5ca2a5480


commit 7de9d7a93df13453ca42bd786ac01eff4e2c54ee
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 25 13:23:58 2011 +0100

    Remove SECURITY option
    
    Remove --enable-security option. All security options (like reading or
    changing PIN) are enabled now unconditionally.

diff --git a/Windows/MSVC2010Express/config.h b/Windows/MSVC2010Express/config.h
index 1231ddf..30ba8c5 100644
--- a/Windows/MSVC2010Express/config.h
+++ b/Windows/MSVC2010Express/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC6/config.h b/Windows/MSVC6/config.h
index b6c9ea6..458c937 100644
--- a/Windows/MSVC6/config.h
+++ b/Windows/MSVC6/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC8/config.h b/Windows/MSVC8/config.h
index 3e6ea03..1da1386 100644
--- a/Windows/MSVC8/config.h
+++ b/Windows/MSVC8/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2005/config.h b/Windows/MSVS2005/config.h
index bd9d2eb..ae614d0 100644
--- a/Windows/MSVS2005/config.h
+++ b/Windows/MSVS2005/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2008/config.h b/Windows/MSVS2008/config.h
index 3cdc8f7..f225f4c 100644
--- a/Windows/MSVS2008/config.h
+++ b/Windows/MSVS2008/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2010/config.h b/Windows/MSVS2010/config.h
index 602c7f1..0514feb 100644
--- a/Windows/MSVS2010/config.h
+++ b/Windows/MSVS2010/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index a706f2e..3a912a3 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -64,9 +64,7 @@ static gn_error ReplyGetSMS(int messagetype, unsigned char 
*buffer, int length,
 /* static gn_error ReplyDeleteSMS(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state); */
 static gn_error ReplyGetCharset(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetSMSCenter(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 static gn_error ReplyGetNetworkInfo(int messagetype, unsigned char *buffer, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetDateTime(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
@@ -102,10 +100,8 @@ static gn_error AT_DeleteSMS(gn_data *data, struct 
gn_statemachine *state);
 static gn_error AT_GetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_SetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetSMSCenter(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error AT_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetNetworkInfo(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_AnswerCall(gn_data *data, struct gn_statemachine *state);
@@ -155,10 +151,8 @@ static at_function_init_type at_function_init[] = {
        { GN_OP_AT_GetCharset,         AT_GetCharset,            
ReplyGetCharset },
        { GN_OP_AT_SetCharset,         AT_SetCharset,            Reply },
        { GN_OP_GetSMSCenter,          AT_GetSMSCenter,          
ReplyGetSMSCenter },
-#ifdef SECURITY
        { GN_OP_GetSecurityCodeStatus, AT_GetSecurityCodeStatus, 
ReplyGetSecurityCodeStatus },
        { GN_OP_EnterSecurityCode,     AT_EnterSecurityCode,     Reply },
-#endif
        { GN_OP_MakeCall,              AT_DialVoice,             Reply },
        { GN_OP_AnswerCall,            AT_AnswerCall,            Reply },
        { GN_OP_CancelCall,            AT_CancelCall,            Reply },
@@ -1542,7 +1536,6 @@ static gn_error AT_GetSMSCenter(gn_data *data, struct 
gn_statemachine *state)
        return sm_block_no_retry(GN_OP_GetSMSCenter, data, state);
 }
 
-#ifdef SECURITY
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        if (sm_message_send(9, GN_OP_GetSecurityCodeStatus, "AT+CPIN?\r", 
state))
@@ -1562,7 +1555,6 @@ static gn_error AT_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *stat
                return GN_ERR_NOTREADY;
        return sm_block_no_retry(GN_OP_EnterSecurityCode, data, state);
 }
-#endif
 
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state)
 {
@@ -2568,7 +2560,6 @@ static gn_error ReplyGetCharset(int messagetype, unsigned 
char *buffer, int leng
        return GN_ERR_FAILED;
 }
 
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state)
 {
        at_line_buffer buf;
@@ -2612,7 +2603,6 @@ static gn_error ReplyGetSecurityCodeStatus(int 
messagetype, unsigned char *buffe
        }
        return GN_ERR_NONE;
 }
-#endif
 
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state)
 {
diff --git a/common/phones/nk6100.c b/common/phones/nk6100.c
index 9b59e1a..1a471fd 100644
--- a/common/phones/nk6100.c
+++ b/common/phones/nk6100.c
@@ -110,13 +110,10 @@ static gn_error get_imei(gn_data *data, struct 
gn_statemachine *state);
 static gn_error get_phone_info(gn_data *data, struct gn_statemachine *state);
 static gn_error get_hw(gn_data *data, struct gn_statemachine *state);
 static gn_error get_ringtone_list(gn_data *data, struct gn_statemachine 
*state);
-
-#ifdef SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error ChangeSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error get_security_code(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error IncomingPhoneInfo(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingPhoneInfo2(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
@@ -134,10 +131,7 @@ static gn_error IncomingCallInfo(int messagetype, unsigned 
char *message, int le
 static gn_error IncomingRLPFrame(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingKey(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingMisc(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
-
-#ifdef SECURITY
 static gn_error IncomingSecurityCode(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int get_memory_type(gn_memory_type memory_type);
 static void FlushLostSMSNotifications(struct gn_statemachine *state);
@@ -149,9 +143,7 @@ static gn_incoming_function_type 
nk6100_incoming_functions[] = {
        { 0x04, IncomingPhoneStatus },
        { 0x05, IncomingProfile },
        { 0x06, pnok_call_divert_incoming },
-#ifdef SECURITY
        { 0x08, IncomingSecurityCode },
-#endif
        { 0x0a, IncomingNetworkInfo },
        { 0x0c, IncomingKey },
        { 0x0d, IncomingDisplay },
@@ -322,7 +314,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return SendRLPFrame(data, state);
        case GN_OP_SetRLPRXCallback:
                return SetRLPRXCallback(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
@@ -331,7 +322,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return ChangeSecurityCode(data, state);
        case GN_OP_GetSecurityCode:
                return get_security_code(data, state);
-#endif
        case GN_OP_GetLocksInfo:
                return pnok_get_locks_info(data, state);
        case GN_OP_SendDTMF:
@@ -3104,7 +3094,6 @@ static gn_error get_hw(gn_data *data, struct 
gn_statemachine *state)
        return sm_block(0x40, data, state);
 }
 
-#ifdef  SECURITY
 static gn_error get_security_code(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[] = {0x00, 0x01, 0x6e, 0x01};
@@ -3119,7 +3108,6 @@ static gn_error get_security_code(gn_data *data, struct 
gn_statemachine *state)
        if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY;
        return sm_block(0x40, data, state);
 }
-#endif
 
 static gn_error IncomingSecurity(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state)
 {
@@ -3134,7 +3122,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                }
                break;
 
-#ifdef SECURITY
        /* get security code */
        case 0x6e:
                if (message[4] != 0x01) return GN_ERR_UNKNOWN;
@@ -3143,7 +3130,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                        snprintf(data->security_code->code, 
sizeof(data->security_code->code), "%s", message + 5);
                }
                break;
-#endif
 
        /* Get bin ringtone */
        case 0x9e:
@@ -3670,8 +3656,6 @@ static gn_error IncomingRLPFrame(int messagetype, 
unsigned char *message, int le
        return GN_ERR_NONE;
 }
 
-
-#ifdef  SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[32] = {FBUS_FRAME_HEADER, 0x0a};
@@ -3779,8 +3763,6 @@ static gn_error IncomingSecurityCode(int messagetype, 
unsigned char *message, in
 
        return GN_ERR_NONE;
 }
-#endif
-
 
 static gn_error PressOrReleaseKey1(bool press, gn_data *data, struct 
gn_statemachine *state)
 {
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 7ec01eb..c30ddbc 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -266,10 +266,8 @@ static gn_error NK6510_DeleteFile(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_DeleteFileById(gn_data *data, struct gn_statemachine 
*state);
 static gn_error NK6510_GetFileDetailsById(gn_data *data, struct 
gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_GetSecurityCodeStatus(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error NK6510_GetToDo(gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_DeleteAllToDoLocations(gn_data *data, struct 
gn_statemachine *state);
@@ -296,9 +294,7 @@ static gn_error NK6510_IncomingReset(int messagetype, 
unsigned char *message, in
 static gn_error NK6510_IncomingRadio(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_IncomingFile(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_IncomingSecurity(int messagetype, unsigned char 
*message, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int sms_encode(gn_data *data, struct gn_statemachine *state, unsigned 
char *req);
 static int get_memory_type(gn_memory_type memory_type);
@@ -320,9 +316,7 @@ static gn_incoming_function_type 
nk6510_incoming_functions[] = {
        { NK6510_MSG_PROFILE,    NK6510_IncomingProfile },
        { NK6510_MSG_RINGTONE,  NK6510_IncomingRingtone },
        { NK6510_MSG_KEYPRESS,  NK6510_IncomingKeypress },
-#ifdef  SECURITY
        { NK6510_MSG_SECURITY,  NK6510_IncomingSecurity },
-#endif
        { NK6510_MSG_SUBSCRIBE, NK6510_IncomingSubscribe },
        { NK6510_MSG_COMMSTATUS,        NK6510_IncomingCommStatus },
        { NK6510_MSG_WAP,       NK6510_IncomingWAP },
@@ -479,12 +473,10 @@ static gn_error NK6510_Functions(gn_operation op, gn_data 
*data, struct gn_state
                return NK6510_CancelCall(data, state);
        case GN_OP_AnswerCall:
                return NK6510_AnswerCall(data, state);
-#ifdef  SECURITY
        case GN_OP_GetSecurityCodeStatus:
                return NK6510_GetSecurityCodeStatus(data, state);
        case GN_OP_EnterSecurityCode:
                return NK6510_EnterSecurityCode(data, state);
-#endif
        case GN_OP_Subscribe:
                return NK6510_Subscribe(data, state);
        case GN_OP_GetRawRingtone:
@@ -5250,7 +5242,6 @@ static gn_error NK6510_PressOrReleaseKey(gn_data *data, 
struct gn_statemachine *
        SEND_MESSAGE_BLOCK(NK6510_MSG_KEYPRESS, 10);
 }
 
-#ifdef  SECURITY
 /*****************/
 /*** SECURITY  ***/
 /*****************/
@@ -5359,7 +5350,6 @@ static gn_error NK6510_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *
 
        SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 6 + len);
 }
-#endif
 
 /*****************/
 /*** SUBSCRIBE ***/
diff --git a/common/phones/pcsc.c b/common/phones/pcsc.c
index 4d2fe0d..9887c5d 100644
--- a/common/phones/pcsc.c
+++ b/common/phones/pcsc.c
@@ -35,10 +35,8 @@ static gn_error Initialise(struct gn_statemachine *state);
 static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error Terminate(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error functions(gn_operation op, gn_data *data, struct 
gn_statemachine *state);
 
 /* prototypes for functions related to libpcsclite */
@@ -57,9 +55,7 @@ static LONG pcsc_read_file(PCSC_IOSTRUCT *ios, LONG dir_id, 
LONG file_id);
 static LONG pcsc_read_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record);
 static LONG pcsc_stat_file(PCSC_IOSTRUCT *ios, LONG file_id);
 static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record, BYTE *data, BYTE length);
-#ifdef SECURITY
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len);
-#endif
 
 /* prototypes for functions converting between the two libraries */
 
@@ -470,12 +466,10 @@ static gn_error functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return DeletePhonebook(data, state);
        case GN_OP_GetFile:
                return GetFile(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
                return GetSecurityCodeStatus(data, state);
-#endif
        default:
                return GN_ERR_NOTIMPLEMENTED;
        }
@@ -1048,8 +1042,6 @@ static gn_error DeletePhonebook(gn_data *data, struct 
gn_statemachine *state)
        return get_gn_error(&IoStruct, ret);
 }
 
-#ifdef SECURITY
-
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        LONG ret;
@@ -1120,8 +1112,6 @@ static gn_error EnterSecurityCode(gn_data *data, struct 
gn_statemachine *state)
        return error;
 }
 
-#endif /* SECURITY */
-
 
 /* functions for libpcsc stuff */
 
@@ -1432,8 +1422,6 @@ static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, 
LONG file_id, BYTE recor
        return ret;
 }
 
-#ifdef SECURITY
-
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len)
 {
        LONG ret = SCARD_S_SUCCESS;
@@ -1452,8 +1440,6 @@ static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE 
chv_id, BYTE *chv, BYTE chv
        return ret;
 }
 
-#endif /* SECURITY */
-
 static LONG pcsc_close_reader()
 {
 /* disconnect from reader */
diff --git a/configure.in b/configure.in
index 633b5fa..ab0bb50 100644
--- a/configure.in
+++ b/configure.in
@@ -780,17 +780,6 @@ AM_CONDITIONAL(HAVE_MYSQL, test "x$have_mysql" = "xyes")
 
 dnl ======================== Additional switches
 
-AC_ARG_ENABLE(security,
-   [  --enable-security       enable all security features @<:@default=no@:>@],
-   [ if test x$enable_security = xyes; then
-       AC_DEFINE(SECURITY, 1, [Whether security features are enabled])
-       security="yes"
-     else
-       security="no"
-     fi ],
-   [ security="no" ]
-)
-
 dnl ======================== Checks for libpcsclite
 USE_LIBPCSCLITE="no"
 AC_ARG_ENABLE(libpcsclite,
@@ -1115,7 +1104,6 @@ echo "
     phonet support:     $USE_SOCKETPHONET
     libpcsclite support:$USE_LIBPCSCLITE
     readline support:   $USE_READLINE
-    Security:           $security
     Build Shared Lib:   $enable_shared
     Build Static Lib:   $enable_static
     Windows:            $win32 
diff --git a/gnokii/gnokii-app.h b/gnokii/gnokii-app.h
index 88c1f36..d704a6c 100644
--- a/gnokii/gnokii-app.h
+++ b/gnokii/gnokii-app.h
@@ -182,13 +182,11 @@ extern void security_usage(FILE *f);
 extern gn_error identify(struct gn_statemachine *state);
 extern gn_error getlocksinfo(gn_data *data, struct gn_statemachine *state);
 extern gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 extern int entersecuritycode_usage(FILE *f, int exitval);
 extern gn_error entersecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
 extern gn_error getsecuritycodestatus(gn_data *data, struct gn_statemachine 
*state);
 extern int changesecuritycode_usage(FILE *f, int exitval);
 extern gn_error changesecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
-#endif
 
 /* File options */
 extern void file_usage(FILE *f);
diff --git a/gnokii/gnokii-security.c b/gnokii/gnokii-security.c
index c460d70..b08bace 100644
--- a/gnokii/gnokii-security.c
+++ b/gnokii/gnokii-security.c
@@ -43,15 +43,11 @@ void security_usage(FILE *f)
                     "Security options:\n"
                     "          --identify\n"
                     "          --getlocksinfo\n"
-               ));
-#ifdef SECURITY
-       fprintf(f, _(
                     "          --entersecuritycode PIN|PIN2|PUK|PUK2|SEC 
[COMMAND]\n"
                     "          --getsecuritycodestatus\n"
                     "          --getsecuritycode\n"
                     "          --changesecuritycode PIN|PIN2|PUK|PUK2\n"
                ));
-#endif
 }
 
 gn_error identify(struct gn_statemachine *state)
@@ -91,8 +87,6 @@ gn_error getlocksinfo(gn_data *data, struct gn_statemachine 
*state)
        return GN_ERR_NONE;
 }
 
-#ifdef SECURITY
-
 gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state)
 {
        gn_error error;
@@ -285,5 +279,3 @@ gn_error changesecuritycode(char *type, gn_data *data, 
struct gn_statemachine *s
 
        return error;
 }
-
-#endif
diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c
index b4f5c82..035d627 100644
--- a/gnokii/gnokii.c
+++ b/gnokii/gnokii.c
@@ -468,11 +468,10 @@ static int parse_options(int argc, char *argv[])
 
                /* Alternate config file location */
                { "config",             required_argument, NULL, OPT_CONFIGFILE 
},
+
                /* Alternate phone section from the config */
                { "phone",              required_argument, NULL, 
OPT_CONFIGMODEL },
 
-#ifdef SECURITY
-
                /* Get Security Code */
                { "getsecuritycode",    no_argument,       NULL, 
OPT_GETSECURITYCODE },
 
@@ -485,8 +484,6 @@ static int parse_options(int argc, char *argv[])
                /* Change Security Code */
                { "changesecuritycode", required_argument, NULL, 
OPT_CHANGESECURITYCODE },
 
-#endif
-
                /* Set date and time */
                { "setdatetime",        optional_argument, NULL, 
OPT_SETDATETIME },
 
@@ -721,10 +718,8 @@ static int parse_options(int argc, char *argv[])
                { OPT_HELP,              1, 100, 0 },
                { OPT_CONFIGFILE,        1, 100, 0 },
                { OPT_CONFIGMODEL,       1, 100, 0 },
-#ifdef SECURITY
                { OPT_ENTERSECURITYCODE, 1, 100, 0 },
                { OPT_CHANGESECURITYCODE,1, 1, 0 },
-#endif
                { OPT_SETDATETIME,       0, 5, 0 },
                { OPT_SETALARM,          0, 2, 0 },
                { OPT_DIALVOICE,         1, 1, 0 },
@@ -1049,7 +1044,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_GETLOCKSINFO:
                rc = getlocksinfo(data, state);
                break;
-#ifdef SECURITY
        case OPT_GETSECURITYCODE:
                rc = getsecuritycode(data, state);
                break;
@@ -1064,7 +1058,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_CHANGESECURITYCODE:
                rc = changesecuritycode(optarg, data, state);
                        break;
-#endif
 
        /* File options */
        case OPT_GETFILELIST:

http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=fee38afe185f007f824091c00408c30a58ca825b


commit 7de9d7a93df13453ca42bd786ac01eff4e2c54ee
Author: Pawel Kot <address@hidden>
Date:   Sun Dec 25 13:23:58 2011 +0100

    Remove SECURITY option
    
    Remove --enable-security option. All security options (like reading or
    changing PIN) are enabled now unconditionally.

diff --git a/Windows/MSVC2010Express/config.h b/Windows/MSVC2010Express/config.h
index 1231ddf..30ba8c5 100644
--- a/Windows/MSVC2010Express/config.h
+++ b/Windows/MSVC2010Express/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC6/config.h b/Windows/MSVC6/config.h
index b6c9ea6..458c937 100644
--- a/Windows/MSVC6/config.h
+++ b/Windows/MSVC6/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVC8/config.h b/Windows/MSVC8/config.h
index 3e6ea03..1da1386 100644
--- a/Windows/MSVC8/config.h
+++ b/Windows/MSVC8/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2005/config.h b/Windows/MSVS2005/config.h
index bd9d2eb..ae614d0 100644
--- a/Windows/MSVS2005/config.h
+++ b/Windows/MSVS2005/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2008/config.h b/Windows/MSVS2008/config.h
index 3cdc8f7..f225f4c 100644
--- a/Windows/MSVS2008/config.h
+++ b/Windows/MSVS2008/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/Windows/MSVS2010/config.h b/Windows/MSVS2010/config.h
index 602c7f1..0514feb 100644
--- a/Windows/MSVS2010/config.h
+++ b/Windows/MSVS2010/config.h
@@ -101,9 +101,6 @@
 #define XDEBUG 1
 #define RLP_DEBUG 1
 
-/* Decide if you want security options enabled */
-#define SECURITY
-
 /* Define if you have XPM components */
 #undef XPM
 
diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index a706f2e..3a912a3 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -64,9 +64,7 @@ static gn_error ReplyGetSMS(int messagetype, unsigned char 
*buffer, int length,
 /* static gn_error ReplyDeleteSMS(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state); */
 static gn_error ReplyGetCharset(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetSMSCenter(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 static gn_error ReplyGetNetworkInfo(int messagetype, unsigned char *buffer, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state);
 static gn_error ReplyGetDateTime(int messagetype, unsigned char *buffer, int 
length, gn_data *data, struct gn_statemachine *state);
@@ -102,10 +100,8 @@ static gn_error AT_DeleteSMS(gn_data *data, struct 
gn_statemachine *state);
 static gn_error AT_GetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_SetCharset(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetSMSCenter(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error AT_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state);
 static gn_error AT_GetNetworkInfo(gn_data *data, struct gn_statemachine 
*state);
 static gn_error AT_AnswerCall(gn_data *data, struct gn_statemachine *state);
@@ -155,10 +151,8 @@ static at_function_init_type at_function_init[] = {
        { GN_OP_AT_GetCharset,         AT_GetCharset,            
ReplyGetCharset },
        { GN_OP_AT_SetCharset,         AT_SetCharset,            Reply },
        { GN_OP_GetSMSCenter,          AT_GetSMSCenter,          
ReplyGetSMSCenter },
-#ifdef SECURITY
        { GN_OP_GetSecurityCodeStatus, AT_GetSecurityCodeStatus, 
ReplyGetSecurityCodeStatus },
        { GN_OP_EnterSecurityCode,     AT_EnterSecurityCode,     Reply },
-#endif
        { GN_OP_MakeCall,              AT_DialVoice,             Reply },
        { GN_OP_AnswerCall,            AT_AnswerCall,            Reply },
        { GN_OP_CancelCall,            AT_CancelCall,            Reply },
@@ -1542,7 +1536,6 @@ static gn_error AT_GetSMSCenter(gn_data *data, struct 
gn_statemachine *state)
        return sm_block_no_retry(GN_OP_GetSMSCenter, data, state);
 }
 
-#ifdef SECURITY
 static gn_error AT_GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        if (sm_message_send(9, GN_OP_GetSecurityCodeStatus, "AT+CPIN?\r", 
state))
@@ -1562,7 +1555,6 @@ static gn_error AT_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *stat
                return GN_ERR_NOTREADY;
        return sm_block_no_retry(GN_OP_EnterSecurityCode, data, state);
 }
-#endif
 
 static gn_error AT_DialVoice(gn_data *data, struct gn_statemachine *state)
 {
@@ -2568,7 +2560,6 @@ static gn_error ReplyGetCharset(int messagetype, unsigned 
char *buffer, int leng
        return GN_ERR_FAILED;
 }
 
-#ifdef SECURITY
 static gn_error ReplyGetSecurityCodeStatus(int messagetype, unsigned char 
*buffer, int length, gn_data *data, struct gn_statemachine *state)
 {
        at_line_buffer buf;
@@ -2612,7 +2603,6 @@ static gn_error ReplyGetSecurityCodeStatus(int 
messagetype, unsigned char *buffe
        }
        return GN_ERR_NONE;
 }
-#endif
 
 static gn_error ReplyRing(int messagetype, unsigned char *buffer, int length, 
gn_data *data, struct gn_statemachine *state)
 {
diff --git a/common/phones/nk6100.c b/common/phones/nk6100.c
index 9b59e1a..1a471fd 100644
--- a/common/phones/nk6100.c
+++ b/common/phones/nk6100.c
@@ -110,13 +110,10 @@ static gn_error get_imei(gn_data *data, struct 
gn_statemachine *state);
 static gn_error get_phone_info(gn_data *data, struct gn_statemachine *state);
 static gn_error get_hw(gn_data *data, struct gn_statemachine *state);
 static gn_error get_ringtone_list(gn_data *data, struct gn_statemachine 
*state);
-
-#ifdef SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error ChangeSecurityCode(gn_data *data, struct gn_statemachine 
*state);
 static gn_error get_security_code(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error IncomingPhoneInfo(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingPhoneInfo2(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
@@ -134,10 +131,7 @@ static gn_error IncomingCallInfo(int messagetype, unsigned 
char *message, int le
 static gn_error IncomingRLPFrame(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingKey(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
 static gn_error IncomingMisc(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state);
-
-#ifdef SECURITY
 static gn_error IncomingSecurityCode(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int get_memory_type(gn_memory_type memory_type);
 static void FlushLostSMSNotifications(struct gn_statemachine *state);
@@ -149,9 +143,7 @@ static gn_incoming_function_type 
nk6100_incoming_functions[] = {
        { 0x04, IncomingPhoneStatus },
        { 0x05, IncomingProfile },
        { 0x06, pnok_call_divert_incoming },
-#ifdef SECURITY
        { 0x08, IncomingSecurityCode },
-#endif
        { 0x0a, IncomingNetworkInfo },
        { 0x0c, IncomingKey },
        { 0x0d, IncomingDisplay },
@@ -322,7 +314,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return SendRLPFrame(data, state);
        case GN_OP_SetRLPRXCallback:
                return SetRLPRXCallback(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
@@ -331,7 +322,6 @@ static gn_error Functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return ChangeSecurityCode(data, state);
        case GN_OP_GetSecurityCode:
                return get_security_code(data, state);
-#endif
        case GN_OP_GetLocksInfo:
                return pnok_get_locks_info(data, state);
        case GN_OP_SendDTMF:
@@ -3104,7 +3094,6 @@ static gn_error get_hw(gn_data *data, struct 
gn_statemachine *state)
        return sm_block(0x40, data, state);
 }
 
-#ifdef  SECURITY
 static gn_error get_security_code(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[] = {0x00, 0x01, 0x6e, 0x01};
@@ -3119,7 +3108,6 @@ static gn_error get_security_code(gn_data *data, struct 
gn_statemachine *state)
        if (sm_message_send(4, 0x40, req, state)) return GN_ERR_NOTREADY;
        return sm_block(0x40, data, state);
 }
-#endif
 
 static gn_error IncomingSecurity(int messagetype, unsigned char *message, int 
length, gn_data *data, struct gn_statemachine *state)
 {
@@ -3134,7 +3122,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                }
                break;
 
-#ifdef SECURITY
        /* get security code */
        case 0x6e:
                if (message[4] != 0x01) return GN_ERR_UNKNOWN;
@@ -3143,7 +3130,6 @@ static gn_error IncomingSecurity(int messagetype, 
unsigned char *message, int le
                        snprintf(data->security_code->code, 
sizeof(data->security_code->code), "%s", message + 5);
                }
                break;
-#endif
 
        /* Get bin ringtone */
        case 0x9e:
@@ -3670,8 +3656,6 @@ static gn_error IncomingRLPFrame(int messagetype, 
unsigned char *message, int le
        return GN_ERR_NONE;
 }
 
-
-#ifdef  SECURITY
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine *state)
 {
        unsigned char req[32] = {FBUS_FRAME_HEADER, 0x0a};
@@ -3779,8 +3763,6 @@ static gn_error IncomingSecurityCode(int messagetype, 
unsigned char *message, in
 
        return GN_ERR_NONE;
 }
-#endif
-
 
 static gn_error PressOrReleaseKey1(bool press, gn_data *data, struct 
gn_statemachine *state)
 {
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 7ec01eb..c30ddbc 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -266,10 +266,8 @@ static gn_error NK6510_DeleteFile(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_DeleteFileById(gn_data *data, struct gn_statemachine 
*state);
 static gn_error NK6510_GetFileDetailsById(gn_data *data, struct 
gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_GetSecurityCodeStatus(gn_data *data, struct 
gn_statemachine *state);
 static gn_error NK6510_EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 
 static gn_error NK6510_GetToDo(gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_DeleteAllToDoLocations(gn_data *data, struct 
gn_statemachine *state);
@@ -296,9 +294,7 @@ static gn_error NK6510_IncomingReset(int messagetype, 
unsigned char *message, in
 static gn_error NK6510_IncomingRadio(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 static gn_error NK6510_IncomingFile(int messagetype, unsigned char *message, 
int length, gn_data *data, struct gn_statemachine *state);
 
-#ifdef  SECURITY
 static gn_error NK6510_IncomingSecurity(int messagetype, unsigned char 
*message, int length, gn_data *data, struct gn_statemachine *state);
-#endif
 
 static int sms_encode(gn_data *data, struct gn_statemachine *state, unsigned 
char *req);
 static int get_memory_type(gn_memory_type memory_type);
@@ -320,9 +316,7 @@ static gn_incoming_function_type 
nk6510_incoming_functions[] = {
        { NK6510_MSG_PROFILE,    NK6510_IncomingProfile },
        { NK6510_MSG_RINGTONE,  NK6510_IncomingRingtone },
        { NK6510_MSG_KEYPRESS,  NK6510_IncomingKeypress },
-#ifdef  SECURITY
        { NK6510_MSG_SECURITY,  NK6510_IncomingSecurity },
-#endif
        { NK6510_MSG_SUBSCRIBE, NK6510_IncomingSubscribe },
        { NK6510_MSG_COMMSTATUS,        NK6510_IncomingCommStatus },
        { NK6510_MSG_WAP,       NK6510_IncomingWAP },
@@ -479,12 +473,10 @@ static gn_error NK6510_Functions(gn_operation op, gn_data 
*data, struct gn_state
                return NK6510_CancelCall(data, state);
        case GN_OP_AnswerCall:
                return NK6510_AnswerCall(data, state);
-#ifdef  SECURITY
        case GN_OP_GetSecurityCodeStatus:
                return NK6510_GetSecurityCodeStatus(data, state);
        case GN_OP_EnterSecurityCode:
                return NK6510_EnterSecurityCode(data, state);
-#endif
        case GN_OP_Subscribe:
                return NK6510_Subscribe(data, state);
        case GN_OP_GetRawRingtone:
@@ -5250,7 +5242,6 @@ static gn_error NK6510_PressOrReleaseKey(gn_data *data, 
struct gn_statemachine *
        SEND_MESSAGE_BLOCK(NK6510_MSG_KEYPRESS, 10);
 }
 
-#ifdef  SECURITY
 /*****************/
 /*** SECURITY  ***/
 /*****************/
@@ -5359,7 +5350,6 @@ static gn_error NK6510_EnterSecurityCode(gn_data *data, 
struct gn_statemachine *
 
        SEND_MESSAGE_BLOCK(NK6510_MSG_SECURITY, 6 + len);
 }
-#endif
 
 /*****************/
 /*** SUBSCRIBE ***/
diff --git a/common/phones/pcsc.c b/common/phones/pcsc.c
index 4d2fe0d..9887c5d 100644
--- a/common/phones/pcsc.c
+++ b/common/phones/pcsc.c
@@ -35,10 +35,8 @@ static gn_error Initialise(struct gn_statemachine *state);
 static gn_error ReadPhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error DeletePhonebook(gn_data *data, struct gn_statemachine *state);
 static gn_error Terminate(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state);
 static gn_error EnterSecurityCode(gn_data *data, struct gn_statemachine 
*state);
-#endif
 static gn_error functions(gn_operation op, gn_data *data, struct 
gn_statemachine *state);
 
 /* prototypes for functions related to libpcsclite */
@@ -57,9 +55,7 @@ static LONG pcsc_read_file(PCSC_IOSTRUCT *ios, LONG dir_id, 
LONG file_id);
 static LONG pcsc_read_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record);
 static LONG pcsc_stat_file(PCSC_IOSTRUCT *ios, LONG file_id);
 static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, LONG file_id, BYTE 
record, BYTE *data, BYTE length);
-#ifdef SECURITY
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len);
-#endif
 
 /* prototypes for functions converting between the two libraries */
 
@@ -470,12 +466,10 @@ static gn_error functions(gn_operation op, gn_data *data, 
struct gn_statemachine
                return DeletePhonebook(data, state);
        case GN_OP_GetFile:
                return GetFile(data, state);
-#ifdef SECURITY
        case GN_OP_EnterSecurityCode:
                return EnterSecurityCode(data, state);
        case GN_OP_GetSecurityCodeStatus:
                return GetSecurityCodeStatus(data, state);
-#endif
        default:
                return GN_ERR_NOTIMPLEMENTED;
        }
@@ -1048,8 +1042,6 @@ static gn_error DeletePhonebook(gn_data *data, struct 
gn_statemachine *state)
        return get_gn_error(&IoStruct, ret);
 }
 
-#ifdef SECURITY
-
 static gn_error GetSecurityCodeStatus(gn_data *data, struct gn_statemachine 
*state)
 {
        LONG ret;
@@ -1120,8 +1112,6 @@ static gn_error EnterSecurityCode(gn_data *data, struct 
gn_statemachine *state)
        return error;
 }
 
-#endif /* SECURITY */
-
 
 /* functions for libpcsc stuff */
 
@@ -1432,8 +1422,6 @@ static LONG pcsc_update_file_record(PCSC_IOSTRUCT *ios, 
LONG file_id, BYTE recor
        return ret;
 }
 
-#ifdef SECURITY
-
 static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE chv_id, BYTE *chv, BYTE 
chv_len)
 {
        LONG ret = SCARD_S_SUCCESS;
@@ -1452,8 +1440,6 @@ static LONG pcsc_verify_chv(PCSC_IOSTRUCT *ios, BYTE 
chv_id, BYTE *chv, BYTE chv
        return ret;
 }
 
-#endif /* SECURITY */
-
 static LONG pcsc_close_reader()
 {
 /* disconnect from reader */
diff --git a/configure.in b/configure.in
index 633b5fa..ab0bb50 100644
--- a/configure.in
+++ b/configure.in
@@ -780,17 +780,6 @@ AM_CONDITIONAL(HAVE_MYSQL, test "x$have_mysql" = "xyes")
 
 dnl ======================== Additional switches
 
-AC_ARG_ENABLE(security,
-   [  --enable-security       enable all security features @<:@default=no@:>@],
-   [ if test x$enable_security = xyes; then
-       AC_DEFINE(SECURITY, 1, [Whether security features are enabled])
-       security="yes"
-     else
-       security="no"
-     fi ],
-   [ security="no" ]
-)
-
 dnl ======================== Checks for libpcsclite
 USE_LIBPCSCLITE="no"
 AC_ARG_ENABLE(libpcsclite,
@@ -1115,7 +1104,6 @@ echo "
     phonet support:     $USE_SOCKETPHONET
     libpcsclite support:$USE_LIBPCSCLITE
     readline support:   $USE_READLINE
-    Security:           $security
     Build Shared Lib:   $enable_shared
     Build Static Lib:   $enable_static
     Windows:            $win32 
diff --git a/gnokii/gnokii-app.h b/gnokii/gnokii-app.h
index 88c1f36..d704a6c 100644
--- a/gnokii/gnokii-app.h
+++ b/gnokii/gnokii-app.h
@@ -182,13 +182,11 @@ extern void security_usage(FILE *f);
 extern gn_error identify(struct gn_statemachine *state);
 extern gn_error getlocksinfo(gn_data *data, struct gn_statemachine *state);
 extern gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state);
-#ifdef SECURITY
 extern int entersecuritycode_usage(FILE *f, int exitval);
 extern gn_error entersecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
 extern gn_error getsecuritycodestatus(gn_data *data, struct gn_statemachine 
*state);
 extern int changesecuritycode_usage(FILE *f, int exitval);
 extern gn_error changesecuritycode(char *type, gn_data *data, struct 
gn_statemachine *state);
-#endif
 
 /* File options */
 extern void file_usage(FILE *f);
diff --git a/gnokii/gnokii-security.c b/gnokii/gnokii-security.c
index c460d70..b08bace 100644
--- a/gnokii/gnokii-security.c
+++ b/gnokii/gnokii-security.c
@@ -43,15 +43,11 @@ void security_usage(FILE *f)
                     "Security options:\n"
                     "          --identify\n"
                     "          --getlocksinfo\n"
-               ));
-#ifdef SECURITY
-       fprintf(f, _(
                     "          --entersecuritycode PIN|PIN2|PUK|PUK2|SEC 
[COMMAND]\n"
                     "          --getsecuritycodestatus\n"
                     "          --getsecuritycode\n"
                     "          --changesecuritycode PIN|PIN2|PUK|PUK2\n"
                ));
-#endif
 }
 
 gn_error identify(struct gn_statemachine *state)
@@ -91,8 +87,6 @@ gn_error getlocksinfo(gn_data *data, struct gn_statemachine 
*state)
        return GN_ERR_NONE;
 }
 
-#ifdef SECURITY
-
 gn_error getsecuritycode(gn_data *data, struct gn_statemachine *state)
 {
        gn_error error;
@@ -285,5 +279,3 @@ gn_error changesecuritycode(char *type, gn_data *data, 
struct gn_statemachine *s
 
        return error;
 }
-
-#endif
diff --git a/gnokii/gnokii.c b/gnokii/gnokii.c
index b4f5c82..035d627 100644
--- a/gnokii/gnokii.c
+++ b/gnokii/gnokii.c
@@ -468,11 +468,10 @@ static int parse_options(int argc, char *argv[])
 
                /* Alternate config file location */
                { "config",             required_argument, NULL, OPT_CONFIGFILE 
},
+
                /* Alternate phone section from the config */
                { "phone",              required_argument, NULL, 
OPT_CONFIGMODEL },
 
-#ifdef SECURITY
-
                /* Get Security Code */
                { "getsecuritycode",    no_argument,       NULL, 
OPT_GETSECURITYCODE },
 
@@ -485,8 +484,6 @@ static int parse_options(int argc, char *argv[])
                /* Change Security Code */
                { "changesecuritycode", required_argument, NULL, 
OPT_CHANGESECURITYCODE },
 
-#endif
-
                /* Set date and time */
                { "setdatetime",        optional_argument, NULL, 
OPT_SETDATETIME },
 
@@ -721,10 +718,8 @@ static int parse_options(int argc, char *argv[])
                { OPT_HELP,              1, 100, 0 },
                { OPT_CONFIGFILE,        1, 100, 0 },
                { OPT_CONFIGMODEL,       1, 100, 0 },
-#ifdef SECURITY
                { OPT_ENTERSECURITYCODE, 1, 100, 0 },
                { OPT_CHANGESECURITYCODE,1, 1, 0 },
-#endif
                { OPT_SETDATETIME,       0, 5, 0 },
                { OPT_SETALARM,          0, 2, 0 },
                { OPT_DIALVOICE,         1, 1, 0 },
@@ -1049,7 +1044,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_GETLOCKSINFO:
                rc = getlocksinfo(data, state);
                break;
-#ifdef SECURITY
        case OPT_GETSECURITYCODE:
                rc = getsecuritycode(data, state);
                break;
@@ -1064,7 +1058,6 @@ static int parse_options(int argc, char *argv[])
        case OPT_CHANGESECURITYCODE:
                rc = changesecuritycode(optarg, data, state);
                        break;
-#endif
 
        /* File options */
        case OPT_GETFILELIST:

-----------------------------------------------------------------------

Summary of changes:
 Docs/sample/gnokiirc             |   18 +++++++++
 Windows/MSVC2010Express/config.h |    3 --
 Windows/MSVC6/config.h           |    3 --
 Windows/MSVC8/config.h           |    3 --
 Windows/MSVS2005/config.h        |    3 --
 Windows/MSVS2008/config.h        |    3 --
 Windows/MSVS2010/config.h        |    3 --
 common/cfgreader.c               |    2 +
 common/gsm-auth.c                |   72 +++++++++++++++++++++-----------------
 common/phones/atgen.c            |   10 -----
 common/phones/nk6100.c           |   18 ---------
 common/phones/nk6510.c           |   10 -----
 common/phones/pcsc.c             |   14 -------
 configure.in                     |   12 ------
 gnokii/gnokii-app.h              |    2 -
 gnokii/gnokii-security.c         |    8 ----
 gnokii/gnokii.c                  |    9 +----
 include/gnokii/common.h          |    1 +
 18 files changed, 62 insertions(+), 132 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]