case SSL_SECURITY:            on = ss->useSecurity;        break; case SSL_REQUEST_CERTIFICATE: on = ss->requestCertificate; break; case SSL_REQUIRE_CERTIFICATE: on = ss->requireCertificate; break; case SSL_HANDSHAKE_AS_CLIENT: on = ss->handshakeAsClient;  break; case SSL_HANDSHAKE_AS_SERVER: on = ss->handshakeAsServer;  break; case SSL_ENABLE_TLS:          on = ss->enableTLS;          break; case SSL_ENABLE_SSL3:         on = ss->enableSSL3;         break; case SSL_ENABLE_SSL2:         on = ss->enableSSL2;         break; case SSL_NO_CACHE:            on = ss->noCache;            break; case SSL_ENABLE_FDX:          on = ss->fdx;                break; case SSL_V2_COMPATIBLE_HELLO: on = ss->v2CompatibleHello;  break; case SSL_ROLLBACK_DETECTION:  on = ss->detectRollBack;     break; case SSL_NO_STEP_DOWN:        on = ss->noStepDown;         break;
case SSL_SECURITY:            on = ss->opt.useSecurity;        break; case SSL_REQUEST_CERTIFICATE: on = ss->opt.requestCertificate; break; case SSL_REQUIRE_CERTIFICATE: on = ss->opt.requireCertificate; break; case SSL_HANDSHAKE_AS_CLIENT: on = ss->opt.handshakeAsClient;  break; case SSL_HANDSHAKE_AS_SERVER: on = ss->opt.handshakeAsServer;  break; case SSL_ENABLE_TLS:          on = ss->opt.enableTLS;          break; case SSL_ENABLE_SSL3:         on = ss->opt.enableSSL3;         break; case SSL_ENABLE_SSL2:         on = ss->opt.enableSSL2;         break; case SSL_NO_CACHE:            on = ss->opt.noCache;            break; case SSL_ENABLE_FDX:          on = ss->opt.fdx;                break; case SSL_V2_COMPATIBLE_HELLO: on = ss->opt.v2CompatibleHello;  break; case SSL_ROLLBACK_DETECTION:  on = ss->opt.detectRollBack;     break; case SSL_NO_STEP_DOWN:        on = ss->opt.noStepDown;         break; case SSL_BYPASS_PKCS11:       on = ss->opt.bypassPKCS11;       break; case SSL_NO_LOCKS:            on = ss->opt.noLocks;            break;
SSL_OptionGet(PRFileDesc *fd, PRInt32 which, PRBool *pOn){    sslSocket *ss = ssl_FindSocket(fd);    SECStatus  rv = SECSuccess;    PRBool     on = PR_FALSE;    if (!pOn) {	PORT_SetError(SEC_ERROR_INVALID_ARGS);	return SECFailure;    }    if (!ss) {	SSL_DBG(("%d: SSL[%d]: bad socket in Enable", SSL_GETPID(), fd));	*pOn = PR_FALSE;	return SECFailure;    }    ssl_Get1stHandshakeLock(ss);    ssl_GetSSL3HandshakeLock(ss);    switch (which) {    case SSL_SOCKS:               on = PR_FALSE;               break;    case SSL_SECURITY:            on = ss->useSecurity;        break;    case SSL_REQUEST_CERTIFICATE: on = ss->requestCertificate; break;    case SSL_REQUIRE_CERTIFICATE: on = ss->requireCertificate; break;    case SSL_HANDSHAKE_AS_CLIENT: on = ss->handshakeAsClient;  break;    case SSL_HANDSHAKE_AS_SERVER: on = ss->handshakeAsServer;  break;    case SSL_ENABLE_TLS:          on = ss->enableTLS;          break;    case SSL_ENABLE_SSL3:         on = ss->enableSSL3;         break;    case SSL_ENABLE_SSL2:         on = ss->enableSSL2;         break;    case SSL_NO_CACHE:            on = ss->noCache;            break;    case SSL_ENABLE_FDX:          on = ss->fdx;                break;    case SSL_V2_COMPATIBLE_HELLO: on = ss->v2CompatibleHello;  break;    case SSL_ROLLBACK_DETECTION:  on = ss->detectRollBack;     break;    case SSL_NO_STEP_DOWN:        on = ss->noStepDown;         break;    default:	PORT_SetError(SEC_ERROR_INVALID_ARGS);	rv = SECFailure;    }    ssl_ReleaseSSL3HandshakeLock(ss);    ssl_Release1stHandshakeLock(ss);    *pOn = on;    return rv;}