return(ENOMEM);
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, srv_key)) {
+ if (retval = krb5_process_key(&eblock, srv_key)) {
free(scratch.data);
return(retval);
}
/* call the encryption routine */
- if (retval =
- (*eblock.crypto_entry->decrypt_func)((krb5_pointer) ticket->enc_part.data,
- (krb5_pointer) scratch.data,
- scratch.length, &eblock, 0)) {
- (void) (*eblock.crypto_entry->finish_key)(&eblock);
+ if (retval = krb5_decrypt((krb5_pointer) ticket->enc_part.data,
+ (krb5_pointer) scratch.data,
+ scratch.length, &eblock, 0)) {
+ (void) krb5_finish_key(&eblock);
free(scratch.data);
return retval;
}
#define clean_scratch() {bzero(scratch.data, scratch.length); free(scratch.data);}
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
clean_scratch();
return retval;
#define cleanup_encpart() {(void) bzero(dec_rep->enc_part.data, dec_rep->enc_part.length); free(dec_rep->enc_part.data); dec_rep->enc_part.length = 0; dec_rep->enc_part.data = 0;}
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, client_key)) {
+ if (retval = krb5_process_key(&eblock, client_key)) {
goto clean_encpart;
}
-#define cleanup_prockey() {(void) (*eblock.crypto_entry->finish_key)(&eblock);}
+#define cleanup_prockey() {(void) krb5_finish_key(&eblock);}
- if (retval =
- (*eblock.crypto_entry->encrypt_func)((krb5_pointer) scratch->data,
- (krb5_pointer) dec_rep->enc_part.data,
- scratch->length, &eblock, 0)) {
+ if (retval = krb5_encrypt((krb5_pointer) scratch->data,
+ (krb5_pointer) dec_rep->enc_part.data,
+ scratch->length, &eblock, 0)) {
goto clean_prockey;
}
/* do some cleanup */
cleanup_scratch();
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
cleanup_encpart();
return retval;
}
#define cleanup_encpart() {(void) bzero(dec_ticket->enc_part.data, dec_ticket->enc_part.length); free(dec_ticket->enc_part.data); dec_ticket->enc_part.length = 0; dec_ticket->enc_part.data = 0;}
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, srv_key)) {
+ if (retval = krb5_process_key(&eblock, srv_key)) {
goto clean_encpart;
}
-#define cleanup_prockey() {(void) (*eblock.crypto_entry->finish_key)(&eblock);}
+#define cleanup_prockey() {(void) krb5_finish_key(&eblock);}
/* call the encryption routine */
- if (retval =
- (*eblock.crypto_entry->encrypt_func)((krb5_pointer) scratch->data,
- (krb5_pointer) dec_ticket->enc_part.data,
- scratch->length, &eblock, 0)) {
+ if (retval = krb5_encrypt((krb5_pointer) scratch->data,
+ (krb5_pointer) dec_ticket->enc_part.data,
+ scratch->length, &eblock, 0)) {
goto clean_prockey;
}
/* ticket is now assembled-- do some cleanup */
cleanup_scratch();
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
cleanup_encpart();
return retval;
}
eblock.crypto_entry = krb5_csarray[dec_rep->etype]->system;
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, key)) {
+ if (retval = krb5_process_key(&eblock, key)) {
free(scratch.data);
return(retval);
}
/* call the decryption routine */
- if (retval =
- (*eblock.crypto_entry->decrypt_func)((krb5_pointer) dec_rep->enc_part.data,
- (krb5_pointer) scratch.data,
- scratch.length, &eblock, 0)) {
- (void) (*eblock.crypto_entry->finish_key)(&eblock);
+ if (retval = krb5_decrypt((krb5_pointer) dec_rep->enc_part.data,
+ (krb5_pointer) scratch.data,
+ scratch.length, &eblock, 0)) {
+ (void) krb5_finish_key(&eblock);
free(scratch.data);
return retval;
}
#define clean_scratch() {bzero(scratch.data, scratch.length); free(scratch.data);}
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
clean_scratch();
return retval;
}
#define cleanup_encpart() {(void) bzero(privmsg.enc_part.data, privmsg.enc_part.length); free(privmsg.enc_part.data); privmsg.enc_part.length = 0; privmsg.enc_part.data = 0;}
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, key)) {
+ if (retval = krb5_process_key(&eblock, key)) {
goto clean_encpart;
}
-#define cleanup_prockey() {(void) (*eblock.crypto_entry->finish_key)(&eblock);}
+#define cleanup_prockey() {(void) krb5_finish_key(&eblock);}
/* call the encryption routine */
- if (retval =
- (*eblock.crypto_entry->encrypt_func)((krb5_pointer) scratch->data,
- (krb5_pointer) privmsg.enc_part.data,
- scratch->length, &eblock,
- i_vector)) {
+ if (retval = krb5_encrypt((krb5_pointer) scratch->data,
+ (krb5_pointer) privmsg.enc_part.data,
+ scratch->length, &eblock,
+ i_vector)) {
goto clean_prockey;
}
/* private message is now assembled-- do some cleanup */
cleanup_scratch();
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
cleanup_encpart();
return retval;
}
#define cleanup_encpart() {(void) bzero(request.authenticator.data, request.authenticator.length); free(request.authenticator.data); request.authenticator.length = 0; request.authenticator.data = 0;}
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock,
- &creds->keyblock)) {
+ if (retval = krb5_process_key(&eblock, &creds->keyblock)) {
goto clean_encpart;
}
-#define cleanup_prockey() {(void) (*eblock.crypto_entry->finish_key)(&eblock);}
+#define cleanup_prockey() {(void) krb5_finish_key(&eblock);}
/* call the encryption routine */
- if (retval =
- (*eblock.crypto_entry->encrypt_func)((krb5_pointer) scratch->data,
- (krb5_pointer) request.authenticator.data,
- scratch->length, &eblock, 0)) {
+ if (retval = krb5_encrypt((krb5_pointer) scratch->data,
+ (krb5_pointer) request.authenticator.data,
+ scratch->length, &eblock, 0)) {
goto clean_prockey;
}
/* authenticator now assembled-- do some cleanup */
cleanup_scratch();
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
cleanup_encpart();
return retval;
}
#define cleanup_scratch() {(void)bzero(scratch.data, scratch.length); (void)xfree(scratch.data);}
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, key)) {
+ if (retval = krb5_process_key(&eblock, key)) {
cleanup_privmsg();
cleanup_scratch();
return retval;
}
-#define cleanup_prockey() {(void) (*eblock.crypto_entry->finish_key)(&eblock);}
+#define cleanup_prockey() {(void) krb5_finish_key(&eblock);}
/* call the decryption routine */
- if (retval =
- (*eblock.crypto_entry->decrypt_func)((krb5_pointer) privmsg->enc_part.data,
- (krb5_pointer) scratch.data,
- scratch.length, &eblock,
- i_vector)) {
+ if (retval = krb5_decrypt((krb5_pointer) privmsg->enc_part.data,
+ (krb5_pointer) scratch.data,
+ scratch.length, &eblock,
+ i_vector)) {
cleanup_privmsg();
cleanup_scratch();
cleanup_prockey();
cleanup_privmsg();
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
cleanup_scratch();
return retval;
}
return(ENOMEM);
/* do any necessary key pre-processing */
- if (retval = (*eblock.crypto_entry->process_key)(&eblock, sesskey)) {
+ if (retval = krb5_process_key(&eblock, sesskey)) {
free(scratch.data);
return(retval);
}
/* call the encryption routine */
- if (retval =
- (*eblock.crypto_entry->decrypt_func)((krb5_pointer) request->authenticator.data,
- (krb5_pointer) scratch.data,
- scratch.length, &eblock, 0)) {
- (void) (*eblock.crypto_entry->finish_key)(&eblock);
+ if (retval = krb5_decrypt((krb5_pointer) request->authenticator.data,
+ (krb5_pointer) scratch.data,
+ scratch.length, &eblock, 0)) {
+ (void) krb5_finish_key(&eblock);
free(scratch.data);
return retval;
}
#define clean_scratch() {bzero(scratch.data, scratch.length); free(scratch.data);}
- if (retval = (*eblock.crypto_entry->finish_key)(&eblock)) {
+ if (retval = krb5_finish_key(&eblock)) {
clean_scratch();
return retval;