Changeset 1398:8285e9c45919 in roaraudio for libroar/pinentry.c
- Timestamp:
- 03/25/09 17:56:56 (15 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/pinentry.c
r1392 r1398 36 36 37 37 int roar_pinentry_open (struct roar_pinentry * pe, int flags, char * display, char * tty, char * term) { 38 #if def ROAR_HAVE_BIN_PINENTRY38 #if defined(ROAR_HAVE_BIN_PINENTRY) && defined(ROAR_SUPPORT_PASSWORD_API) 39 39 int in[2], out[2]; 40 40 … … 127 127 128 128 int roar_pinentry_close(struct roar_pinentry * pe) { 129 #if def ROAR_HAVE_BIN_PINENTRY129 #if defined(ROAR_HAVE_BIN_PINENTRY) && defined(ROAR_SUPPORT_PASSWORD_API) 130 130 int status; 131 131 … … 156 156 157 157 int roar_pinentry_send (struct roar_pinentry * pe, char * cmd, char * args) { 158 #if def ROAR_HAVE_BIN_PINENTRY158 #if defined(ROAR_HAVE_BIN_PINENTRY) && defined(ROAR_SUPPORT_PASSWORD_API) 159 159 size_t len; 160 160 … … 192 192 #define MAX_LINE_SIZE 2048 193 193 int roar_pinentry_recv (struct roar_pinentry * pe, char ** line, char ** opts) { 194 #if def ROAR_HAVE_BIN_PINENTRY194 #if defined(ROAR_HAVE_BIN_PINENTRY) && defined(ROAR_SUPPORT_PASSWORD_API) 195 195 char realbuf[MAX_LINE_SIZE]; 196 196 char * tp; … … 256 256 257 257 int roar_pinentry_req (struct roar_pinentry * pe, char * cmd, char * args, char ** line, char ** opts) { 258 #ifdef ROAR_SUPPORT_PASSWORD_API 258 259 if ( pe == NULL ) 259 260 return -1; … … 263 264 264 265 return roar_pinentry_recv(pe, line, opts); 266 #else 267 return -1; 268 #endif 265 269 } 266 270 … … 282 286 283 287 int roar_pinentry_set (struct roar_pinentry * pe, char * obj, char * text) { 288 #ifdef ROAR_SUPPORT_PASSWORD_API 284 289 char req[80] = "SET"; 285 290 … … 296 301 297 302 return roar_pinentry_req(pe, req, text, NULL, NULL); 303 #else 304 return -1; 305 #endif 298 306 } 299 307 300 308 int roar_pinentry_getpin (struct roar_pinentry * pe, char ** pw, char * desc, char * prompt) { 309 #ifdef ROAR_SUPPORT_PASSWORD_API 301 310 if ( pe == NULL ) 302 311 return -1; … … 317 326 318 327 return 0; 328 #else 329 return -1; 330 #endif 319 331 } 320 332 321 333 int roar_pinentry_confirm (struct roar_pinentry * pe, char * desc, char * yes, char * no) { 334 #ifdef ROAR_SUPPORT_PASSWORD_API 322 335 if ( pe == NULL ) 323 336 return -1; … … 336 349 337 350 return roar_pinentry_req(pe, "CONFIRM", NULL, NULL, NULL); 351 #else 352 return -1; 353 #endif 338 354 } 339 355
Note: See TracChangeset
for help on using the changeset viewer.