]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Tell clients based on old SIP standard that we only support MD5 digest authentication...
authorOlle Johansson <oej@edvina.net>
Tue, 4 Jul 2006 14:45:44 +0000 (14:45 +0000)
committerOlle Johansson <oej@edvina.net>
Tue, 4 Jul 2006 14:45:44 +0000 (14:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@36911 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index f95d17c077f084aa08eb44c72211c305d1f5299a..d503661c6e92363f17dc3cc3897f31af4a078ff8 100644 (file)
@@ -4286,7 +4286,7 @@ static int transmit_response_with_allow(struct sip_pvt *p, char *msg, struct sip
 static int transmit_response_with_auth(struct sip_pvt *p, char *msg, struct sip_request *req, char *randdata, int reliable, char *header, int stale)
 {
        struct sip_request resp;
-       char tmp[256];
+       char tmp[512];
        int seqno = 0;
 
        if (reliable && (sscanf(get_header(req, "CSeq"), "%d ", &seqno) != 1)) {
@@ -4295,7 +4295,7 @@ static int transmit_response_with_auth(struct sip_pvt *p, char *msg, struct sip_
        }
        /* Stale means that they sent us correct authentication, but 
           based it on an old challenge (nonce) */
-       snprintf(tmp, sizeof(tmp), "Digest realm=\"%s\", nonce=\"%s\"%s", global_realm, randdata, stale ? ", stale=true" : "");
+       snprintf(tmp, sizeof(tmp), "Digest algorithm=MD5, realm=\"%s\", nonce=\"%s\"%s", global_realm, randdata, stale ? ", stale=true" : "");
        respprep(&resp, p, msg, req);
        add_header(&resp, header, tmp);
        add_header_contentLength(&resp, 0);