[Mono-list] XSP ssl

2006-05-08 Thread Carlos Solorzano

We have XSP working with SSL by following
http://www.mono-project.com/UsingClientCertificatesWithXSP#Setting_up_XSP_for_SSL_support
however we want to be able to create certificates with OpenSSL with our 
own CA and be able to create certificates for other uses (apache, etc) 
with the same CA. Is this possible? anyone have any good examples?


Thanks,

--Carlos
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



Re: [Mono-list] XSP ssl

2006-05-09 Thread Carlos Solorzano
After a lot of tryouts we have a certificate that works, we copied allof 
the steps out of:  
http://www.cisco.com/univercd/cc/td/doc/product/rtrmgmt/cwparent/cw_1105/wlse/2_12/cert_gd/gencert.htm



Below are the steps we used from that page, the page is a cisco page and 
most likely has nothing to do with what we want to use the certificate 
for but it worked! I hope this is useful to someone else.



 Required Certificate Extensions

The following is an example of the required *certs-exts.cnf *extensions 
file:


[ server_exts ]


extendedKeyUsage = 1.3.6.1.5.5.7.3.1


[ client_exts ]


extendedKeyUsage = 1.3.6.1.5.5.7.3.2

Creating a CA Directory

To create a CA directory, enter the following commands as a root user:


mkdir ca


cd ca


mkdir certs private reqs


echo `01' > serial


touch index.txt


chmod 0700 private


cd ..


 Creating a Self-signed CA Root Certificate and RSA Key


Use the following command sequence to create a self-signed CA root 
certificate and RSA key.



openssl req -x509 -newkey rsa:1024 -keyout ./ca/private/root-key.pem 
-keyform PEM

-out ./ca/certs/root-cert.pem -outform PEM -config ./openssl.cnf


Use the following command to display the certificate:


openssl x509 -in ./ca/certs/root-cert.pem -text


 Converting a CA Certificate to PKCS#12


Use the following command sequence to convert a CA certificate to 
PKCS#12 format. This process is useful for importing a CA certificate to 
a Windows PC for testing purposes.



cat ./ca/certs/root-cert.pem ./ca/private/root-key.pem > 
./ca/private/root-all.pem



openssl pkcs12 -export -in ./ca/private/root-all.pem -out 
./ca/certs/root-cert.p12



 Creating a Server Certificate Request and RSA Key


Use the following command sequence to create a server certificate 
request and RSA key.



openssl req -newkey rsa:1024 -keyout ./ca/private/server-key.pem 
-keyform PEM

-out ./ca/reqs/server-req.pem -outform PEM -config ./openssl.cnf


 Creating a Server Certificate from the Request


Use the following command sequence to create a server certificate from 
the request and reference the certificate extensions file and required 
server certificate extension.



openssl x509 -req -days 365 -in ./ca/reqs/server-req.pem -CA 
./ca/certs/root-cert.pem
-CAkey ./ca/private/root-key.pem -CAserial ./ca/serial -extfile 
./ca/cert-exts.cnf

-extensions server_exts -out ./ca/certs/server-cert.pem


Use the following command to display the server certificate:


openssl x509 -in ./ca/certs/server-cert.pem -text


___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] serial port with mono on freebsd

2006-05-11 Thread Carlos Solorzano
I have used the SerialPort a lot in mono on linux, what errors do you  
get?


--Carlos

On May 10, 2006, at 9:23 AM, Mario Munda wrote:


Did somebody use serial port in mono on freebsd?

I need to develop an application that would be able to read from  
and write to serial port. So I tried to open file /dev/cuad0 as a  
FileStream, but it doesn't work.


I'm using Freebsd 6.0

Any suggestions?

Thnx...





___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] serial port with mono on freebsd

2006-05-11 Thread Carlos Solorzano


On May 11, 2006, at 10:06 AM, Tom Opgenorth wrote:


On 5/10/06, Mario Munda <[EMAIL PROTECTED]> wrote:

Did somebody use serial port in mono on freebsd?

While on the topic, does anybody have some good reference material for
serial ports?  I might have a need to read some information from a
device with a serial port, but I'm not to sure of the format the data
coming in.  Any suggestions/tips/pointers would be greatly
appreciated.
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list



Usually I just read bytes, each device may send the bytes based on  
some protocol they have, some other devices just send plain text,  
some devices send/receive plain text plus some sort of check like a  
crc or similar. I am guessing whatever device you are talking to has  
some info on their protocol.


--Carlos

___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list


Re: [Mono-list] serial port with mono on freebsd

2006-05-11 Thread Carlos Solorzano



Tom Opgenorth wrote:

On 5/11/06, Carlos Solorzano <[EMAIL PROTECTED]> wrote:

Usually I just read bytes, each device may send the bytes based on
some protocol they have,

Thanks.  So is it just as simple as opening a Stream of some sort and
capturing the bytes?  Would you know of any code samples for reading
from a serial port in Windows?

(P.S. sorry for the hijack)



I think it depends on whether you are using .net 2.0 or not. I think on 
.net 2.0 the SerialPort classes are included on the microsoft framework 
(someone correct me if I am wrong). I have a package I got from 
somewhere long time ago (made by MS) that implemented System.IO.Ports 
for .net 1.0/1.1, that library had almost the same API as .net 2.0 and 
mono, so I made a few modification to it so it would work on both Linux 
and Windows without the need of a recompile. The only problem was that 
on mono it seemed like the System.IO.Ports namespace is in System.dll 
and on windows for me it was on SerialPort.dll so on Linux I do 
something crazy which people are gonna laugh at, I make a symbolic link 
of SerialPort.dll to System.dll and it works fine. If mono did some more 
serious assembly checks it wouldn't work, specially since all my 
assemblies are signed!
On both reading and writing from the serial port is really easy, I use 
pretty much the same code. Mono hasn't implemented everything yet, like 
you can't receive SerialPort events yet like you can on windows, a lot 
of the Write methods were missing but enough functionality is there to 
make it usable. I have not looked at the Mono serial ports classes in 
several months so this may have changed a lot.


Hope that helped.

--Carlos
___
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list