Changeset 689 in openpam for trunk/lib/liboath/oath_key.c
- Timestamp:
- Jul 12, 2013, 10:47:14 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/liboath/oath_key.c
r679 r689 39 39 #include <inttypes.h> 40 40 #include <limits.h> 41 #include <stdint.h>42 41 #include <stdio.h> 43 42 #include <stdlib.h> … … 51 50 52 51 #include <security/oath.h> 53 54 /*55 * Allocate a struct oath_key with sufficient additional space for the56 * label and key.57 */58 struct oath_key *59 oath_key_alloc(void)60 {61 struct oath_key *key;62 63 if ((key = calloc(1, sizeof *key)) == NULL) {64 openpam_log(PAM_LOG_ERROR, "malloc(): %s", strerror(errno));65 return (NULL);66 }67 /* XXX should try to wire */68 return (key);69 }70 71 /*72 * Wipe and free a struct oath_key73 */74 void75 oath_key_free(struct oath_key *key)76 {77 78 if (key != NULL) {79 memset(key, 0, sizeof *key);80 free(key);81 }82 }83 52 84 53 /*
Note: See TracChangeset
for help on using the changeset viewer.