Commit Graph

113 Commits

Author SHA1 Message Date
Ryan Culpepper
07c6e89899 remove cancel box, no longer needed with ffi/unsafe/alloc
Also, found the source of mem corruption: the finalizer's cancel box
(from create-ssl) was shadowed by a new box put in mzssl struct.
2012-11-21 12:56:31 -05:00
Ryan Culpepper
44177ca406 use ffi/unsafe/alloc
Fixes a memory leak in SSL_get_peer_certificate.

Fixes a memory leak (finalizer closure refers to obj) in create-ssl
for _SSL* obj. Correcting the finalizer to run caused mem corruption
(possibly due to double-freeing in mzssl-release, despite cancel box)
but changing to allocator/deallocator seems to avoid the problem.
2012-11-21 12:56:31 -05:00
Ryan Culpepper
25847a9342 lift error checking out of atomic 2012-11-21 12:56:31 -05:00
Ryan Culpepper
df10bf3421 simpler version of make-immobile-bytes 2012-11-21 12:56:31 -05:00
Ryan Culpepper
b377976ba5 use ffi/unsafe/atomic 2012-11-21 12:56:31 -05:00
Ryan Culpepper
85fba029a5 use define-cpointer-type 2012-11-21 12:56:31 -05:00
Ryan Culpepper
ba62b1dd57 added ssl-secure-client-connection 2012-11-21 12:39:18 -05:00
Ryan Culpepper
f446adad3f added ssl-set-ciphers! 2012-11-21 12:39:17 -05:00
Ryan Culpepper
4b4113d528 get default CA cert locations (when available)
This probably doesn't work on Windows or Mac OS X.
2012-11-21 12:39:17 -05:00
Ryan Culpepper
c632a84a95 add ssl-seal-context!
Unsealed contexts are not safe to share, because one user may
change it in a way that ruins the security of another.
2012-11-21 12:39:17 -05:00
Ryan Culpepper
ba1f4a6b22 fix for ssl-set-verify-hostname! 2012-11-17 16:46:10 -05:00
Ryan Culpepper
c5f8aa41ee add some basic notes on using ssl securely 2012-11-17 16:35:03 -05:00
Ryan Culpepper
5cdb967251 added ssl-set-verify-hostname! 2012-11-17 15:36:18 -05:00
Ryan Culpepper
1c0e08f0a6 do security-guard check in ssl-load... 2012-11-17 14:47:13 -05:00
Ryan Culpepper
d6cb2ecee6 add ssl hostname verification support 2012-11-17 14:47:13 -05:00
Matthew Flatt
98f1b8da94 typo/update comment 2012-11-16 21:56:19 -07:00
Matthew Flatt
be538b4f69 accomodate OpenBSD linking of libssl
Merge to v5.3.1
2012-10-18 11:58:59 -06:00
Marc Burns
fa0336bfad Call close-output-port' on abandoned port in ssl-abandon-port'.
This change causes the abandoned output port to be properly shutdown,
when the `shutdown-on-close' option is set, and decrements the mzssl
struct reference count when a port is abandoned.

Previously, the `*-[im]pure-port' methods from `net/url' would fail to
close the SSL socket associated with the connection when
`close-input-port' was called on the port object returned.  This patch
causes the underlying socket to be closed when `close-input-port' is
called on SSL-based ports returned by functions in `net/url'.
2012-10-05 11:13:20 -04:00
Matthew Flatt
a137459b65 more error-message conversions and repairs 2012-05-27 11:29:21 -06:00
Matthew Flatt
06e94d510a openssl: another attempt to get SSL_shutdown right 2012-03-02 10:33:36 -07:00
Matthew Flatt
a976c56cb9 openssl: more little fixes
Fix an error message broken by earlier debugging, and also
fix long-standing shutdown problems. Move basic tests to more
standard location.
2012-03-01 20:34:53 -07:00
Matthew Flatt
fc2eb1c11c openssl: fix error handling
The recent thread-safety change wasn't right.
2012-03-01 15:43:04 -07:00
Matthew Flatt
14f03bcf5b openssl: thread safety
There are many SSL_() functions that produce return codes with more
information from SLL_get_error() and/or ERR_get_error(). Those need
to be grouped in an atomic section to ensure thread safety at the
level of Racket threads.
2012-03-01 11:02:48 -07:00
Matthew Flatt
1032ce8afe openssl: make ssl-set-verify!' and ssl-try-verify!' work on ports
Using the functions on a port triggers renegotiation of the
connection, which s useful for cases such as a web server that
requires a certificate only for certain paths. This functionality
also allows better testing of the SSL library.
2012-03-01 11:02:48 -07:00
Matthew Flatt
efcb607865 fix openssl problem
Read and write actions on an SSL port can trigger internal write
and read actions (i.e., the opposite direction). On the read side,
write pumping was performed too early before returning a "wait
for new input" event; SSL operations between the pumping and
return could trigger the need for pumping, but it never happened
because the socket was waiting for new input before taking any
new actions.

The problem would shows up specifically when Apache renegotiates
a connection to demand certificates from a client after first
determining the target of the request (i.e., when a certificate
is required ony for specific locations on the server).

Thenks to Sergey Pinaev, Timur Sufiev, and Neil Van Dyke.
2012-03-01 11:02:47 -07:00
Matthew Flatt
f54254e9b5 ssl library versions for Ubuntu 11.10 2011-11-18 01:58:31 -07:00
Eli Barzilay
84d24bac80 Works up to the current version number, which is "1.0.0e". 2011-09-16 10:48:18 -04:00
Jay McCarthy
5c4a5ceb81 Adding another variant of libssl for CentOS 2011-08-27 06:54:50 -06:00
Eli Barzilay
a6705c4f07 Typo fix 2011-08-03 22:00:22 -04:00
Eli Barzilay
3157955d40 ".ss" -> ".rkt" scan done. 2011-07-02 10:37:53 -04:00
Ryan Culpepper
1b702a2ae3 docs reorganization
added tutorial, racket categories
  relabeled some other categories
  normalized manual names: de-bolded, changed some names
2011-07-01 17:16:53 -06:00
Robby Findler
69b5daa9e6 remove docs tests that no one was interested in 2011-07-01 11:38:09 +08:00
Matthew Flatt
9bceb885c7 make sure only one place initializes SSL 2011-06-30 10:53:19 -06:00
Eli Barzilay
ac26fe7554 A ton of @scheme*' -> @racket*' and related updates.
Also, updates some of the mzlib files to point at `racket/*' libraries
rather than to `scheme/*' ones.
2011-06-25 04:08:47 -04:00
Eli Barzilay
debd1f9f1e Recketizing much in `net/*', mass ".ss" -> ".rkt" conversion in .scrbl files.
(Some other minor things here and there.)
2011-06-20 04:27:14 -04:00
Robby Findler
507b1cd8fd moved the docs-complete library into rackunit
to avoid having a separate, new manual for the
  one library
2011-05-05 16:10:42 -05:00
Asumu Takikawa
4cc0af90aa Handle SSLv2 absence gracefully and update docs. 2011-04-25 17:56:45 -04:00
Robby Findler
e7d0029aea added lots of new tests that our documentation is complete 2011-04-25 13:24:43 -05:00
Matthew Flatt
ff6da2e43e add docs for openssl additions 2011-03-03 07:18:51 -07:00
Curtis Dutton
7a33c9cebb Adds ssl-try-verify! to the openssl package along with supporting procedures.
This enables an ssl server the option to communicate with both verified and unverified peers with the same listener.

Supporting API calls...

ssl-peer-verified? -> returns #t if an ssl-port's peer has presented a valid and verified certificate
ssl-peer-subject-name -> returns the subject field of the certificate presented by an ssl-port's peer
ssl-peer-issuer-name -> returns the issuer field of the certificate presented by an ssl-port's peer
2011-03-03 07:07:53 -07:00
Matthew Flatt
4afd36c9fd openssl: use libcrypto and libssl version 1.0 if available
and single point of control for all uses
2011-03-02 12:07:45 -07:00
David Van Horn
c9519fd113 Fixed various spelling errors. 2011-02-03 17:42:33 -05:00
Matthew Flatt
421519994d make SSL listeners events 2010-11-17 13:16:53 -07:00
Jay McCarthy
e847632456 OpenSSL more compatible with tcp unit 2010-10-06 10:41:09 -06:00
Matthew Flatt
16f1dffe4c add `ssl-port?' and add missing docs for two other procs 2010-08-19 16:14:11 -06:00
Matthew Flatt
a306a646e6 fix build for disabled FFI 2010-07-13 16:07:03 -06:00
Matthew Flatt
94799247ee add file/sha1 and use it in openssl/sha1 when OpenSSL fails to load 2010-07-13 16:07:03 -06:00
Eli Barzilay
2d9601089d A lot of "MzScheme" -> "Racket"s. 2010-05-16 18:26:26 -04:00
Matthew Flatt
1a5e662433 doc corrections and completions 2010-05-08 11:46:14 -06:00
Matthew Flatt
eb15dceb34 rackety misc docs 2010-05-07 09:13:51 -06:00