Re: undefined reference to '_InterlockedIncrement' when compiling nss under MinGW

2012-09-15 Thread weizhong qiang
for my software (which uses gcc for compilation). Best Regards, Weizhong Qiang On Sep 15, 2012, at 4:34 AM, wdeng wrote: > Did you configure the building system yourself? > Usually I build firefox on windows with the MozillaBuild tool which can be > got at: > http://ftp.moz

Re: undefined reference to '_InterlockedIncrement' when compiling nss under MinGW

2012-09-15 Thread weizhong qiang
hi, Thanks for your help. For the two different patches, your patch still gets the same error; the other patch gets better result(nspr compilation passed), but another error appears ("cl: command not found"), I don't know why the the compilation before this error uses gcc to compile, but why he

undefined reference to '_InterlockedIncrement' when compiling nss under MinGW

2012-09-14 Thread weizhong qiang
illa/security/nss. I have tried the different versions of MinGW as well as the versions of nss source, but still all can not get compiled. The following is the log. Thanks a lot for your instruction. Best Regards, Weizhong Qiang gcc -mwindows -o prtpd.o -c -g

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-02-02 Thread weizhong qiang
hi, I solved the problem by generating the key pair with "isPerm" to be PR_FALSE, and then importing the private key using PK11_ImportDERPrivateKeyInfoAndReturnKey. Best Regards, Weizhong Qiang On Jan 31, 2012, at 7:28 AM, weizhong qiang wrote: > hi Robert and others, > Se

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-30 Thread weizhong qiang
, then not mater the "IsSensitive" (the next parameter after "isPerm") is PR_TRUE or PR_FALSE, the private key always sensitive. Is it a feature? Thanks and Best Regards, Weizhong Qiang On Jan 28, 2012, at 4:16 PM, weizhong qiang wrote: > hi, > > On Jan 27, 2012, at 6:5

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-28 Thread weizhong qiang
hi, On Jan 27, 2012, at 6:52 PM, Robert Relyea wrote: > On 01/26/2012 11:53 PM, weizhong qiang wrote: >> hi, >> I did found that the CKA_SENSITIVE is "true" by using the following code: >> rv = PK11_ReadRawAttribute(PK11_TypePrivKey, privKey, >> CKA

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-28 Thread weizhong qiang
hi, On Jan 27, 2012, at 6:41 PM, Robert Relyea wrote: > On 01/26/2012 06:50 PM, weizhong qiang wrote: >> hi, >> >> On Jan 26, 2012, at 6:28 PM, Robert Relyea wrote: >> >>> On 01/26/2012 05:08 AM, weizhong qiang wrote: >>>> hi, >>>>

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-26 Thread weizhong qiang
e from private key."); } if ((value.len == 1) && (value.data != NULL)) std::cout<< !!(*(CK_BBOOL*)value.data)< On 01/26/2012 07:55 AM, weizhong qiang wrote: >> On Jan 26, 2012, at 4:44 PM, helpcrypto helpcrypto wrote: >> >>> AFAIK, return

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-26 Thread weizhong qiang
hi, On Jan 26, 2012, at 6:28 PM, Robert Relyea wrote: > On 01/26/2012 05:08 AM, weizhong qiang wrote: >> hi, >> Is there a fact that nss does not permit the reading of the attribute >> CKA_PRIVATE_EXPONENT, CKA_PRIME_1, etc.? >> Because with all of the eight at

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-26 Thread weizhong qiang
at can be happening. > For example if token=card, CKA_PRIME_1 *musnt* be on the card, as far > is not *needed* to do cryptographic operations. > > El día 26 de enero de 2012 14:08, weizhong qiang > escribió: >> hi, >> Is there a fact that nss does not

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-26 Thread weizhong qiang
Regards, Weizhong Qiang On Jan 26, 2012, at 9:43 AM, helpcrypto helpcrypto wrote: > Is eny error shown at NSSUtilLogger.msg(ERROR, "Failed to read > attribute %x from private key.", type); ? > > El día 25 de enero de 2012 17:04, weizhong qiang > escribió: >> hi all, &

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-26 Thread weizhong qiang
The rv value gives SECFailure. Thanks 在 2012-1-26 下午5:29,"helpcrypto helpcrypto" 写道: > my mistake. i mean the RV value > -- > dev-tech-crypto mailing list > dev-tech-crypto@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-tech-crypto > -- dev-tech-crypto mailing list dev-tech-crypto@li

Re: how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-26 Thread weizhong qiang
Hi, It gives number 123, which is the type CKA_PRIVATE_EXPONENT. Thanks Weizhong qiang 在 2012-1-26 下午4:43,"helpcrypto helpcrypto" 写道: > Is eny error shown at NSSUtilLogger.msg(ERROR, "Failed to read > attribute %x from private key.", type); ? > > El día 25 de ene

how to get CKA_PRIVATE_EXPONENT attribute from a private key?

2012-01-25 Thread weizhong qiang
itive" (PK11_GenerateKeyPair(slot, CKM_RSA_PKCS_KEY_PAIR_GEN, &rsaParams, pubk, PR_TRUE, PR_FALSE, NULL); ), so I suppose the private key is not protected by password, and can be output? Best Regards, Weizhong Qiang // static bool ReadPrivKeyAttribute(SECKEYP