openssl

OpenSSL SSL_CTX_use_PrivateKey_file with Windows certificate store

Hi, I have a native C++ library which uses OpenSSL for TLS. It reads the private key using SSL_CTX_use_PrivateKey_file and everything is fine, Then I created a C# wrapper which reads the certificates from Windows certificate store according to certain OIDs and the subject name. And here is the problem - I might get more than one certifi...

Using openssl with Kohana 3.0 framework returning error

The code for my encryption controller is shown below. This works fine by itself in a separate working directory from my kohana installation. class Controller_Crypt extends Controller_Home { public static function Encrypt_This($sensitive) { //file path must be relative to directory, also derp. $pubkey = open...

CF.NET SMTP - send email with Gmail

I'm trying to send email from my application. I can send email by smtp.mail.yahoo.com, however while I'm trying to send the email with gmail (smtp.gmail.com) it fails. I'm using SocketPro. I've try to use also openSSL but I don't know how to use it! Anyone you have any code sample, that you can provide me, to send email from Gmail? ...

memset causes exception when pinvoke

I am using pinvoke to call functions from sslscan tool based on openssl; I checked by hit and trial that where exception is occuring is due to memset. It runs fine when i run it natively in VS.but using pinvoke causes this exception in c#.Its System.AccessViolation Exception. These are the declarations: struct sslCheckOptions options;...

JRuby OpenSSL Error

I am having problems configuring JRuby to work properly with OpenSSL. Googling has revealed that this is a pretty common occurence, but none of the solutions I've read have worked for me. Here is my setup: Ubuntu 9.10 jruby 1.5.1 jruby-openssl (0.7) Here is the error: irb(main):001:0> require 'jruby/openssl/gem_only' => true irb(m...

Help with SSL Vulnerability (Mixed Content)?

Hey guys I have my own webserver that is hosting a website that I recently installed/setup a self-signed SSL cert. Securing the website seemed to go fine, but in firefox and IE I sometimes get pop up boxes that say something along the lines of "There is a mix of secure and insecure information on this page..." and in the firefox error co...

Apache SSL Configuration Error (SSL Connection Error)

I am trying to configure Apache on my server to work with ssl, but everytime I visit my site, I get the following message in my browser: SSL connection error. Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have. Error 107 ...

validating X.509 certificate on linux

I have just started working with X.509 certificates. Can any one tell me how to go about validating a certificate on linux? The use case is that my app had downloaded a certificate in a previous session and I have to check if it is still valid (i.e., not expired or revoked since it was stored) before starting a new session. I understand ...

[OpenSSL] SSL_connect() produces certificate verify failure

I'm currently rewriting some existing technologies that were once using RSA Security's libraries into OpenSSL, but I'm starting to run into a few issues. Currently, all of the certificate verification code appears to be running without a hitch, until that is, I call SSL_connect(). Before, the call to SSL_connect() would produce SSL_ERR...

How to convert OpenSSH public key file format to PEM

I have RSA public key in OpenSSH format: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9xmJumsHeLEDcJwf3LYONZholP3+pDHJYen4w+gm8o1r7t6oq825Gmjr7pjsQ+ZDxWivkI4vMW9RyFevPg09ljW+V7lZInBpRtB6v1s8PdmV9YVk4R3S0e7sPMPXuM7ocPLh5yKZ9f7JZwQlpp4ww/RE7blbXywjwCxngT7+G+J6HJB0UcR8xR8t6z8qDrDTAJA7pFFFNliw9M+I8tbrFl8HmoyudOFsGsYOd5hjemy4ivW88XcXzfHJdKnmD9FHVZ...

Convert SSL private key to a string

From pkcs12 file, I extracted the private key and cert using the following - PKCS12_parse(p12, argv[2], &privatekey, &cert, &ca); Now, I need to use the privatekey and cert to sign an XML using xmlsec libraries. However, xmlSecCryptoAppKeyLoad() expects the key in const char* format. How do I do the conversion? Or, can I use xmlSecC...

Link external libraries portably?

I've got a .dll file created in VC++ 2008 that needs to be widely distributed, but also requires external resources (namely OpenSSL libraries) to operate. The dll compiles and runs perfectly well on my own system, as well as any other system with the appropriate external libraries manually installed on them, but I need for the .dll itsel...

how to encrypt data using BIO_SSL?

I am using BIO_SSL which is in bio.h to create SSL. but how to encrypt data using BIO_SSL? ...

Convert DSA asymmetric key in .NET XML format to PEM format

I have a DSA private key exported using the DSACryptoServiceProvider.ToXmlString, and I need to convert it to PEM format ("file.pem"), so I can open it in PHP using openssl_pkey_get_private function. How do I accomplish this? The solution can use DSACryptoServiceProvider.ExportCspBlob method if it's of any help, I just need to convert ...

How to do Encryption using open ssl(BIO) using C++?

How to do Encryption using open ssl(BIO) using C++? ...

How to run a c program on apache 2.2 server?

Hi experts, I'm doing a OpenSSL project and I'm completely new to web server. I've got a client.c and server.c. client.c creates a connection to the server on port 6008 and reads data from stdin and then send those data to the server. The server.c reads data from socket and writes it back out to stdout. I've got the server.c compiled o...

[OpenSSL] pthread_create failed and returned -1 (or 4294967295)

Hi experts, I'm trying to reproduce an example from Network Security with OpenSSL (by Chandra et al). The program consists of client.c server.c common.h and common.c. client.c simply creates a connection to the server on port 6012 and reads data from stdin and then send those data to the server. The server.c reads data from socket and w...

php openssl encrypt data with aes256 and use a sha256 hashed pass help!

openssl only accepting half of a sha256 hashed password $encryptedkey = openssl_encrypt ($data, 'AES256', "$sha256", $raw_output = false); hash looks like this:a0461cea77b9942addee32b2265b32ebcf150426e2490810938ab47206fd320b its only accepting 32 characters of it:a0461cea77b9942addee32b2265b32eb how can i fix this? thank you! edit: exa...

How to compile .c file with OpenSSL includes?

I am trying to compile a small .c file that has the following includes: #include <openssl/ssl.h> #include <openssl/rsa.h> #include <openssl/x509.h> #include <openssl/evp.h> In the same folder where i have the .c file I have a /openssl with all those files (and more), also in synaptic package manager I see OpenSSL installed, I am tryin...

How can I perform an RSA_sign without #include rsa.h just using libeay32.dll?

I can successfully get OpenSSL to perform HMAC-SHA1, MD5, SHA1 all without the use of an #include statement, but am having real difficulty getting it to work for an RSA_sign as that needs the Key to be of type RSA which I think is buried deep in rsa.h (or one of it's own includes) and I've not been able to cajole the tools I'm using into...