Differences From Artifact [662da97f8a]:
- File
src/XMPPSCRAMAuth.m
— part of check-in
[6a3b0a9988]
at
2011-02-21 03:09:39
on branch trunk
— Add SCRAM-SHA-1 support
This adds the new base class XMPPAuthenticator and the derived
classes XMPPSCRAMAuth and XMPPPLAINAuth.
They are now used for authentication from within XMPPConnection.Also adds XMPPAuthFailedException which is thrown in appropriate places. (user: florob@babelmonkeys.de, size: 11887) [annotate] [blame] [check-ins using]
To Artifact [709f3138f4]:
- File src/XMPPSCRAMAuth.m — part of check-in [a59df3b671] at 2011-02-24 18:51:53 on branch trunk — Escape SCRAM usernames (authzid and authcid) (user: florob@babelmonkeys.de, size: 12677) [annotate] [blame] [check-ins using]
︙ | |||
83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | [GS2Header release]; [clientFirstMessageBare release]; [serverSignature release]; [cNonce release]; [super dealloc]; } - (void)setAuthzid: (OFString*)authzid_ { OFString *old = authzid; if (authzid_) { OFMutableString *new = [[OFMutableString alloc] initWithString: authzid_]; [new replaceOccurrencesOfString: @"=" withString: @"=3D"]; [new replaceOccurrencesOfString: @"," withString: @"=2C"]; authzid = [new copy]; [new release]; } else authzid = nil; [old release]; } - (void)setAuthcid: (OFString*)authcid_ { OFString *old = authcid; if (authcid_) { OFMutableString *new = [[OFMutableString alloc] initWithString: authcid_]; [new replaceOccurrencesOfString: @"=" withString: @"=3D"]; [new replaceOccurrencesOfString: @"," withString: @"=2C"]; authcid = [new copy]; [new release]; } else authcid = nil; [old release]; } - (OFString *)_genNonce { OFMutableString *nonce = [OFMutableString string]; uint32_t res, i; for (i = 0; i < 64; i++) { while((res = fake_arc4random_uniform(0x5e) + 0x21) == 0x2C); |
︙ |