2006/12/5, Stephen Henson via RT <[EMAIL PROTECTED]>: > > The sign and verify options of RSA are a kind of "raw sign" operation. > The PKCS#11 API does support it but some tokens do not. It is not clear > if the problem in your case is the PKCS#11 ENGINE not using the relevant > mechanism or the token not supporting it.
No, the problem is clear, look at the source. The rsautl code calls the wrong function within ssl: encryption instead of signing. Thus the pkcs11 engine have no choice but to tell the token to encrypt. The token refuses it, as the key is not for encryption. If the advertised interface states that it does siging, then it should do signing, not encryption. It is not the case, and that is a bug. > > The rsa_sign, rsa_verify operations assume the token will perform the > relevant DigestInfo processing which is all some tokens will handle. > That effectively limits the digest which can be used for signing to > those the token handles itself. The problem is orthogonal to the question of digestinfo processing. > If you need to use those then the dgst signing and verify operations > should use them but you pass the data which should be digested and not > the digest value itself. As the token is able to compute the digest, and also there are cases when I want to pass the digest, there should be an option here meaning "not do digesting". > > In 0.9.9-dev the pkeyutil utility can be used to pass digests directly > and for any key type, not just RSA. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
