Skip to content

Commit

Permalink
errtext
Browse files Browse the repository at this point in the history
  • Loading branch information
Kissaki committed Mar 14, 2024
1 parent 1b3903f commit d090d83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion nss.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,11 @@ size_t nss_encrypt(void *param, const size_t size, void *dst, const void *src) {
unsigned int written;

if (PK11_Encrypt(np->key, np->ckmt, &np->params, dst, &written, nss_buffer_size(size), src, size) != SECSuccess) {
printf("nss_encrypt(): PK11_Encrypt() failed with error %d\n", PR_GetError());
PRErrorCode errCode = PR_GetError();
PRInt32 errTextLen = PR_GetErrorTextLength();
char[errTextLen] errText;
PR_GetErrorText(&errText);
printf("nss_encrypt(): PK11_Encrypt() failed with error %d %s\n", errCode, errText);
return 0;
}

Expand Down

0 comments on commit d090d83

Please sign in to comment.