Yes, but the actual alliance was in a secret codicil to the pact; the public face of the pact was just a truce between enemies. Both Hitler and Mussolini came to power largely on the strength of their opposition to Communism, which is why even a pact of neutrality was so scandalous to French Communists.