View | Details | Raw Unified | Return to bug 16209
Collapse All | Expand All

(-)opie.4 (-5 / +5 lines)
Lines 211-227 Link Here
211
.IR opiekey(1),
211
.IR opiekey(1),
212
which is an OPIE key calculator.
212
which is an OPIE key calculator.
213
213
214
.LP ADDING OPIE TO OTHER PROGRAMS
214
.SH ADDING OPIE TO OTHER PROGRAMS
215
215
216
Adding OPIE authentication to programs other than the ones included as clients
216
Adding OPIE authentication to programs other than the ones included as clients
217
in the OPIE distribution isn't very difficult. First, you will need to make
217
in the OPIE distribution isn't very difficult. First, you will need to make
218
sure that the program includes <stdio.h> somewhere. Then, below the other
218
sure that the program includes <stdio.h> somewhere. Then, below the other
219
includes such as <stdio.h>, but before variable declarations, you need to
219
includes such as <stdio.h>, but before variable declarations, you need to
220
include "opie.h". You need to add a variable of type "struct opie" to your
220
include <opie.h>. You need to add a variable of type "struct opie" to your
221
program, you need to make sure that the buffer that you use to get a password
221
program, you need to make sure that the buffer that you use to get a password
222
from the user is big enough to hold OPIE_RESPONSE_MAX+1 characters, and you
222
from the user is big enough to hold OPIE_RESPONSE_MAX+1 characters, and you
223
need to have a buffer in which to store the challenge string that is big enough
223
need to have a buffer in which to store the challenge string that is big enough
224
to hold OPIE_PROMPT_MAX+1 characters.
224
to hold OPIE_CHALLENGE_MAX+1 characters.
225
.LP
225
.LP
226
When you are ready to output the challenge string and know the user's name,
226
When you are ready to output the challenge string and know the user's name,
227
you would use a call to opiechallenge. Later, to verify the response received,
227
you would use a call to opiechallenge. Later, to verify the response received,
Lines 253-265 Link Here
253
.sp 0
253
.sp 0
254
	struct opie opiedata;
254
	struct opie opiedata;
255
.sp 0
255
.sp 0
256
	char opieprompt[OPIE_PROMPT_MAX+1];
256
	char opieprompt[OPIE_CHALLENGE_MAX+1];
257
.sp 0
257
.sp 0
258
		.
258
		.
259
.sp 0
259
.sp 0
260
		.
260
		.
261
.sp 0
261
.sp 0
262
	opiechallenge(&opiedata, user_name, &opieprompt);
262
	opiechallenge(&opiedata, user_name, opieprompt);
263
.sp 0
263
.sp 0
264
		.
264
		.
265
.sp 0
265
.sp 0

Return to bug 16209