JSS_throwMsg(env, SOCKET_EXCEPTION, "Failed to set the SSL URL");
JSS_throwMsgPrErr(env, SOCKET_EXCEPTION, "Failed to set the SSL URL");
Java_org_mozilla_jss_ssl_SSLSocket_socketConnect    (JNIEnv *env, jobject self, jbyteArray addrBA, jstring hostname, jint port){    JSSL_SocketData *sock;    PRNetAddr addr;    jbyte *addrBAelems = NULL;    PRStatus status;    int stat;    const char *hostnameStr=NULL;    if( JSSL_getSockData(env, self, &sock) != PR_SUCCESS) {        /* exception was thrown */        goto finish;    }    /*     * setup the PRNetAddr structure     */    addr.inet.family = AF_INET;    addr.inet.port = htons(port);    PR_ASSERT(sizeof(addr.inet.ip) == 4);    PR_ASSERT( (*env)->GetArrayLength(env, addrBA) == 4);    addrBAelems = (*env)->GetByteArrayElements(env, addrBA, NULL);    if( addrBAelems == NULL ) {        ASSERT_OUTOFMEM(env);        goto finish;    }    memcpy(&addr.inet.ip, addrBAelems, 4);    /*     * Tell SSL the URL we think we want to connect to.     * This prevents man-in-the-middle attacks.     */    hostnameStr = (*env)->GetStringUTFChars(env, hostname, NULL);    if( hostnameStr == NULL ) goto finish;    printf("*** Hostname: %s\n", hostnameStr);    stat = SSL_SetURL(sock->fd, (char*)hostnameStr);    if( stat != 0 ) {        JSS_throwMsg(env, SOCKET_EXCEPTION, "Failed to set the SSL URL");        goto finish;    }    /*     * make the connect call     */    status = PR_Connect(sock->fd, &addr, PR_INTERVAL_NO_TIMEOUT);    if( status != PR_SUCCESS) {        JSS_throwMsg(env, SOCKET_EXCEPTION, "Unable to connect");        goto finish;    }finish:    if( hostnameStr != NULL ) {        (*env)->ReleaseStringUTFChars(env, hostname, hostnameStr);    }}