View | Details | Raw Unified | Return to bug 50570
Collapse All | Expand All

(-)src/ssl.c (+34 lines)
Lines 503-508 Link Here
503
    }
503
    }
504
    TCN_FREE_CSTRING(file);
504
    TCN_FREE_CSTRING(file);
505
}
505
}
506
507
TCN_IMPLEMENT_CALL(jint, SSL, fipsModeSet)(TCN_STDARGS, jint mode)
508
{
509
    int r = 0;
510
511
    UNREFERENCED(o);
512
513
#ifdef OPENSSL_FIPS
514
    if(!(r = FIPS_mode_set((int)mode))) {
515
      /* arrange to get a human-readable error message */
516
      unsigned long err = ERR_get_error();
517
      char msg[255];
518
519
      /* ERR_load_crypto_strings() already called in initialize() */
520
521
      ERR_error_string_n(err, msg, 255);
522
523
      tcn_ThrowException(e, msg);
524
525
      r = 0;
526
    }
527
#else
528
    /* FIPS is unavailable */
529
    tcn_ThrowException(e, "FIPS mode not supported by OpenSSL");
530
#endif
531
    return r;
532
}
533
506
/* OpenSSL Java Stream BIO */
534
/* OpenSSL Java Stream BIO */
507
535
508
typedef struct  {
536
typedef struct  {
Lines 876-881 Link Here
876
    UNREFERENCED(file);
904
    UNREFERENCED(file);
877
}
905
}
878
906
907
TCN_IMPLEMENT_CALL(jint, SSL, fipsModeSet)(TCN_STDARGS, jint mode)
908
{
909
    UNREFERENCED_STDARGS;
910
    UNREFERENCED(mode);
911
}
912
879
TCN_IMPLEMENT_CALL(jlong, SSL, newBIO)(TCN_STDARGS, jlong pool,
913
TCN_IMPLEMENT_CALL(jlong, SSL, newBIO)(TCN_STDARGS, jlong pool,
880
                                       jobject callback)
914
                                       jobject callback)
881
{
915
{

Return to bug 50570