I wrote a program much like pk11sdr.c: it does encrypt/decrypt with some
slight modifications. However I just ran the program on my Win2K machine
using the latest NSS 3.3.2 libs (that I built from scratch) and I get an
error when doing a SEC_ASN1EncodeItem(0, result, &sdrResult, template); the
error has something to do with the template used
(SECOID_AlgorithmIDTemplate)...Can't figure it out (had no problem on Unix
with this).
I had to use NSS_Get_SECOID_AlgorithmIDTemplate instead of
SECOID_AlgorithmIDTemplate in order to get the code to compile:
static SEC_ASN1Template template[] = {
{ SEC_ASN1_SEQUENCE, 0, NULL, sizeof (SDRResult) },
{ SEC_ASN1_OCTET_STRING, offsetof(SDRResult, keyid) },
{ SEC_ASN1_INLINE, offsetof(SDRResult, alg),
NSS_Get_SECOID_AlgorithmIDTemplate },
{ SEC_ASN1_OCTET_STRING, offsetof(SDRResult, data) },
{ 0 }
};
When my app runs, Windows throws an "Exception Breakpoint error: breakpoint
has been reached (0x800000003)" error message...I attached the stack trace
from MSVC++.
Is there a bug here? What's the Breakpoint error all about?
Also, what's the difference between NSS_Get_SECOID_AlgorithmIDTemplate
and SEC_ASN1_GET(SECOID_AlgorithmIDTemplate )?
-- Patrick
begin 666 asn1-err.txt
M3E1$3$PA(#<W9F$P,3AC*"D-"G-E8U]A<VXQ95]C;VYT96YT<U]L96YG=&@H
M8V]N<W0@<V5C7T%33C%496UP;&%T95]S=')U8W0@*B P># P-# R-C9C+"!V
M;VED("H@,'@R-C$Q9F4P,"P@:6YT(#!X,# P,# P,# L(&EN=" J(#!X,# Q
M,F9D,C I(&QI;F4@-C X("L@,S4@8GET97,-"G-E8U]A<VXQ95]C;VYT96YT
M<U]L96YG=&@H8V]N<W0@<V5C7T%33C%496UP;&%T95]S=')U8W0@*B P># P
M-#!A,&(X+"!V;VED("H@,'@P,#$R9F1B-"P@:6YT(#!X,# P,# P,# L(&EN
M=" J(#!X,# Q,F9D,C I(&QI;F4@-C8W("L@,3D@8GET97,-"G-E8U]A<VXQ
M95]W<FET95]H96%D97(H<V5C7V%S;C%E7W-T871E7W-T<G5C=" J(#!X,#!D
M,C4X8C@I(&QI;F4@-S4P("L@,S @8GET97,-"E-%0U]!4TXQ16YC;V1E<E5P
M9&%T92AS96-?16YC;V1E<D-O;G1E>'1?<W1R=6-T("H@,'@P,&0R-3@Y,"P@
M8V]N<W0@8VAA<B J(#!X,# P,# P,# L('5N<VEG;F5D(&QO;F<@,'@P,# P
M,# P,"D@;&EN92 Q,3,S("[email protected]!B>71E<PT*4T5#7T%33C%%;F-O9&4H=F]I
M9" J(#!X,# Q,F9D8C0L(&-O;G-T('-E8U]!4TXQ5&5M<&QA=&5?<W1R=6-T
M("H@,'@P,#0P83!B."P@=F]I9" H=F]I9" J+"!C;VYS="!C:&%R("HL('5N
M<VEG;F5D(&QO;F<L(&EN="P@:6YT*2H@,'@P,#)A.68R82!S96-?87-N,65?
M96YC;V1E7VET96U?8V]U;G0H=F]I9" J+"!C;VYS="!C:&%R("HL('5N<VEG
M;F5D(&QO;F<L(&EN="P@:6YT*2P@=F]I9" J(#!X,# Q,F9D-S0I(&QI;F4@
/,3,Q-R K(#$S(&)Y=&5S
`
end