A2 command fail

Jul 17, 2014 at 1:24 PM
Hi, I send command A2 to simulator and getting error in events. I using socket.
First I send command PA:
0000PA>L>003^0>033^1>L>003KEY COMPONENT PART 1: ^P;>L>003 KEY CHECK VALUE: ^T;>L>L>003 DO NOT DISCLOSE THIS COMPONENT TO ANYONE ELSE>L>F

Hex:
00883030303050413e4c3e3030335e303e3033335e313e4c3e3030334b455920434f4d504f4e454e54205041525420313a205e503b3e4c3e303033204b455920434845434b2056414c55453a205e543b3e4c3e4c3e30303320444f204e4f5420444953434c4f5345205448495320434f4d504f4e454e5420544f20414e594f4e4520454c53453e4c3e46

Response:
000000PB00


And send A2 command:
0001A20000A2000U >L>003^0>033^1>L>003KEY COMPONENT PART 1: ^P;>L>003 KEY CHECK VALUE: ^T;>L>L>003 DO NOT DISCLOSE THIS COMPONENT TO ANYONE ELSE>L>F

Hex:
009330303031413230303030413230303055203e4c3e3030335e303e3033335e313e4c3e3030334b455920434f4d504f4e454e54205041525420313a205e503b3e4c3e303033204b455920434845434b2056414c55453a205e543b3e4c3e4c3e30303320444f204e4f5420444953434c4f5345205448495320434f4d504f4e454e5420544f20414e594f4e4520454c53453e4c3e46

The error is:
Client from 127.0.0.1:63550 is connected
Client: 127.0.0.1:63550
Request: 0001A20000A2000U >L>003^0>033^1>L>003KEY COMPONENT PART 1: ^P;>L>003 KEY CHECK VALUE: ^T;>L>L>003 DO NOT DISCLOSE THIS COMPONENT TO ANYONE ELSE>L>F
Parsing header and code of message 0001A20000A2000U >L>003^0>033^1>L>003KEY COMPONENT PART 1: ^P;>L>003 KEY CHECK VALUE: ^T;>L>L>003 DO NOT DISCLOSE THIS COMPONENT TO ANYONE ELSE>L>F...
Searching for implementor of A2...
Found implementor ThalesSim.Core.HostCommands.BuildIn.GenerateAndPrintComponent_A2, instantiating...
Calling AcceptMessage()...
Calling ConstructResponse()...
Exception while processing message
System.InvalidOperationException: Invalid key scheme [Unspecified]
at ThalesSim.Core.Utility.CreateRandomKey(KeyScheme ks)
at ThalesSim.Core.HostCommands.BuildIn.GenerateAndPrintComponent_A2.ConstructResponse()
at ThalesSim.Core.ThalesMain.WCMessageArrived(WorkerClient sender, Byte[]& b, Int32 len)
Disconnecting client.
Calling Terminate()...

What is wrong ?
Jul 17, 2014 at 2:27 PM
After click in "Change Authorized Mode" the command A2 return this:

000001A317

Meaning what ?
Editor
Jul 18, 2014 at 7:49 AM
Edited Jul 18, 2014 at 7:50 AM
Hi!
You have a mistake in your A2 command. It should look like below:
A2000U>L>003^0>033^1>L>003KEY COMPONENT PART 1: ^P;>L>003 KEY CHECK VALUE: ^T;>L>L>003 DO NOT DISCLOSE THIS COMPONENT TO ANYONE ELSE>L>F 
000001A317 means, that HSM needs to be in authorised state :)
Marked as answer by Manshtein on 9/27/2014 at 6:25 PM