Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding project documentation files. Adding a script to update the pro…

…ject web site. Updating project web page with better docs and a wrapper example
commit 0377e2005ff34c39ff1234b57ac127f704a49ac8 1 parent 645fcd3
@flaub flaub authored
View
1  .gitignore
@@ -8,3 +8,4 @@ dist
*.pidb
*.aps
*.eto
+.DS_Store
View
43 CHANGES
@@ -0,0 +1,43 @@
+OpenSSL.NET - CHANGES
+
+0.4 [Aug 26, 2009]
+
+* Thanks to Ben Henderson for contributing the wrapper for the SSL API!
+* Lots of bug fixes mostly concerning memory management.
+* Refactored the Base class to deal with memory mangement better.
+* Default project build now produces assemblies specifically targetted for
+ the x86 architecture, which works around issues with using the native
+ DLL on 64-bit machines.
+* Lots more XML comments/docs (no more compiler warnings!)
+* Changes to namespace on most classes so it's easier to navigate them.
+* Added unit tests for X509Certificate and CryptoKey (many more to go)
+* Support for CE has been dropped due to lack of testing. Will add again
+ once I have the ability to test it again.
+* Added HMAC wrapper.
+
+0.3.2 [Jun 01, 2008]
+
+* Added wrapper and test for EVP_BytesToKey().
+
+0.3.1 [May 11, 2008]
+
+* Thanks to Christoph Scrauth for helping me find and fix a few bugs.
+
+0.3 [Jan 02, 2008]
+
+* Added RAND wrapper and tests.
+* Added RSA wrapper and tests.
+* Added a couple more commands to openssl+.exe (genrsa, rsa)
+* Added comments to all publicly facing interfaces.
+
+0.2 [Dec 20, 2007]
+
+* Fixed callbacks to use __cdecl instead of the default of __stdcall.
+* Added SHA tests.
+* Added DH tests.
+* Upgraded the DSA wrapper.
+* Upgraded the DH wrapper.
+
+0.1 [Apr 21, 2007]
+
+* Initial public release
View
6 INSTALL
@@ -0,0 +1,6 @@
+OpenSSL.NET - INSTALL
+
+Make sure you have libeay32.dll and ssleay32.dll in the current working
+directory of your application or in your PATH.
+
+In your .NET project, add a reference to the ManagedOpenSsl.dll assembly.
View
127 LICENSE
@@ -0,0 +1,127 @@
+
+ LICENSE ISSUES
+ ==============
+
+ The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
+ the OpenSSL License and the original SSLeay license apply to the toolkit.
+ See below for the actual license texts. Actually both licenses are BSD-style
+ Open Source licenses. In case of any license issues related to OpenSSL
+ please contact openssl-core@openssl.org.
+
+ OpenSSL License
+ ---------------
+
+/* ====================================================================
+ * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. All advertising materials mentioning features or use of this
+ * software must display the following acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
+ *
+ * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
+ * endorse or promote products derived from this software without
+ * prior written permission. For written permission, please contact
+ * openssl-core@openssl.org.
+ *
+ * 5. Products derived from this software may not be called "OpenSSL"
+ * nor may "OpenSSL" appear in their names without prior written
+ * permission of the OpenSSL Project.
+ *
+ * 6. Redistributions of any form whatsoever must retain the following
+ * acknowledgment:
+ * "This product includes software developed by the OpenSSL Project
+ * for use in the OpenSSL Toolkit (http://www.openssl.org/)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
+ * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This product includes cryptographic software written by Eric Young
+ * (eay@cryptsoft.com). This product includes software written by Tim
+ * Hudson (tjh@cryptsoft.com).
+ *
+ */
+
+ Original SSLeay License
+ -----------------------
+
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
+ * All rights reserved.
+ *
+ * This package is an SSL implementation written
+ * by Eric Young (eay@cryptsoft.com).
+ * The implementation was written so as to conform with Netscapes SSL.
+ *
+ * This library is free for commercial and non-commercial use as long as
+ * the following conditions are aheared to. The following conditions
+ * apply to all code found in this distribution, be it the RC4, RSA,
+ * lhash, DES, etc., code; not just the SSL code. The SSL documentation
+ * included with this distribution is covered by the same copyright terms
+ * except that the holder is Tim Hudson (tjh@cryptsoft.com).
+ *
+ * Copyright remains Eric Young's, and as such any Copyright notices in
+ * the code are not to be removed.
+ * If this package is used in a product, Eric Young should be given attribution
+ * as the author of the parts of the library used.
+ * This can be in the form of a textual message at program startup or
+ * in documentation (online or textual) provided with the package.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * "This product includes cryptographic software written by
+ * Eric Young (eay@cryptsoft.com)"
+ * The word 'cryptographic' can be left out if the rouines from the library
+ * being used are not cryptographic related :-).
+ * 4. If you include any Windows specific code (or a derivative thereof) from
+ * the apps directory (application code) you must include an acknowledgement:
+ * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
+ *
+ * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * The licence and distribution terms for any publically available version or
+ * derivative of this code cannot be changed. i.e. this code cannot simply be
+ * copied and put under another distribution licence
+ * [including the GNU Public Licence.]
+ */
+
View
58 README
@@ -0,0 +1,58 @@
+OpenSSL.NET - README
+
+Description
+-----------
+
+A managed OpenSSL wrapper written in C# for the 2.0 .NET Framework that
+exposes both the Crypto API and the SSL API.
+
+This a must for .NET developers that need crypto but don't want to use
+Microsoft's SSPI.
+
+This wrapper is based on version 0.9.8k of libeay32.dll and ssleay32.dll.
+
+Wrapper Example
+---------------
+
+The following is a partial example to show the general pattern of wrapping
+onto the C API.
+
+Take DSA and the following C prototypes:
+
+
+DSA * DSA_new(void);
+void DSA_free(DSA *dsa);
+int DSA_size(const DSA *dsa);
+int DSA_generate_key(DSA *dsa);
+int DSA_sign(int dummy, const unsigned char *dgst, int len,
+ unsigned char *sigret, unsigned int *siglen, DSA *dsa);
+int DSA_verify(int dummy, const unsigned char *dgst, int len,
+ const unsigned char *sigbuf, int siglen, DSA *dsa);
+
+
+Which gets wrapped as something akin to:
+
+
+public class DSA : IDisposable
+{
+ // calls DSA_new()
+ public DSA();
+
+ // calls DSA_free() as needed
+ ~DSA();
+
+ // calls DSA_free() as needed
+ public void Dispose();
+
+ // returns DSA_size()
+ public int Size { get; }
+
+ // calls DSA_generate_key()
+ public void GenerateKeys();
+
+ // calls DSA_sign()
+ public byte[] Sign(byte[] msg);
+
+ // returns DSA_verify()
+ public bool Verify(byte[] msg, byte[] sig);
+}
View
3  TODO
@@ -0,0 +1,3 @@
+OpenSSL.NET - TODO
+
+Write more unit tests!
View
3  update_web.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+rsync -avzP README INSTALL COPYING LICENSE CHANGES TODO web/ friedric,openssl-net@web.sourceforge.net:htdocs/
View
164 web/index.html
@@ -1,80 +1,114 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 TRANSITIONAL//EN">
<html>
- <head>
- <title>OpenSSL.NET</title>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-var pageTracker = _gat._getTracker("UA-3313431-2");
-pageTracker._initData();
-pageTracker._trackPageview();
-</script>
-
- </head>
- <body>
+<head>
+ <title>OpenSSL.NET</title>
+
+ <script type="text/javascript">
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
+ </script>
+ <script type="text/javascript">
+ try{
+ var pageTracker = _gat._getTracker("UA-3313431-2");
+ pageTracker._trackPageview();
+ } catch(err) {}
+ </script>
+
+</head>
+<body>
+
<h1>OpenSSL.NET</h1>
-A managed <a href="http://www.openssl.org">OpenSSL</a> wrapper written in C# for the 2.0 .NET Framework that currently exposes the <a href="http://www.openssl.org/docs/crypto/crypto.html">crypto API</a>. This a must for .NET developers that need crypto but don't want to use Microsoft's SSPI. This wrapper uses version 0.9.8g of libeay32.dll.
+<p>
+A managed <a href="http://www.openssl.org">OpenSSL</a> wrapper written in C#
+for the 2.0 .NET Framework that exposes both the
+<a href="http://www.openssl.org/docs/crypto/crypto.html">Crypto API</a> and
+the <a href="http://www.openssl.org/docs/ssl/ssl.html">SSL API</a>.
+This a must for .NET developers that need crypto but don't want to use
+Microsoft's SSPI.
+This wrapper is based on version 0.9.8k of libeay32.dll and ssleay32.dll.
+</p>
+
+<p>
+A big thanks goes to Ben Henderson for contributing the wrapper for the
+SSL API!
+</p>
<h3>Download</h3>
-The latest version can be downloaded <a href="https://sourceforge.net/project/showfiles.php?group_id=163039">here</a>.
+The latest version (0.4) can be downloaded
+<a href="http://sourceforge.net/projects/openssl-net/files/">here</a>.
<h3>Installation</h3>
-Make sure you have libeay32.dll in the current working directory of your application or in your PATH. In your .NET project, add a reference to the ManagedOpenSsl.dll assembly.
+Make sure you have libeay32.dll and ssleay32.dll in the current working
+directory of your application or in your PATH.
+In your .NET project, add a reference to the ManagedOpenSsl.dll assembly.
<h3>Documentation</h3>
-Coming soon...
+
+Take a look at the low-level C API
+<a href="http://www.openssl.org/docs">documentation</a>
+over at the openssl.org.
<ul>
-<li>README
-<li>INSTALL
-<li>CHANGELOG
-<li>TODO
-<li>HOWTO
-<li>TUTORIAL
+<li><a href="README">README</a></li>
+<li><a href="INSTALL">INSTALL</a></li>
+<li><a href="CHANGES">CHANGES</a></li>
+<li><a href="TODO">TODO</a></li>
+<li><a href="COPYING">COPYING</a></li>
+<li><a href="LICENSE">LICENSE</a></li>
+<li>HOWTO</li>
+<li>TUTORIAL</li>
</ul>
-<h3>Status</h3>
-<table border=1>
- <tr>
- <td>Sub-library</td><td>Completion</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/rand.html">rand</a></td><td align="center">100%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/dsa.html">dsa</a></td><td align="center">90%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/rsa.html">rsa</a></td><td align="center">90%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/dh.html">dh</a></td><td align="center">90%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/x509.html">x509</a></td><td align="center">70%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/bio.html">bio</a></td><td align="center">80%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/evp.html">evp</a></td><td align="center">100%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/pem.html">pem</a></td><td align="center">90%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/bn.html">bn</a></td><td align="center">90%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/err.html">err</a></td><td align="center">100%</td>
- </tr>
- <tr>
- <td><a href="http://www.openssl.org/docs/crypto/engine.html">engine</a></td><td align="center">0%</td>
- </tr>
-</table>
-
- </body>
+<h4>Wrapper Example</h4>
+
+<p>
+The following is a partial example to show the general pattern of wrapping
+onto the C API.
+</p>
+
+Take DSA and the following C prototypes:
+<code>
+<pre>
+DSA * DSA_new(void);
+void DSA_free(DSA *dsa);
+int DSA_size(const DSA *dsa);
+int DSA_generate_key(DSA *dsa);
+int DSA_sign(int dummy, const unsigned char *dgst, int len,
+ unsigned char *sigret, unsigned int *siglen, DSA *dsa);
+int DSA_verify(int dummy, const unsigned char *dgst, int len,
+ const unsigned char *sigbuf, int siglen, DSA *dsa);
+</pre>
+</code>
+
+Which gets wrapped as something akin to:
+<code>
+<pre>
+public class DSA : IDisposable
+{
+ // calls DSA_new()
+ public DSA();
+
+ // calls DSA_free() as needed
+ ~DSA();
+
+ // calls DSA_free() as needed
+ public void Dispose();
+
+ // returns DSA_size()
+ public int Size { get; }
+
+ // calls DSA_generate_key()
+ public void GenerateKeys();
+
+ // calls DSA_sign()
+ public byte[] Sign(byte[] msg);
+
+ // returns DSA_verify()
+ public bool Verify(byte[] msg, byte[] sig);
+}
+</pre>
+</code>
+
+</body>
</html>
Please sign in to comment.
Something went wrong with that request. Please try again.