akm2 has asked for the wisdom of the Perl Monks concerning the following question:

Im look for a way to determine if a user is connected to my http or https server before I accept senseitive data. I also would like to know the encryption level of the user's browser. Any ideas?

Replies are listed 'Best First'.
Re: Secure or not secure, that question.
by merlyn (Sage) on Mar 13, 2001 at 21:55 UTC
    There are CGI environment variables to determine that. See the docs for your specific server for details.

    Do not rely on any environment variable beginning with HTTP_, however.

    -- Randal L. Schwartz, Perl hacker

      merlyn, I'm just wondering what you mean about not relying on any environment variable beginning with HTTP_?

        As the CGI docs will tell you, environment variables beginning with HTTP_ are the HTTP headers sent by the client in its request.

        So, if an HTTP request contains the header Field: Value, then a Perl CGI will see $ENV{'HTTP_FIELD'} as the string Value.

Re: Secure or not secure, that question.
by enoch (Chaplain) on Mar 13, 2001 at 22:56 UTC
    To add on to what merlyn said, the environment variables should be:

    SERVER_PORT should be 443 for SSL
    SSL_CIPHER_ALGKEYSIZE and SSL_CIPHER_USEKEYSIZE should be 128 bit for good encryption

    At least, I know this works for Apache.

    Jeremy