|
What are the details of the exception? They should indicate what line caused the exception, and if there is an inner exception, it may contain greater detail.
|
|
|
|
|
I would start by checking the syntax that the openssl.exe requires for the keyfile and sigfile.
proc.StartInfo.Arguments = string.Format(" dgst -sha1 -verify {0} -signature{1}", keyFile, sigFile);
Also, maybe try removing the leading space before dgst. Probably irrelivant but who knows.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
I'm trying to run openssl.exe (part of the windows version of openssl).
I've verified and re-verified that my command line parameters are ok.
Since the filenames being passed on the command line are completely qualified paths, I've tried using forward slashes and then backslashes in the paths.
I've tried beginning the parameter list without the space, and then with the space.
The filenames are valid and are known to exist.
The content of the files have been verified that they are in fact correct (as far as format is concerned).
The public key file was given to me by someone else, and the signature is part of the parameters passed to our web page, so I can only assume that the data is in fact correct.
Just to make sure that the openssl.exe file is working, I "corrupted" the public key file by removing the first and last line and then running the same parameters against it. The openssl.exe app returned the expected error message.
The last time I ran it, I didn't appear to get an exception.
This is driving me insane.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
According to the docs[^]:If you use the StandardInput, StandardOutput, or StandardError properties on the Process component, you must first set the corresponding value on the ProcessStartInfo property. Otherwise, the system throws an exception when you read or write to the stream
You haven't redirected the StandardInput, and you haven't defined an input file parameter for the command. According to another doc[^]:If no files are specified then standard input is used.
Openssl tries to read the undefined standard input and you get an exception. The PHP version pushes the $data through a pipe to the standard input of the openssl command, you should do the same.
|
|
|
|
|
Hi,
Is there any function to convert String/Number to "Packed Decimal" and vice versa?
Thank you.
|
|
|
|
|
There isn't anything built in to the Framework that I am aware of. You would need to write your own function to do this. Doing a quick search on Google, here[^] is some VB6 code that might get you started. (I have not tested this code, so I will not make any guarantees to it's correctness.)
|
|
|
|
|
Scott Dorman wrote: Doing a quick search on Google, here[^] is some VB6 code
Isn't that the development equivalent of the AntiChrist?
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete O`Hanlon wrote: Isn't that the development equivalent of the AntiChrist?
|
|
|
|
|
I have run into a situation where I need to encode/decode base64 in unmanged c++ code, that has been encoded/decoded in .Net 2 tobase64string. However I have not been able to get the unmanaged code to encode/decode the strings generated by tobase64string, and vice-versa. I have tried changing the encoding for the tobase64string input stream, but it did not seem to make a difference. Thinking there was something wrong with the unmanaged code, I found a couple of other base64 implementations on the internet and gave them a try. They have the same problems encoding/decoding the .Net tobase64string output. Before I spend time unraveling the .Net base 64 stuff - does anyone have an algoritm to encode/decode the tobase64string output that they have been able to get working in unmanged code or any tips on what I am doing wrong? Any input is welcomed.
TIA
|
|
|
|
|
You might have better luck with that question in the C++ forum. Sorry I can't help.
|
|
|
|
|
A few simple things to try which will validate that the encoding/decoding code is working properly on each end.
Create a Base64 encoded string in .NET and then pass it to your decode function. You should get back the same result. Do this same test in the C++ code. This will verify that you can properly encode/decode a string in each of the respective languages.
Once you verify that you can encode/decode properly, try to encode the same string in .NET and C++ and compare the results, which will be the Base64 encoded string. If the values are not the same, then you know one of the implementations isn't working correctly.
Finally, assuming that everything else looks correct, you will need to step through with a debugger (or use Console.Writeline and printf statements) to ensure that the result of the encode is accurately being passed to the decode function (or vice versa).
Also, on the C++ side, make sure you are clearing your strings (or char[] if that's what you are using) and make sure that it is being null terminated properly.
|
|
|
|
|
Hi All,
I want to write column names in an excel file .Does ayone knows how can i do it ?
Please give me some idea.
Thanx
Praveen Sharma
|
|
|
|
|
What data provider are you using for writing to the excel file? I have always used oledb to write to excel files, but I never found out a way to do the column headers. I always just had the first row as the column names, which worked out just fine. I don't think it can be done using jet, but I didn't really look into it all that much. If you are using the Office Interop, It probably can be done that way. I really have no idea though.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Hi there,
I´m starting to do some work in C#. I´m developing a dll library to communicate unmanaged code in C++ with managed code in C#, one of the problems I have is the use of a method that returns an array of integers in C++ (using vector<int>), can someone tell me what kind of structure of integers can I use in C# which is a equivalent to vector<int> for calling this function in the C# code?.
Thanks, regards.
|
|
|
|
|
Try looking at ArrayList. It is in System.Collections.Generic
Hogan
|
|
|
|
|
Yeah, I´ve already I tried and it doesn´t work...
|
|
|
|
|
Hi,
if possible I would create the array of the right size using managed code, use the
GCHandle class to pin it in memory and get its IntPtr, then pass that to the unmanaged code
which can read and/or write the array; afterwards apply GCHandle.Free().
That is much easier than trying to have unmanaged code create an object, and it avoids
copying all the data while marshaling.
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
alispas wrote: a method that returns an array of integers in C++ (using vector)
if that means:
vector<int> mymethod();
then I don't believe there is a way to consume that using C#. Even if there is it would be ugly. I suggest you use C++/CLI to build a mixed mode assembly that will define a managed class API and marshal the native vector into it.
|
|
|
|
|
led mike wrote: I suggest you use C++/CLI to build a mixed mode assembly that will define a managed class API and marshal the native vector into it.
Yup - ugly... So much for easy interoperability...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
John Simmons / outlaw programmer wrote: So much for easy interoperability...
Yes so much for the thing that is everything or the automated application generation tools that will eliminate the need for developers. They don't exist and maybe never will.
|
|
|
|
|
hi
I receive an exception at runtime when try to execute:
System.Diagnostics.Process[] Proc = System.Diagnostics.Process.GetProcesses();
exception type:
System.InvalidOperationException
exception message:
Process performance counter is disable, so the requested operation cannot be performed.
H.R
|
|
|
|
|
Take a look at this thread[^].
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
Can anyone tel me if u can join them
so for every node ther will be a checkBox
THNKS
kobkob
|
|
|
|
|
Try setting this property[^].
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
THNKS
kobkob
|
|
|
|