Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Secure or not secure, that question.

by akm2 (Scribe)
on Mar 13, 2001 at 21:50 UTC ( [id://64172]=perlquestion: print w/replies, xml ) Need Help??

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://64172]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 17:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found