summaryrefslogtreecommitdiff
path: root/src/lib/emile
diff options
context:
space:
mode:
authorVincent Torri <vincent.torri@gmail.com>2015-03-17 08:50:46 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-03-17 09:58:20 +0100
commitce394fae9537935102b4dbde94bf830ef986c1da (patch)
tree76a2951d58ec1da1e6e0fdd2f5231d0387eac283 /src/lib/emile
parente86b314971198a222fc041b7eb32c91c346d32b0 (diff)
emile: ERROR is a macro already defined on Windows
Diffstat (limited to 'src/lib/emile')
-rw-r--r--src/lib/emile/emile_cipher_openssl.c110
1 files changed, 55 insertions, 55 deletions
diff --git a/src/lib/emile/emile_cipher_openssl.c b/src/lib/emile/emile_cipher_openssl.c
index 222205422a..fe1279f446 100644
--- a/src/lib/emile/emile_cipher_openssl.c
+++ b/src/lib/emile/emile_cipher_openssl.c
@@ -350,178 +350,178 @@ _emile_cipher_print_verify_error(int error)
350{ 350{
351 switch (error) 351 switch (error)
352 { 352 {
353#define ERROR(X) \ 353#define ERROR_OPENSSL(X) \
354case (X): \ 354case (X): \
355 ERR("%s", #X); \ 355 ERR("%s", #X); \
356 break 356 break
357#ifdef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT 357#ifdef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
358 ERROR(X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT); 358 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT);
359#endif 359#endif
360#ifdef X509_V_ERR_UNABLE_TO_GET_CRL 360#ifdef X509_V_ERR_UNABLE_TO_GET_CRL
361 ERROR(X509_V_ERR_UNABLE_TO_GET_CRL); 361 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_GET_CRL);
362#endif 362#endif
363#ifdef X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE 363#ifdef X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE
364 ERROR(X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE); 364 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE);
365#endif 365#endif
366#ifdef X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE 366#ifdef X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE
367 ERROR(X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE); 367 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE);
368#endif 368#endif
369#ifdef X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY 369#ifdef X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY
370 ERROR(X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY); 370 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY);
371#endif 371#endif
372#ifdef X509_V_ERR_CERT_SIGNATURE_FAILURE 372#ifdef X509_V_ERR_CERT_SIGNATURE_FAILURE
373 ERROR(X509_V_ERR_CERT_SIGNATURE_FAILURE); 373 ERROR_OPENSSL(X509_V_ERR_CERT_SIGNATURE_FAILURE);
374#endif 374#endif
375#ifdef X509_V_ERR_CRL_SIGNATURE_FAILURE 375#ifdef X509_V_ERR_CRL_SIGNATURE_FAILURE
376 ERROR(X509_V_ERR_CRL_SIGNATURE_FAILURE); 376 ERROR_OPENSSL(X509_V_ERR_CRL_SIGNATURE_FAILURE);
377#endif 377#endif
378#ifdef X509_V_ERR_CERT_NOT_YET_VALID 378#ifdef X509_V_ERR_CERT_NOT_YET_VALID
379 ERROR(X509_V_ERR_CERT_NOT_YET_VALID); 379 ERROR_OPENSSL(X509_V_ERR_CERT_NOT_YET_VALID);
380#endif 380#endif
381#ifdef X509_V_ERR_CERT_HAS_EXPIRED 381#ifdef X509_V_ERR_CERT_HAS_EXPIRED
382 ERROR(X509_V_ERR_CERT_HAS_EXPIRED); 382 ERROR_OPENSSL(X509_V_ERR_CERT_HAS_EXPIRED);
383#endif 383#endif
384#ifdef X509_V_ERR_CRL_NOT_YET_VALID 384#ifdef X509_V_ERR_CRL_NOT_YET_VALID
385 ERROR(X509_V_ERR_CRL_NOT_YET_VALID); 385 ERROR_OPENSSL(X509_V_ERR_CRL_NOT_YET_VALID);
386#endif 386#endif
387#ifdef X509_V_ERR_CRL_HAS_EXPIRED 387#ifdef X509_V_ERR_CRL_HAS_EXPIRED
388 ERROR(X509_V_ERR_CRL_HAS_EXPIRED); 388 ERROR_OPENSSL(X509_V_ERR_CRL_HAS_EXPIRED);
389#endif 389#endif
390#ifdef X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD 390#ifdef X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD
391 ERROR(X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD); 391 ERROR_OPENSSL(X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD);
392#endif 392#endif
393#ifdef X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD 393#ifdef X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD
394 ERROR(X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD); 394 ERROR_OPENSSL(X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD);
395#endif 395#endif
396#ifdef X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD 396#ifdef X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD
397 ERROR(X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD); 397 ERROR_OPENSSL(X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD);
398#endif 398#endif
399#ifdef X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD 399#ifdef X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD
400 ERROR(X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD); 400 ERROR_OPENSSL(X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD);
401#endif 401#endif
402#ifdef X509_V_ERR_OUT_OF_MEM 402#ifdef X509_V_ERR_OUT_OF_MEM
403 ERROR(X509_V_ERR_OUT_OF_MEM); 403 ERROR_OPENSSL(X509_V_ERR_OUT_OF_MEM);
404#endif 404#endif
405#ifdef X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT 405#ifdef X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
406 ERROR(X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT); 406 ERROR_OPENSSL(X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT);
407#endif 407#endif
408#ifdef X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN 408#ifdef X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN
409 ERROR(X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN); 409 ERROR_OPENSSL(X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN);
410#endif 410#endif
411#ifdef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY 411#ifdef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
412 ERROR(X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY); 412 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY);
413#endif 413#endif
414#ifdef X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE 414#ifdef X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE
415 ERROR(X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE); 415 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE);
416#endif 416#endif
417#ifdef X509_V_ERR_CERT_CHAIN_TOO_LONG 417#ifdef X509_V_ERR_CERT_CHAIN_TOO_LONG
418 ERROR(X509_V_ERR_CERT_CHAIN_TOO_LONG); 418 ERROR_OPENSSL(X509_V_ERR_CERT_CHAIN_TOO_LONG);
419#endif 419#endif
420#ifdef X509_V_ERR_CERT_REVOKED 420#ifdef X509_V_ERR_CERT_REVOKED
421 ERROR(X509_V_ERR_CERT_REVOKED); 421 ERROR_OPENSSL(X509_V_ERR_CERT_REVOKED);
422#endif 422#endif
423#ifdef X509_V_ERR_INVALID_CA 423#ifdef X509_V_ERR_INVALID_CA
424 ERROR(X509_V_ERR_INVALID_CA); 424 ERROR_OPENSSL(X509_V_ERR_INVALID_CA);
425#endif 425#endif
426#ifdef X509_V_ERR_PATH_LENGTH_EXCEEDED 426#ifdef X509_V_ERR_PATH_LENGTH_EXCEEDED
427 ERROR(X509_V_ERR_PATH_LENGTH_EXCEEDED); 427 ERROR_OPENSSL(X509_V_ERR_PATH_LENGTH_EXCEEDED);
428#endif 428#endif
429#ifdef X509_V_ERR_INVALID_PURPOSE 429#ifdef X509_V_ERR_INVALID_PURPOSE
430 ERROR(X509_V_ERR_INVALID_PURPOSE); 430 ERROR_OPENSSL(X509_V_ERR_INVALID_PURPOSE);
431#endif 431#endif
432#ifdef X509_V_ERR_CERT_UNTRUSTED 432#ifdef X509_V_ERR_CERT_UNTRUSTED
433 ERROR(X509_V_ERR_CERT_UNTRUSTED); 433 ERROR_OPENSSL(X509_V_ERR_CERT_UNTRUSTED);
434#endif 434#endif
435#ifdef X509_V_ERR_CERT_REJECTED 435#ifdef X509_V_ERR_CERT_REJECTED
436 ERROR(X509_V_ERR_CERT_REJECTED); 436 ERROR_OPENSSL(X509_V_ERR_CERT_REJECTED);
437#endif 437#endif
438 /* These are 'informational' when looking for issuer cert */ 438 /* These are 'informational' when looking for issuer cert */
439#ifdef X509_V_ERR_SUBJECT_ISSUER_MISMATCH 439#ifdef X509_V_ERR_SUBJECT_ISSUER_MISMATCH
440 ERROR(X509_V_ERR_SUBJECT_ISSUER_MISMATCH); 440 ERROR_OPENSSL(X509_V_ERR_SUBJECT_ISSUER_MISMATCH);
441#endif 441#endif
442#ifdef X509_V_ERR_AKID_SKID_MISMATCH 442#ifdef X509_V_ERR_AKID_SKID_MISMATCH
443 ERROR(X509_V_ERR_AKID_SKID_MISMATCH); 443 ERROR_OPENSSL(X509_V_ERR_AKID_SKID_MISMATCH);
444#endif 444#endif
445#ifdef X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH 445#ifdef X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH
446 ERROR(X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH); 446 ERROR_OPENSSL(X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH);
447#endif 447#endif
448#ifdef X509_V_ERR_KEYUSAGE_NO_CERTSIGN 448#ifdef X509_V_ERR_KEYUSAGE_NO_CERTSIGN
449 ERROR(X509_V_ERR_KEYUSAGE_NO_CERTSIGN); 449 ERROR_OPENSSL(X509_V_ERR_KEYUSAGE_NO_CERTSIGN);
450#endif 450#endif
451 451
452#ifdef X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER 452#ifdef X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER
453 ERROR(X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER); 453 ERROR_OPENSSL(X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER);
454#endif 454#endif
455#ifdef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION 455#ifdef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION
456 ERROR(X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION); 456 ERROR_OPENSSL(X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION);
457#endif 457#endif
458#ifdef X509_V_ERR_KEYUSAGE_NO_CRL_SIGN 458#ifdef X509_V_ERR_KEYUSAGE_NO_CRL_SIGN
459 ERROR(X509_V_ERR_KEYUSAGE_NO_CRL_SIGN); 459 ERROR_OPENSSL(X509_V_ERR_KEYUSAGE_NO_CRL_SIGN);
460#endif 460#endif
461#ifdef X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION 461#ifdef X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION
462 ERROR(X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION); 462 ERROR_OPENSSL(X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION);
463#endif 463#endif
464#ifdef X509_V_ERR_INVALID_NON_CA 464#ifdef X509_V_ERR_INVALID_NON_CA
465 ERROR(X509_V_ERR_INVALID_NON_CA); 465 ERROR_OPENSSL(X509_V_ERR_INVALID_NON_CA);
466#endif 466#endif
467#ifdef X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED 467#ifdef X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED
468 ERROR(X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED); 468 ERROR_OPENSSL(X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED);
469#endif 469#endif
470#ifdef X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE 470#ifdef X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE
471 ERROR(X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE); 471 ERROR_OPENSSL(X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE);
472#endif 472#endif
473#ifdef X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED 473#ifdef X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED
474 ERROR(X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED); 474 ERROR_OPENSSL(X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED);
475#endif 475#endif
476 476
477#ifdef X509_V_ERR_INVALID_EXTENSION 477#ifdef X509_V_ERR_INVALID_EXTENSION
478 ERROR(X509_V_ERR_INVALID_EXTENSION); 478 ERROR_OPENSSL(X509_V_ERR_INVALID_EXTENSION);
479#endif 479#endif
480#ifdef X509_V_ERR_INVALID_POLICY_EXTENSION 480#ifdef X509_V_ERR_INVALID_POLICY_EXTENSION
481 ERROR(X509_V_ERR_INVALID_POLICY_EXTENSION); 481 ERROR_OPENSSL(X509_V_ERR_INVALID_POLICY_EXTENSION);
482#endif 482#endif
483#ifdef X509_V_ERR_NO_EXPLICIT_POLICY 483#ifdef X509_V_ERR_NO_EXPLICIT_POLICY
484 ERROR(X509_V_ERR_NO_EXPLICIT_POLICY); 484 ERROR_OPENSSL(X509_V_ERR_NO_EXPLICIT_POLICY);
485#endif 485#endif
486#ifdef X509_V_ERR_DIFFERENT_CRL_SCOPE 486#ifdef X509_V_ERR_DIFFERENT_CRL_SCOPE
487 ERROR(X509_V_ERR_DIFFERENT_CRL_SCOPE); 487 ERROR_OPENSSL(X509_V_ERR_DIFFERENT_CRL_SCOPE);
488#endif 488#endif
489#ifdef X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE 489#ifdef X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE
490 ERROR(X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE); 490 ERROR_OPENSSL(X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE);
491#endif 491#endif
492 492
493#ifdef X509_V_ERR_UNNESTED_RESOURCE 493#ifdef X509_V_ERR_UNNESTED_RESOURCE
494 ERROR(X509_V_ERR_UNNESTED_RESOURCE); 494 ERROR_OPENSSL(X509_V_ERR_UNNESTED_RESOURCE);
495#endif 495#endif
496 496
497#ifdef X509_V_ERR_PERMITTED_VIOLATION 497#ifdef X509_V_ERR_PERMITTED_VIOLATION
498 ERROR(X509_V_ERR_PERMITTED_VIOLATION); 498 ERROR_OPENSSL(X509_V_ERR_PERMITTED_VIOLATION);
499#endif 499#endif
500#ifdef X509_V_ERR_EXCLUDED_VIOLATION 500#ifdef X509_V_ERR_EXCLUDED_VIOLATION
501 ERROR(X509_V_ERR_EXCLUDED_VIOLATION); 501 ERROR_OPENSSL(X509_V_ERR_EXCLUDED_VIOLATION);
502#endif 502#endif
503#ifdef X509_V_ERR_SUBTREE_MINMAX 503#ifdef X509_V_ERR_SUBTREE_MINMAX
504 ERROR(X509_V_ERR_SUBTREE_MINMAX); 504 ERROR_OPENSSL(X509_V_ERR_SUBTREE_MINMAX);
505#endif 505#endif
506#ifdef X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE 506#ifdef X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE
507 ERROR(X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE); 507 ERROR_OPENSSL(X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE);
508#endif 508#endif
509#ifdef X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX 509#ifdef X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX
510 ERROR(X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX); 510 ERROR_OPENSSL(X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX);
511#endif 511#endif
512#ifdef X509_V_ERR_UNSUPPORTED_NAME_SYNTAX 512#ifdef X509_V_ERR_UNSUPPORTED_NAME_SYNTAX
513 ERROR(X509_V_ERR_UNSUPPORTED_NAME_SYNTAX); 513 ERROR_OPENSSL(X509_V_ERR_UNSUPPORTED_NAME_SYNTAX);
514#endif 514#endif
515#ifdef X509_V_ERR_CRL_PATH_VALIDATION_ERROR 515#ifdef X509_V_ERR_CRL_PATH_VALIDATION_ERROR
516 ERROR(X509_V_ERR_CRL_PATH_VALIDATION_ERROR); 516 ERROR_OPENSSL(X509_V_ERR_CRL_PATH_VALIDATION_ERROR);
517#endif 517#endif
518 518
519 /* The application is not happy */ 519 /* The application is not happy */
520#ifdef X509_V_ERR_APPLICATION_VERIFICATION 520#ifdef X509_V_ERR_APPLICATION_VERIFICATION
521 ERROR(X509_V_ERR_APPLICATION_VERIFICATION); 521 ERROR_OPENSSL(X509_V_ERR_APPLICATION_VERIFICATION);
522#endif 522#endif
523 } 523 }
524#undef ERROR 524#undef ERROR_OPENSSL
525} 525}
526 526
527static void 527static void