1 /*
2 * MD5 password support for CUPS (deprecated).
3 *
4 * Copyright © 2020-2024 by OpenPrinting.
5 * Copyright 2007-2017 by Apple Inc.
6 * Copyright 1997-2005 by Easy Software Products.
7 *
8 * Licensed under Apache License v2.0. See the file "LICENSE" for more information.
9 */
10
11 /*
12 * Include necessary headers...
13 */
14
15 #include <cups/cups.h>
16 #include "http-private.h"
17 #include "string-private.h"
18
19
20 /*
21 * 'httpMD5()' - Compute the MD5 sum of the username:group:password.
22 *
23 * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
24 * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
25 *
26 * @deprecated@
27 */
28
29 char * /* O - MD5 sum */
httpMD5(const char * username,const char * realm,const char * passwd,char md5[33])30 httpMD5(const char *username, /* I - User name */
31 const char *realm, /* I - Realm name */
32 const char *passwd, /* I - Password string */
33 char md5[33]) /* O - MD5 string */
34 {
35 (void)username;
36 (void)realm;
37 (void)passwd;
38
39 md5[0] = '\0';
40
41 return (NULL);
42 }
43
44
45 /*
46 * 'httpMD5Final()' - Combine the MD5 sum of the username, group, and password
47 * with the server-supplied nonce value, method, and
48 * request-uri.
49 *
50 * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
51 * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
52 *
53 * @deprecated@
54 */
55
56 char * /* O - New sum */
httpMD5Final(const char * nonce,const char * method,const char * resource,char md5[33])57 httpMD5Final(const char *nonce, /* I - Server nonce value */
58 const char *method, /* I - METHOD (GET, POST, etc.) */
59 const char *resource, /* I - Resource path */
60 char md5[33]) /* IO - MD5 sum */
61 {
62 (void)nonce;
63 (void)method;
64 (void)resource;
65
66 md5[0] = '\0';
67
68 return (NULL);
69 }
70
71
72 /*
73 * 'httpMD5String()' - Convert an MD5 sum to a character string.
74 *
75 * The function was used for HTTP Digest authentication. Since CUPS 2.4.0
76 * it produces an empty string. Please use @link cupsDoAuthentication@ instead.
77 *
78 * @deprecated@
79 */
80
81 char * /* O - MD5 sum in hex */
httpMD5String(const unsigned char * sum,char md5[33])82 httpMD5String(const unsigned char *sum, /* I - MD5 sum data */
83 char md5[33])
84 /* O - MD5 sum in hex */
85 {
86 (void)sum;
87
88 md5[0] = '\0';
89
90 return (NULL);
91 }
92