Commit 17d11ab2a854846311df44a47d9ea49c1f946b81
1 parent
6dd6a5b2
remove no longer used application signup method
Showing
4 changed files
with
3 additions
and
98 deletions
... | ... | @@ -63,7 +63,6 @@ CLASS(Application) { |
63 | 63 | |
64 | 64 | int applicationLogin(Application, Credential, Session); |
65 | 65 | void applicationLogout(Application, Session); |
66 | -int applicationSignup(Application, Credential, User, Session); | |
67 | 66 | Uuid applicationCreateUser(Application, Credential, User); |
68 | 67 | User applicationGetUser(Application, Uuid); |
69 | 68 | int applicationUpdatePassword(Application, Credential, User); | ... | ... |
... | ... | @@ -4,7 +4,6 @@ AUTOMAKE_OPTIONS = subdir-objects |
4 | 4 | APPLICATION = application.c \ |
5 | 5 | login.c \ |
6 | 6 | logout.c \ |
7 | - signup.c \ | |
8 | 7 | get_user.c \ |
9 | 8 | create_user.c \ |
10 | 9 | update_password.c \ |
... | ... | @@ -12,8 +11,10 @@ APPLICATION = application.c \ |
12 | 11 | session_stop.c \ |
13 | 12 | session_get.c \ |
14 | 13 | session_cleanup.c |
14 | + | |
15 | 15 | ADAPTERHTTP = adapter/http/http.c \ |
16 | 16 | adapter/http/update.c |
17 | + | |
17 | 18 | CONTROLLER = controller/authenticate/create.c \ |
18 | 19 | controller/authenticate/delete.c \ |
19 | 20 | controller/currentuser/read.c \ | ... | ... |
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | * \author Georg Hopp |
5 | 5 | * |
6 | 6 | * \copyright |
7 | - * Copyright © 2012 Georg Hopp | |
7 | + * Copyright © 2013 Georg Hopp | |
8 | 8 | * |
9 | 9 | * This program is free software: you can redistribute it and/or modify |
10 | 10 | * it under the terms of the GNU General Public License as published by | ... | ... |
src/application/signup.c
deleted
100644 → 0
1 | -/** | |
2 | - * \file | |
3 | - * | |
4 | - * \author Georg Hopp | |
5 | - * | |
6 | - * \copyright | |
7 | - * Copyright © 2012 Georg Hopp | |
8 | - * | |
9 | - * This program is free software: you can redistribute it and/or modify | |
10 | - * it under the terms of the GNU General Public License as published by | |
11 | - * the Free Software Foundation, either version 3 of the License, or | |
12 | - * (at your option) any later version. | |
13 | - * | |
14 | - * This program is distributed in the hope that it will be useful, | |
15 | - * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | - * GNU General Public License for more details. | |
18 | - * | |
19 | - * You should have received a copy of the GNU General Public License | |
20 | - * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
21 | - */ | |
22 | - | |
23 | -#define _GNU_SOURCE | |
24 | - | |
25 | -#include <stdio.h> | |
26 | -#include <stdlib.h> | |
27 | -#include <sys/types.h> | |
28 | - | |
29 | -#include "class.h" | |
30 | -#include "auth.h" | |
31 | -#include "user.h" | |
32 | -#include "uuid.h" | |
33 | -#include "storage/storage.h" | |
34 | -#include "application/application.h" | |
35 | - | |
36 | -#include "interface/serializable.h" | |
37 | -#include "interface/indexable.h" | |
38 | - | |
39 | -#include "utils/memory.h" | |
40 | -#include "commons.h" | |
41 | - | |
42 | -int | |
43 | -applicationSignup( | |
44 | - Application this, | |
45 | - Credential cred, | |
46 | - User user, | |
47 | - Session session) | |
48 | -{ | |
49 | - unsigned char hash_data[SALT_SIZE+HASH_SIZE]; | |
50 | - unsigned char * salt = NULL; | |
51 | - unsigned char * hash = hash_data+SALT_SIZE; | |
52 | - char * user_serialized; | |
53 | - size_t nuser_serialized; | |
54 | - Uuid index; | |
55 | - | |
56 | - index = indexUuid(user, this->user_namespace); | |
57 | - serialize(user, (unsigned char **)&user_serialized, &nuser_serialized); | |
58 | - | |
59 | - if (FALSE == hash_pw( | |
60 | - CRED_PWD(cred).pass, | |
61 | - CRED_PWD(cred).npass, | |
62 | - hash, | |
63 | - &salt)) { | |
64 | - /** | |
65 | - * \todo if we come here we have to delete the previously saved | |
66 | - * user again... | |
67 | - */ | |
68 | - return 0; | |
69 | - } | |
70 | - | |
71 | - memcpy(hash_data, salt, SALT_SIZE); | |
72 | - MEM_FREE(salt); | |
73 | - | |
74 | - /** | |
75 | - * \todo | |
76 | - * Add error handling here... | |
77 | - */ | |
78 | - storagePut( | |
79 | - this->users, | |
80 | - (char *)(index->uuid).value, | |
81 | - sizeof((index->uuid).value), | |
82 | - user_serialized, | |
83 | - nuser_serialized); | |
84 | - | |
85 | - storagePut( | |
86 | - this->passwords, | |
87 | - (char *)(index->uuid).value, | |
88 | - sizeof((index->uuid).value), | |
89 | - (char *)hash_data, | |
90 | - SALT_SIZE + HASH_SIZE); | |
91 | - | |
92 | - return 1; | |
93 | -} | |
94 | - | |
95 | -// vim: set ts=4 sw=4: |
Please
register
or
login
to post a comment