Skip to content

Commit

Permalink
Update pem.c
Browse files Browse the repository at this point in the history
  • Loading branch information
guanzhi committed Oct 23, 2023
1 parent 117914d commit 5a30e8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pem.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ int pem_write(FILE *fp, const char *name, const uint8_t *data, size_t datalen)
fprintf(fp, "-----BEGIN %s-----\n", name);
base64_encode_init(&ctx);
while (datalen) {
inlen = datalen < 48 ? datalen : 48;
inlen = datalen < 48 ? (int)datalen : 48;
base64_encode_update(&ctx, data, inlen, out, &outlen);
fwrite(out, 1, outlen, fp);
data += inlen;
Expand Down

0 comments on commit 5a30e8d

Please sign in to comment.