Lines Matching defs:rv
671 int rv;
693 rv = crypto_digest(&mech, &d1, &d2, NULL);
695 return (rv);
706 int rv;
708 rv = kef_digest(sha1_hash_mech, input, inlen, output, SHA1_HASHSIZE);
710 return (rv);
721 int rv;
723 rv = kef_digest(md5_hash_mech, input, inlen, output, MD5_HASHSIZE);
725 return (rv);
810 int rv = 0;
847 rv = kef_crypt(cdata, inblock, CRYPTO_DATA_RAW,
849 if (rv != CRYPTO_SUCCESS) {
852 cmn_err(CE_WARN, "failed to derive a key: %0x", rv);
896 return (rv);
913 int rv;
949 rv = derive_key(cdata, constdata, sizeof (constdata),
952 if (rv == CRYPTO_SUCCESS) {
961 rv = derive_key(cdata, constdata, sizeof (constdata),
965 cmn_err(CE_WARN, "failed to derive crypto key: %02x", rv);
968 return (rv);
979 int rv = CRYPTO_FAILED;
1016 rv = crypto_decrypt(&encr_mech, &dd, &cdata->d_encr_key,
1018 if (rv != CRYPTO_SUCCESS) {
1019 cmn_err(CE_WARN, "crypto_decrypt failed: %0x", rv);
1020 return (rv);
1030 rv = crypto_mac(&mac_mech, &dd, &cdata->d_hmac_key,
1033 if (rv != CRYPTO_SUCCESS) {
1034 cmn_err(CE_WARN, "crypto_mac failed: %0x", rv);
1037 return (rv);
1048 int rv = CRYPTO_FAILED;
1089 rv = crypto_mac(&mac_mech, &dd, &cdata->d_hmac_key,
1092 if (rv != CRYPTO_SUCCESS) {
1093 cmn_err(CE_WARN, "crypto_mac failed: %0x", rv);
1094 return (rv);
1097 rv = crypto_encrypt(&encr_mech, &dd, &cdata->d_encr_key,
1099 if (rv != CRYPTO_SUCCESS) {
1100 cmn_err(CE_WARN, "crypto_encrypt failed: %0x", rv);
1103 return (rv);
1117 int rv = CRYPTO_FAILED;
1164 rv = crypto_encrypt(&mech, &d1, &crkey, NULL, NULL, NULL);
1166 rv = crypto_decrypt(&mech, &d1, &crkey, NULL, NULL, NULL);
1168 if (rv != CRYPTO_SUCCESS) {
1171 "crypto_decrypt"), rv);
1175 return (rv);
1184 int rv = 0;
1214 rv = crypto_mac(&mac_mech, &dd, key, NULL, &mac, NULL);
1216 if (rv != CRYPTO_SUCCESS) {
1217 cmn_err(CE_WARN, "crypto_mac failed: %0x", rv);
1220 return (rv);
2644 int rv;
2853 rv = create_derived_keys(cd,
2857 if (rv != CRYPTO_SUCCESS) {
2859 "keys: %0x", rv);
2863 rv = crypto_create_ctx_template(&enc_mech,
2866 if (rv == CRYPTO_MECH_NOT_SUPPORTED) {
2868 } else if (rv != CRYPTO_SUCCESS) {
2870 "for d_encr_key: %0x", rv);
2874 rv = crypto_create_ctx_template(&hmac_mech,
2877 if (rv == CRYPTO_MECH_NOT_SUPPORTED) {
2879 } else if (rv != CRYPTO_SUCCESS) {
2881 " %0x", rv);