I can't figure out what I'm doing wrong here. I have the following code:
byte[] digest = new byte[0];
MessageDigest md = null;
try{
md = MessageDigest.getInstance( "SHA-512" );
}
catch( NoSuchAlgorithmException e ) {
return digest;
}
digest = md.digest( myString.getBytes() );
Looking at the hex values of digest byte[] in the ...
I've created an RSA key pair using OpenSSL. The private key file is DER encoded. I need to load this file into my Java app and sign some data. Here's what I have:
byte[] private_key = new byte[] ...
... load bytes from file into private_key ..
PKCS8EncodedKeySpec pkcs8_key_spec = new PKCS8EncodedKeySpec( private_key );
KeyFactory k...
Im new to OpenSSL, Can anybody give me a hint in how to initialize AES CTR mode from a C file. I know this is the method´s signature but I am having problems with the parameters, there´s not many documentation neither a clear example how to make a simple encryption. I would appreciate if somebody could exemplify a call to this method. Th...
Hi Guys,
I'm trying to do some triple DES encryption in Ruby. I'm trying to replicate the results from this page: http://da.nmilne.com/des.html
I'm trying to replicate those result in Ruby. I suspect the problem is the key is supposed to be a string, but I need to pass in a Hexadecimal key. Either that or the string being encrypted...
Hello.,
I have id_rsa.pub key generated by ssh-keygen.
I need to prigrammically convert id_rsa.pub to RSA DER formatted key.
How it is possible?
Preferably ruby language but I would be glad for algorythm in any language.
...
I am quite confused as to why I am seeing different results for md5 hashing in PHP and in OpenSSL.
Here is the code that I am running:
php -r "echo md5('abc');"
Results in: 900150983cd24fb0d6963f7d28e17f72
While this:
echo abc | openssl md5
Results in: 0bee89b07a248e27c83fc3d5951213c1
Why?
...
ClickOnce is suppose to use a signing cert for distribution. If I was developing a major app, I could understand purchasing a cert. However, my app is for a small sized company and I cannot justify the expensive.
My question is, when my app first installs, how might I install my self signed Root CA into Trusted Root Certificates automat...
I am developing in C++ using Boost.Asio. I want to be able to base64 decode data and since Boost.Asio links to openssl I want to use it's functions to do so and not add an extra dependency(eg crypto++). I have found this code here that shows how to do it. (change int finalLen = BIO_read(bmem, (void*)pOut, outLen); to inLen )
I don't kno...
I am implementing a small demo application which encrypts using AES CTR with OpenSSL is it possible to test the algorithm using different modes of operation test vectors for example testing the ECB vector in my application and check the result or is it restricted to ctr test vectors??? If it is restricted to test it with ctr can anybody ...
Fairly new to socket programming, but I've been assigned with a whopper of project.
My issue is this: I try initiating an SSL handshake with both SSL_accept() and SSL_connect(), as well as renegotiating the handshake and then attempting to reconnect with SSL_renegotiate() and SSL_do_handshake() in succession, but all of these give me t...
Hi,
I'm trying to install ruby 1.8.6 on Snow Leopard using rvm.
I tried:
rvm install ruby-1.8.6-p111
and got an error explaining make couldn't find openssl.
make[1]: * [openssl_missing.o] Error 1
I then tried:
rvm install ruby-1.8.6-p111 -C --with-openssl-dir=/System/Library/OpenSSL
(Snow Leopard seems to come with openssl and this s...
hello,
So I'm writing some C code to connect to a server that is expecting me to provide a certificate for authentication. I'm using OpenSSL to do the SSL communications and I've got the socket code worked out, and I have code to do the SSL part worked out to, but what I can't seem to get simply because the docs are so sparse is how to ...
Hi,
I'm using compiled openssl for an iphone app, I followed instruccions here http://www.x2on.de/kontakt/ so I could develop rsa operation on iphone simulator. the problem is that I get this error when building the proyect
_fopen$UNIX2003 referenced from
_BIO_new_file in libcrypto_i386.a(bss_file.o)
_file_ctrl in libcrypto_...
I just upgraded Indy to th latest version (10.5.7), I was using the OpenSSL dlls in version 0.9.8.13.
Is it good to use the latest version (1.0.0a) or since the version I have (0.9.8.13) works fine it is a risk to upgrade since there can be bugs in it?
...
I made a simple application that uses Indy and requires OpenSSL dlls.
I am not going to write an installer for it, so I have 2 options:
1) deploy it by copying the application exe + libeay32.dll + ssleay32.dll in the same folder
2) put libeay32.dll and ssleay32.dll in the exe resources and extract them to the applicationpath on progra...
I want to use SSL in my cross platform program. I decided to use OpenSSL.
I have OpenSSL installed, and at this point I am looking through the code and documentation trying to figure out how to use the library.
Do you have any resources or simple programs or tutorials that will walk me through integrating OpenSSL with my program?
...
openssl s_client -connect some.https.server:443 -showcerts
is a nice command to run when you want to inspect the server's certificates and its certificate chain.
Is there a way to run this command when you are behind a HTTP/HTTPS proxy ?
...
Hi experts,
I'm trying to setup a mod_ssl - Apache server for authentication purpose. I just downloaded the latest mod_ssl package (2.8.31) and the CHANGE document says it's only been upgraded to Apache 1.3.41. However, 1.3.x is no longer maintained.
Should I stick with the older version of the Apache just because mod_ssl said so or s...
I get the following error when trying to build OpenSSL on Win32:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : error C2220: warning treated as error - no 'object' file generated
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefiniti...
Hello, i am trying to compile openssl with my ruby config on a windows computer with MingW.
I am running ruby 1.9.2rc2 with these commands:
$ ruby extconf.rb --with-openssl-dir=/c/openssl
...
...
...
=== Checking done. ===
creating extconf.h
creating Makefile
Done.
Okay, so that works without any errors.
Let's try to make:
$ make
gcc...