| 1 | /* mechinfo.c --- Definition of SCRAM mechanism. |
| 2 | * Copyright (C) 2009-2012 Simon Josefsson |
| 3 | * |
| 4 | * This file is part of GNU SASL Library. |
| 5 | * |
| 6 | * GNU SASL Library is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU Lesser General Public License |
| 8 | * as published by the Free Software Foundation; either version 2.1 of |
| 9 | * the License, or (at your option) any later version. |
| 10 | * |
| 11 | * GNU SASL Library is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * Lesser General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU Lesser General Public |
| 17 | * License along with GNU SASL Library; if not, write to the Free |
| 18 | * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 19 | * Boston, MA 02110-1301, USA. |
| 20 | * |
| 21 | */ |
| 22 | #include "config.h" |
| 23 | |
| 24 | /* Get specification. */ |
| 25 | #include "scram.h" |
| 26 | |
| 27 | #ifdef USE_SCRAM_SHA1 |
| 28 | Gsasl_mechanism gsasl_scram_sha1_mechanism = { |
| 29 | GSASL_SCRAM_SHA1_NAME, |
| 30 | { |
| 31 | NULL, |
| 32 | NULL, |
| 33 | #ifdef USE_CLIENT |
| 34 | _gsasl_scram_sha1_client_start, |
| 35 | _gsasl_scram_sha1_client_step, |
| 36 | _gsasl_scram_sha1_client_finish, |
| 37 | #else |
| 38 | NULL, |
| 39 | NULL, |
| 40 | NULL, |
| 41 | #endif |
| 42 | NULL, |
| 43 | NULL} |
| 44 | , |
| 45 | { |
| 46 | NULL, |
| 47 | NULL, |
| 48 | #ifdef USE_SERVER |
| 49 | _gsasl_scram_sha1_server_start, |
| 50 | _gsasl_scram_sha1_server_step, |
| 51 | _gsasl_scram_sha1_server_finish, |
| 52 | #else |
| 53 | NULL, |
| 54 | NULL, |
| 55 | NULL, |
| 56 | #endif |
| 57 | NULL, |
| 58 | NULL} |
| 59 | }; |
| 60 | #endif |
| 61 | |
| 62 | |
| 63 | #ifdef USE_SCRAM_SHA1 |
| 64 | Gsasl_mechanism gsasl_scram_sha1_plus_mechanism = { |
| 65 | GSASL_SCRAM_SHA1_PLUS_NAME, |
| 66 | { |
| 67 | NULL, |
| 68 | NULL, |
| 69 | #ifdef USE_CLIENT |
| 70 | _gsasl_scram_sha1_plus_client_start, |
| 71 | _gsasl_scram_sha1_client_step, |
| 72 | _gsasl_scram_sha1_client_finish, |
| 73 | #else |
| 74 | NULL, |
| 75 | NULL, |
| 76 | NULL, |
| 77 | #endif |
| 78 | NULL, |
| 79 | NULL} |
| 80 | , |
| 81 | { |
| 82 | NULL, |
| 83 | NULL, |
| 84 | #ifdef USE_SERVER |
| 85 | _gsasl_scram_sha1_plus_server_start, |
| 86 | _gsasl_scram_sha1_server_step, |
| 87 | _gsasl_scram_sha1_server_finish, |
| 88 | #else |
| 89 | NULL, |
| 90 | NULL, |
| 91 | NULL, |
| 92 | #endif |
| 93 | NULL, |
| 94 | NULL} |
| 95 | }; |
| 96 | #endif |
| 97 | |