News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
WebServer Example Makecert Certificate not working  
by Michael Kimbell
posted on 2004/11/22

Compiled and ran the WebServer Sample application. Then I connect to it with MS IE 6.

When I use the supplied certificate it runs fine. However when I use makecert to create a self-signed certificate it gives me the following output.

====================================
Please enter the IP address of the network adapter to listen on [use 0.0.0.0 to
listen on all installed network adapters]:
0.0.0.0
Please enter the port to listen on [or 0 to automatically select one]:
8000
Please enter the security protocol you wish to use for incoming connections:
[1] None
[2] SSL3
[3] TLS1
[4] SSL3 and TLS1
4
How do you want to load the certificate?
1 = from certificate store
2 = from PFX/P12 file
3 = from .cer file
3
Enter the full path of the certificate file:
mycert.cer
The certificate is not associated with a private key. Please enter the path to a
PVK file you want to associate it with:
mycert.pvk
The PVK file appears to be password protected. Please enter the password:
*********
Using the following certificate:
CERTIFICATE:
Format: X509
Name: ME
Issuing CA: ME
Key Algorithm: 1.2.840.113549.1.1.4
Serial Number: 62FA3F861D0B6A9B45C818DBE03F502A
Key Alogrithm Parameters: 0500
Public Key: 3048024100C1E7AE54CFCC1DB98602DA3CF226E6078E5FE997154C4DB10
7F6DE51FD9B49A00035706D6991F5D5A4B55EFF4259728D47B799842106756ED2D9BA46CF1F837B0
203010001
Press CTRL-BREAK to kill the server.
Listening on 0.0.0.0:8000
Incoming socket accepted.
Receiving HTTP request...
Error while receiving data from client [An error occurs while communicating with
the remote host.
Org.Mentalis.Security.Ssl.Shared.SslException: An error occurred during the decr
yption and verification process.
at Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage(RecordMessage m
essage)
at Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes(Byte[] buffer, I
nt32 offset, Int32 size)
at Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult a
r)].
Org.Mentalis.Security.SecurityException: An error occurs while communicating wit
h the remote host.
Org.Mentalis.Security.Ssl.Shared.SslException: An error occurred during the decr
yption and verification process.
at Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage(RecordMessage m
essage)
at Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes(Byte[] buffer, I
nt32 offset, Int32 size)
at Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult a
r) ---> Org.Mentalis.Security.Ssl.Shared.SslException: An error occurred during
the decryption and verification process.
at Org.Mentalis.Security.Ssl.Shared.RecordLayer.UnwrapMessage(RecordMessage m
essage)
at Org.Mentalis.Security.Ssl.Shared.RecordLayer.ProcessBytes(Byte[] buffer, I
nt32 offset, Int32 size)
at Org.Mentalis.Security.Ssl.Shared.SocketController.OnReceive(IAsyncResult a
r)
--- End of inner exception stack trace ---
at Org.Mentalis.Security.Ssl.SecureSocket.EndReceive(IAsyncResult asyncResult
)
at Org.Mentalis.Security.Ssl.SecureSocket.Receive(Byte[] buffer, Int32 offset
, Int32 size, SocketFlags socketFlags)
at WebServer.StartServer(IPEndPoint ep, SecureProtocol sp, Certificate cert)
in d:\projects\netframe\ssl\seclib-1.0\samples\ssl\webserver\webserver.cs:line 2
36
Waiting for another connection...

========================================

The library version is 1.0.13.709

The command I used to create the certificate is
makecert -r -n "CN=ME" -eku 1.3.6.1.5.5.7.3.1 -b 01/01/2000 -e 01/01/2036 -sv mycert.pvk mycert.cer

What am I doing wrong?

by Michael Kimbell
posted on 2004/11/23

Never mind. the post

http://www.mentalis.org/forum/thread.qpx/344

worked for me

by Dmytro [ecode at programmer dot net]
posted on 2004/11/25

It still doesnt work. i only get a certificate ->ME and thats all its root certificate where is the child???like: ME and then below it is "localhost" or the name of your website. any suggestions how to make that?

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.