|
When having such problems it is always helpful to show the error message.
First step is reading the manual page for the commands and understand what they are doing:
pkeyutl(1): public key algorithm utility - Linux man page[^]
dgst(1): message digests - Linux man page[^].
You can read them also at a shell prompt by entering man pkeyutl resp. man dgst .
You should also know about shell commands (piping in your case). The pipe operator | sends the standard output of the first command to the standard input of the second. So a first check might be executing the first command only to see if the error occurs there.
You are writing the result of the first command to a file (option -out sharedsecret.bin ). So the output on screen are just error or success messages. Passing these to another program using the pipe operator makes usually no sense.
So a possible solution might be omitting the output to file for the first command (untested):
openssl pkeyutl -derive -inkey musicpriv.pem -peerkey pubeckey.pem | openssl dgst -sha256
Another solution might be using the created file as input for the second command:
openssl pkeyutl -derive -inkey musicpriv.pem -peerkey pubeckey.pem -out sharedsecret.bin && openssl dgst -sha256 sharedsecret.bin
Note the usage of the && operator here. It is a shell command concatenation where the second command is only executed when the first was successful.
|
|
|
|
|
Hi Jochen for the response, I use windows (not linux) and I have read through the manual page on "www.openssl.org" but i dont quite understand the basic uses of the "pkeyutl command"
This was command line used and the error message I got when I used it
openssl pkeyutl -derive -inkey musicpriv.pem -peerkey pubeckey.pem -out sharedsecret.bin | openssl dgst -sha256
Error Message = openssl:Error: 'pkeyutl' is an invalid command.
NB: Though an hash value was generated, but not as specified.
Thank you again for your great help.
|
|
|
|
|
What I have said about piping and command concatenation applies also to the Windows command interpreter. So you should follow my advice about using piping or files, but not mixing them.
However, your actual problem is not related to that but occurs before.
It looks like your openssl.exe does not support the pkeyutl command.
To check this you can list the available commands:
openssl list-standard-commands
All I can suggest is to check your Windows OpenSSL installation and try to ask where you got it from.
BTW: There is no -peerkey option for the pkeyutl command (OpenSSL 1.0.1f on Ubuntu 14.04):
joe@raspi-cross:~$ openssl pkeyutl -help
Usage: pkeyutl [options]
-in file input file
-out file output file
-sigfile file signature file (verify operation only)
-inkey file input key
-keyform arg private key format - default PEM
-pubin input is a public key
-certin input is a certificate carrying a public key
-pkeyopt X:Y public key options
-sign sign with private key
-verify verify with public key
-verifyrecover verify with public key, recover original data
-encrypt encrypt with public key
-decrypt decrypt with private key
-derive derive shared secret
-hexdump hex dump output
-engine e use engine e, possibly a hardware device.
-passin arg pass phrase source
|
|
|
|
|
how to create data base asp.net
|
|
|
|
|
That is a perfect search machine query. Just enter it at a search page of your choice.
|
|
|
|
|
Cool thank you!
|
|
|
|
|
Use sql server management studio. Very simple. Do you have a more specific question?
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
I hope I can explain what I am after.
Let me start saying what I DO NOT NEED.
I do not need to know how to write script and execute "Hello world" in Linux "terminal".
I do not need to know to write C/C++ program using xyz editor.
I do not need to know how to option compiler / linker brand xyz.
<b>I like to learn how / why Linux compiler / linker builds a Linux directory structure ( bin , scr , etc) .
I like to learn how CMake fits into the picture</b>
( I think after some basic I can figure out how "Linux" executable gets created and run by myself)
Please - no Google it !
I can do that without assistance.
|
|
|
|
|
OK, I have read not to post here because it is first forum on list , but...
I would like to talk to someone who is INTERESTED and knows something about USB.
I am not looking for code samples etc.
I have a basic USB code running on SAM3x8e / AKA Arduino Due.
Based my design on code posted here, but as it is always my case - the author of the very long article is no longer on this forum.
I have basic understanding how USB works on ATmel ARM processor.
I have test connected several USB devices and NONE of them gives SAME results.
I can reliably and repeatedly connect and reset single USB device on / to USB port.
One of the devices is USB WEB CAM and it actually sends IN packet but it is missing header.
So that is my basic question where I really could use some help from somebody knowledgeable about USB innards.
How to verify contents of packet asking for data and than verify the actual data received.
Concretely - which descriptor is the "source " sender - I have over 40 of them enumerated - including UVC descriptors.
I am sort of speak "over my head" and would appreciate if you could contribute to solution with your personal knowledge.
I am not seeking references to Google.
Been there , done that.
Thanks for your time
Vaclav
PS No "check out Arduino.cc" I am not welcomed there.
|
|
|
|
|
I believe Hardware & Devices Discussion Boards[^] is the closest fit for what you are looking for.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Thanks for reply.
I have not had much luck posting there either.
Cheers
Vaclav
|
|
|
|
|
That's because this is primarily a site for Software developers. The hardware guys don't come here too often.
|
|
|
|
|
If it is windows kernel then OSR online is the only forum that exists.
They often go into hardwarte discussions, so you will be OK posting there.
|
|
|
|
|
Just posted a question of code C but I can't see the code can others see the code because if they can't see the code how can they answer the question .... there anyway to know how to ask a question
|
|
|
|
|
Question posting has really a simple and user-friendly UI, go through the below URL and you can post a question
Question Posting[^]
If you have to put some code snippet then you can do it using PRE tags and appropriate language selection.
Find More .Net development tips at : .NET Tips
The only reason people get lost in thought is because it's unfamiliar territory.
|
|
|
|
|
hi and thanks for solution!
why you use parameters with nams '@val1' or '@val2' and ......in stored procedur?
please use tha name of field instead of these.
when use parameter s with nams '@val1' or '@val2' and ......and use stored procedur sqldatasource insert null value to database.although ,when i use another procedur whit parameters that have same name with field it work correctly.
|
|
|
|
|
Who do you think you are posting this message to?
|
|
|
|
|
Since today morning, I noticed a right aligned line of texts in the code block (wrapped with pre tag pairs) which says "Colourised in 58ms". Can any one guide what it actually means?
Is this something similar to Visual Studio feature which indicates like "12345ms elapsed"?
Can anyone educate me?
Thanks in advance !
Note: I am not sure if this is the right category of forum to ask the question. Suggestion on this would be helpful too.
___@sHubHa
|
|
|
|
|
It might be useful to know what application you noticed this in - presumably VS
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No it is here on CodeProject in forum messages:
int i = 0;
while (true)
{
++i;
if (i > 1000)
break;
}
|
|
|
|
|
Yes.. True. I noticed this in codeproject.
___@sHubHa
|
|
|
|
|
It's a site feature. If you surround a block in pre tags in the editor, it tells you how long it took to colour the block.
For instance, this section of
formatting told me that it
took approximately 3 ms
to format successfully.
This space for rent
|
|
|
|
|
|
I suspect it's an artefact of the formatter that CP is using. This type of question would normally be asked in the Lounge but is also suitable for the Site Bugs and Suggestions forum because you are asking about site behaviour and, as that's where the CP team hang out, that's where they should see the question.
This space for rent
|
|
|
|
|
Thanks for the guidance
___@sHubHa
|
|
|
|