Lines Matching refs:mode

57 static int dca_pkcs1_unpadding(char *buf, int *tlen, int flen, int mode);
59 static int dca_x509_unpadding(char *buf, int tlen, int flen, int mode);
60 static int decrypt_error_code(int mode, int decrypt, int verify, int def);
64 crypto_req_handle_t req, int mode)
82 if (mode == DCA_RSA_ENC || mode == DCA_RSA_SIGN ||
83 mode == DCA_RSA_SIGNR) {
104 rv = decrypt_error_code(mode, CRYPTO_ENCRYPTED_DATA_LEN_RANGE,
113 if (len < reqp->dr_ctx.modlen && (mode == DCA_RSA_DEC ||
114 mode == DCA_RSA_VRFY || mode == DCA_RSA_VRFYR)) {
115 rv = decrypt_error_code(mode, CRYPTO_ENCRYPTED_DATA_LEN_RANGE,
124 if (out->cd_length < reqp->dr_ctx.modlen && (mode == DCA_RSA_DEC ||
125 mode == DCA_RSA_VRFYR) &&
134 if ((rv = decrypt_error_code(mode,
150 rv = decrypt_error_code(mode, CRYPTO_ENCRYPTED_DATA_INVALID,
159 if (mode == DCA_RSA_VRFY)
165 if (mode == DCA_RSA_ENC || mode == DCA_RSA_SIGN ||
166 mode == DCA_RSA_SIGNR) {
183 reqp->dr_ctx.mode = mode;
224 if (reqp->dr_ctx.mode == DCA_RSA_DEC ||
225 reqp->dr_ctx.mode == DCA_RSA_VRFY ||
226 reqp->dr_ctx.mode == DCA_RSA_VRFYR) {
235 reqp->dr_ctx.modlen, reqp->dr_ctx.mode);
255 reqp->dr_pkt_length, reqp->dr_ctx.mode)) !=
317 if (reqp->dr_ctx.mode == DCA_RSA_DEC ||
318 reqp->dr_ctx.mode == DCA_RSA_VRFY ||
319 reqp->dr_ctx.mode == DCA_RSA_VRFYR) {
328 reqp->dr_ctx.modlen, reqp->dr_ctx.mode);
348 reqp->dr_pkt_length, reqp->dr_ctx.mode)) !=
614 reqp->dr_ctx.mode = 0;
633 int kmflag, crypto_req_handle_t req, int mode)
660 rv = dca_rsastart(&ctx, input, output, req, mode);
716 dca_pkcs1_unpadding(char *buf, int *tlen, int flen, int mode)
727 return decrypt_error_code(mode, CRYPTO_ENCRYPTED_DATA_INVALID,
739 return decrypt_error_code(mode,
756 return decrypt_error_code(mode, CRYPTO_ENCRYPTED_DATA_INVALID,
762 return decrypt_error_code(mode, CRYPTO_ENCRYPTED_DATA_INVALID,
771 return decrypt_error_code(mode,
798 dca_x509_unpadding(char *buf, int tlen, int flen, int mode)
815 static int decrypt_error_code(int mode, int decrypt, int verify, int def)
817 switch (mode) {